当前位置: 首页>>代码示例>>Python>>正文


Python Vasp.write_potcar方法代码示例

本文整理汇总了Python中ase.calculators.vasp.Vasp.write_potcar方法的典型用法代码示例。如果您正苦于以下问题:Python Vasp.write_potcar方法的具体用法?Python Vasp.write_potcar怎么用?Python Vasp.write_potcar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ase.calculators.vasp.Vasp的用法示例。


在下文中一共展示了Vasp.write_potcar方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: write_input_files

# 需要导入模块: from ase.calculators.vasp import Vasp [as 别名]
# 或者: from ase.calculators.vasp.Vasp import write_potcar [as 别名]
 def write_input_files(self, at, label):
     global _chdir_lock
     # For LOTF Simulations active number of quantum 
     # atoms vary and must wait to this stage in order for
     # magnetic moments to be set properly. If magnetic moments
     # not set defaults to 0.
     self.vasp_args['magmom'] = at.get_initial_magnetic_moments()
     vasp = Vasp(**self.vasp_args)
     vasp.initialize(at)
     # chdir not thread safe, so acquire global lock before using it
     orig_dir = os.getcwd()
     try:
         _chdir_lock.acquire()
         os.chdir(self.subdir)
         if os.path.exists('OUTCAR'):
             n = 1
             while os.path.exists('OUTCAR.%d' % n):
                 n += 1
             shutil.copyfile('OUTCAR', 'OUTCAR.%d' % n)
             shutil.copyfile('POSCAR', 'POSCAR.%d' % n)
         write_vasp('POSCAR', vasp.atoms_sorted,
                    symbol_count=vasp.symbol_count,
                    vasp5='5' in self.exe)
         vasp.write_incar(at)
         vasp.write_potcar()
         vasp.write_kpoints()
     finally:
         os.chdir(orig_dir)
         _chdir_lock.release()
开发者ID:libAtoms,项目名称:matscipy,代码行数:31,代码来源:socketcalc.py

示例2: write_input_files

# 需要导入模块: from ase.calculators.vasp import Vasp [as 别名]
# 或者: from ase.calculators.vasp.Vasp import write_potcar [as 别名]
 def write_input_files(self, at, label):
     global _chdir_lock
     vasp = Vasp(**self.vasp_args)
     vasp.initialize(at) 
     # chdir not thread safe, so acquire global lock before using it
     orig_dir = os.getcwd()
     try:
         _chdir_lock.acquire()
         os.chdir(self.subdir)
         if os.path.exists('OUTCAR'):
             n = 1
             while os.path.exists('OUTCAR.%d' % n):
                 n += 1
             shutil.copyfile('OUTCAR', 'OUTCAR.%d' % n)
             shutil.copyfile('POSCAR', 'POSCAR.%d' % n)
         write_vasp('POSCAR', vasp.atoms_sorted,
                    symbol_count=vasp.symbol_count,
                    vasp5='5' in self.exe)
         vasp.write_incar(at)
         vasp.write_potcar()
         vasp.write_kpoints()
     finally:
         os.chdir(orig_dir)
         _chdir_lock.release()
开发者ID:maldegunde,项目名称:matscipy,代码行数:26,代码来源:socketcalc.py

示例3: Vasp

# 需要导入模块: from ase.calculators.vasp import Vasp [as 别名]
# 或者: from ase.calculators.vasp.Vasp import write_potcar [as 别名]
from ase.lattice import surface
from ase.constraints import FixAtoms
from ase.calculators.vasp import Vasp
from ase.visualize import view
from ase.io import write
from ase.io import read

#sigma=0.01 for gases and edif=13-8

calc = Vasp(xc='PBE', kpts=(3,3,1), lwave=False, lcharg=False,lvtot=False, nwrite=1
            , encut=400, algo='Fast', ismear=0, sigma=0.0031, voskown=1, istart=0, nelm=400, nelmdl=-10, ediff=1e-8, ispin=2
            ,nsw=1, isif=2, ibrion=5, nfree=2, potim=0.015, ediffg=-0.05, isym=0
            ,lvdw=True, vdw_version=3
            ,lreal='Auto')

slab = read('../CONTCAR')


slab.center(vacuum=20.0,axis=2)

view(slab) # View the slab, frozen atoms will be marked with a "X"


#slab.set_calculator(calc)

calc.initialize(slab)
calc.write_incar(slab)
calc.write_potcar()
calc.write_kpoints()
write('POSCAR', calc.atoms_sorted)  # this will write a "sorted" POSCAR
开发者ID:JLans,项目名称:ASE_Scripts,代码行数:32,代码来源:Gas_vibration.py


注:本文中的ase.calculators.vasp.Vasp.write_potcar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。