[ase-users] Extracting data from Trajectory object
Zeeshan Ahmad
azeeshan at andrew.cmu.edu
Tue Oct 4 01:49:39 CEST 2016
Hi,
We can read a trajectory file and get info about all the steps using:
atoms = read(’name.traj’,index=‘:’)
I wanted to know if there was a way to extract data for all steps from a Trajectory object which was created and attached to some dynamics object. For eg:
dyn = NPT(atoms=atoms,timestep=2.0*units.fs,temperature=600*units.kB,pfactor = None,mask=(0,0,0),ttime=25.0*units.fs,externalstress=0) #NVT
traj = Trajectory('Diff.traj','w',atoms)
dyn.attach(traj.write,interval=1)
dyn.run(2000)
After running for the required number of steps, one way to post process data is to use:
readtraj = read(‘Diff.traj’,index=‘:’)
which gives a list of atoms objects for all 2000 steps. Is there a way to extract this info from the Trajectory object called traj without reading the .traj file?
Thanks,
--
Zeeshan Ahmad
PhD student, Mechanical Engineering
Carnegie Mellon University
email: azeeshan at andrew.cmu.edu
http://www.andrew.cmu.edu/user/azeeshan/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20161003/fd57be3f/attachment.html>
More information about the ase-users
mailing list