Re: [AMBER] Count number of frames in any trajectory file

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Mon, 18 Jul 2011 11:32:05 -0400

Hi,

Assuming your mdcrd file has no box coords and is not corrupted you
can calculate the number of lines that each frame of your trajectory
should have based on this formula:

#LinesPerFrame = ((#atoms * 3) / 10)

If there is any fraction after the division, round up. If your
trajectory has box coordinates add 1. From this, you can calculate the
number of frames from the total number of lines in your trajectory:

#Frames = (#LinesInTrajectory - 1) / #LinesPerFrame

The "-1" in the first term is because every trajectory has a title
line. Hope this helps,

-Dan

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jul 18 2011 - 09:00:03 PDT
Custom Search