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


Python Vasp.update方法代码示例

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


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

示例1: update

# 需要导入模块: from ase.calculators.vasp import Vasp [as 别名]
# 或者: from ase.calculators.vasp.Vasp import update [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)
开发者ID:digideskio,项目名称:Elastic,代码行数:27,代码来源:parcalc.py


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