Re: [AMBER] I have generated an AMBER trajectory with coordinates, velocities and forces. How can I place the relevant data sets in the text file?

From: Jewgeni Starikow <starikow.tfp.uni-karlsruhe.de>
Date: Mon, 28 Aug 2017 07:22:29 +0200

Dear Hai,


...many sincere thanks, that's definitely a good idea!


Respectfully yours,

Evgeni

On 2017-08-28 04:01, Hai Nguyen wrote:
> On Sun, Aug 27, 2017 at 5:41 PM, Jewgeni Starikow <
> starikow.tfp.uni-karlsruhe.de> wrote:
>
>> Dear all,
>>
>>
>> I have generated an AMBER trajectory with coordinates, velocities
>> and
>> forces at every time point. It is readily readable with the standard
>> CPPTRAJ routine.
>>
>> Now, from this point on, how could I write out the relevant data
>> sets
>> in some (text or binary) file readable in some straightforward way?
>>
>> I would greatly appreciate ordering my corresponding output file
>> like
>> as follows:
>>
>> Atom-Nr Time CoordX CoordY CoordZ VelocX VelocY VelocZ
>> ForceX ForceY ForceZ
>>
>> ... ... ... ... ... ... ... ...
>> ... ... ...
>>
>> ...etc., etc., etc. ...
>>
>> Which set of the CPPTRAJ commands would be most appropriate for the
>> above-outlined case?
>>
>>
> hi,
>
> If you know Python, you can use pytraj (cpptraj interface) to write
> your
> own script.
> http://amber-md.github.io/pytraj/latest/index.html
>
> import pytraj
>
> traj = pt.iterload('./trunc.nc', top='./system.prmtop')
>
> for frame in traj:
>
> print(frame.time)
>
> print(frame.xyz) # 2D coordinates
>
> print(frame.velocity) # 2D array
>
> print(frame.force) # 2D array
>
>
> # access atom name
>
> for atom in traj.top.atoms:
>
> print(atom.name)
>
>
> So on.
>
> Hai
>
>> Respectfully yours,
>>
>> Evgeni B. Starikov
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Aug 27 2017 - 22:30:02 PDT
Custom Search