@@ -62,7 +62,7 @@ def langevin_nvt(
6262 traj_file ,
6363 atoms = atoms ,
6464 mode = 'w' ,
65- properties = ['energy' , 'forces' , 'stress' ]
65+ properties = ['energy' , 'forces' ]
6666 )
6767 dyn .attach (traj .write )
6868 dyn .run (nsteps )
@@ -77,6 +77,7 @@ def npt(
7777 traj_file : str = None ,
7878 ttime : float = 25 * fs ,
7979 pfactor : Optional [float ] = None , # (75*fs)**2 * 14*GPa, #Replace 14 with bulk modulus of material
80+ properties : Optional [Sequence ] = ('energy' , 'forces' , 'stress' ),
8081):
8182 """Does NPT dynamics
8283
@@ -107,12 +108,13 @@ def npt(
107108 pfactor = pfactor ,
108109 # mask=np.diag([1, 1, 1]),
109110 )
111+
110112 if traj_file is not None :
111113 traj = Trajectory (
112114 traj_file ,
113115 atoms = atoms ,
114116 mode = 'w' ,
115- properties = [ 'energy' , 'forces' , 'stress' ] ,
117+ properties = properties ,
116118 )
117119 dyn .attach (traj .write )
118120 dyn .run (nsteps )
@@ -173,6 +175,7 @@ def ase_md(
173175 externalstress : Optional [float ] = 0 ,
174176 plot : Optional [bool ] = True ,
175177 time_unit : Optional [str ] = 'ase' ,
178+ plot_args : Optional [dict ] = None ,
176179) -> Dict :
177180 """Runs ASE MD simulations. This is only recommended for small systems and
178181 for testing. For larger systems, use LAMMPS or more purpose-built code
@@ -242,11 +245,15 @@ def ase_md(
242245 timestep = timestep ,
243246 pfactor = None ,
244247 ttime = ttime ,
248+ properties = ['energy' , 'forces' ],
245249 )
246250
247251
248252 if plot :
249- plot_thermo (images = {'image_file' : 'output.traj' })
253+ plot_thermo (
254+ images = {'image_file' : 'output.traj' },
255+ ** plot_args
256+ )
250257
251258 results = {}
252259 return results
0 commit comments