本文整理汇总了Python中ase.calculators.vasp.Vasp.set_results方法的典型用法代码示例。如果您正苦于以下问题:Python Vasp.set_results方法的具体用法?Python Vasp.set_results怎么用?Python Vasp.set_results使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ase.calculators.vasp.Vasp
的用法示例。
在下文中一共展示了Vasp.set_results方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update
# 需要导入模块: from ase.calculators.vasp import Vasp [as 别名]
# 或者: from ase.calculators.vasp.Vasp import set_results [as 别名]
def update(self, atoms):
if self.calc_running :
# we have started the calculation and have
# nothing to read really. But we need to check
# first if this is still true.
if self.calc_finished():
# We were running but recently finished => read the results
# This is a piece of copy-and-paste programming
# This is a copy of code from Vasp.calculate
self.calc_running=False
with work_dir(self.working_dir) :
atoms_sorted = ase.io.read('CONTCAR', format='vasp')
if self.int_params['ibrion'] > -1 and self.int_params['nsw'] > 0:
# Update atomic positions and unit cell with the ones read
# from CONTCAR.
atoms.positions = atoms_sorted[self.resort].positions
atoms.cell = atoms_sorted.cell
self.converged = self.read_convergence()
Vasp.set_results(self,atoms)
return
else :
return
# We are not in the middle of calculation.
# Update as normal
Vasp.update(self, atoms)
示例2: set_results
# 需要导入模块: from ase.calculators.vasp import Vasp [as 别名]
# 或者: from ase.calculators.vasp.Vasp import set_results [as 别名]
def set_results(self, atoms):
with work_dir(self.working_dir) :
#print('set_results')
Vasp.set_results(self, atoms)