Re: [AMBER] Extract temperature of a subsytem

From: Nhai <nhai.qn.gmail.com>
Date: Fri, 25 Nov 2016 10:54:46 -0500

It you want to save a bit time, you can use pytraj (>= 1.0.9) to extract v and m.

import pytraj as pt
traj = pt.iterload('your.nc', top='your.parm')
vels = [frame.velocity.copy() for frame in traj]
mass = traj.top.mass

# do something interesting here

Install: http://amber-md.github.io/pytraj/latest/installation.html#update-to-amberhome

Hai



Hai Nguyen
> On Nov 25, 2016, at 9:15 AM, diego.soler.uam.es wrote:
>
> Hi Gustavo,
> Thanks for your answer.
>
> Yes, I've saved the velocities. Yes, I know I can do that, but the
> format of the velocity files is quite difficult to manage (10
> columns), and besides I would have to extract the masses from
> somewhere else.
>
> I can extract the velocities of the subsystem of interest with
> cpptraj, but the format is still the same one (not very friendly).
>
> It can be done, of course, but I was wondering if there's already
> some tool implemented in AMBER allowing me do to this without having
> to waste time writing a program to read the velocities in that
> awful-looking format and the masses to compute the Kinetic energy.
>
> Thanks!
>
>
> Quoting Gustavo Seabra <gustavo.seabra.gmail.com>:
>
>> Have you saved the velocities? AFAIK, the are not saved by default
>> except on the restart file. Assuming you have the velocities, you
>> can calculate the temperature by first calculating the kinetic
>> energy, then using T=2*KE/(3*k), where k is Boltzmann constant.
>>
>> —
>> Gustavo Seabra.
>>
>>
>>
>>> Em 25 de nov de 2016, à(s) 08:22, diego.soler.uam.es escreveu:
>>>
>>>
>>> Hi, I 've run some simulations and I'd like to be able to extract
>>> the instantaneous temperatures of just some of the residues. Is there
>>> a quick way to achieve this? Like a flag with a mask or something? Or
>>> do I have to do all the hard work processing the output files (not
>>> much of a problem, but still, it would be nice if there was a quick
>>> way to accomplish this)?
>>>
>>> Thank you
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Nov 25 2016 - 08:00:02 PST
Custom Search