Skip to content

Commit

Permalink
fix bug when key Volume is not given CALYPSO will not run
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzyphysics committed Aug 4, 2022
1 parent 1f091e1 commit fbca550
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dpgen/generator/lib/make_calypso.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def make_calypso_input(nameofatoms,numberofatoms,
assert numberofformula is not None and len(numberofformula) == 2 and type(numberofformula) is list
ret+= "NumberOfFormula = %s\n"%(' '.join(list(map(str,numberofformula))))
ret+= "# The volume per formula unit. Unit is in angstrom^3.\n"
ret+= "Volume = %s\n"%(volume)
if volume is None:
ret+= "# volume not found, CALYPSO will set one!\n"
else:
ret+= "Volume = %s\n"%(volume)
ret+= "# Minimal distance between atoms of each chemical species. Unit is in angstrom.\n"
assert len(distanceofion) == len(nameofatoms) #"check distance of ions and the number of atoms"
assert len(distanceofion[0]) == len(nameofatoms)
Expand Down

0 comments on commit fbca550

Please sign in to comment.