I should point out that I wrote a simple fortran program to write restarts
and I get exactly what I expected- the number in the traj file followed
by zeroes. So, I don't think it is a problem with internal representation,
it's something with either ptraj or C.
carlos
Robert Duke wrote:
> Carlos -
> I expect the problem is internal binary representation of the floating
> point numbers. So the input trajectory file values may not be exactly
> representable, though you are probably coming closer internally to
> your input than it appears in your restart output (which also suffers
> from not exactly representing the internal value). The only way to
> avoid this sort of thing is with BCD - binary-coded decimal, which I
> believe is probably available in Cobol and assembler :-) (probably
> PL/1 too).
> Regards - Bob
>
> ----- Original Message ----- From: "Carlos Simmerling"
> <carlos.csb.sunysb.edu>
> To: <amber-developers.scripps.edu>
> Sent: Monday, February 05, 2007 5:18 PM
> Subject: amber-developers: ptraj precision
>
>
>> I am reading a trajectory file into ptraj and writing as restart,
>> with no actions (no imaging, etc).
>>
>> I don't get quite what is in the traj file, does anyone know why?
>> The precision error is enough to affect the energies
>> and I want the actual coordinates from the traj file, not ones that
>> are +/- 0.000005 etc.
>> yes, I know that the ones in the traj file aren't exactly what was in
>> the original MD, but the point is to do an exact
>> conversion to restart.
>> thanks
>> carlos
>>
>> EXAMPLE
>> input trajectory file:
>> 18.438 29.157 33.019 18.614 28.133 32.690
>> output restart from ptraj:
>> 18.4379997 29.1569996 33.0190010 18.6140003 28.1329994 32.6899986
>>
>>
>>
>>
>> --
>> ===================================================================
>> Carlos L. Simmerling, Ph.D.
>> Associate Professor Phone: (631) 632-1336
>> Center for Structural Biology Fax: (631) 632-1555
>> CMM Bldg, Room G80
>> Stony Brook University E-mail: carlos.simmerling.stonybrook.edu
>> Stony Brook, NY 11794-5115
>> ===================================================================
>>
>>
>>
>>
>
Received on Wed Feb 07 2007 - 06:07:34 PST