Пример #1
0

# and make it dependent on the number of cores
ncores=512
kpar_dft=32
kpar_chi=32
ncore_per_kpoint_dft=ncores/kpar_dft
ncore_per_kpoint_chi=ncores/kpar_chi
remainder=ncore_per_kpoint_dft%ncore_per_kpoint_chi

fw1_task1=ScriptTask.from_str("pwd")
fw1=VaspFirework(fw1_task1,name=mname)

# standard DFT first
vasp1=VaspInputInterface(s)
nelect=vasp1.get_nelect()
nbands=nelect*3/2
remainder=nbands%ncore_per_kpoint_dft
add=ncore_per_kpoint_dft-remainder
nbands=int(nbands+add)
vasp1.ALGO='Normal'
vasp1.KPAR=kpar_dft
vasp1.NBANDS=nbands
vasp1.NEDOS=4096
vasp1.kpts_style='Gamma'
vasp1.kpts=[6,6,6]
vasp1.kpts_shift=[0,0,0]

fw1.add_task(vasp1)
fw1.add_handler('FrozenJobErrorHandler')
Пример #2
0
 def test_get_nelect_from_interface(self):
     input = VaspInputInterface(s=self.mol_file, config_file=self.config_file)
     nelect = input.get_nelect()
     self.assertEqual(nelect, 8.0, msg=None)