Re: Storing atom coordinates at each time step

From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Aug 15 2007 - 20:40:14 CDT

(with apologies, I'm missing a close bracket in the below script, the
line with puts should read

puts $ofile [measure center $sel weight mass]

)

Peter Freddolino wrote:
> You can also use catdcd (
> http://www.ks.uiuc.edu/Development/MDTools/catdcd/) for this conversion:
>
> catdcd -s originalfile.pdb -stype pdb -o trajectory.pdb -otype pdb
> dcdfile.dcd
>
> NAMD doesn't write ascii trajectory files because they really get rather
> wasteful if you're doing a long run; however, as you can see there are a
> number of ways of easily obtaining them from a dcd. Hopefully a one line
> command doesn't constitute a script...
>
> By the way, just as an example (since Audrey asked), a script to print
> the center of mass to a file might look like:
>
> set ofile [open "filename" "w"]
> set sel [atomselect top all]
> for {set i 0} {$i < [molinfo top get numframes]} {incr i} {
> $sel frame $i
> puts $ofile [measure center $sel weight mass
> }
>
> $sel delete
> close $ofile
>
> (with some selection you want in place of all)
>
> Peter
>
> Richard Wood wrote:
>
>> I believe that one can write out a coordinate trajectory in pdb format
>> using NAMD, no?
>> Most programs can do this without the need to write script, because
>> most of us are chemists and NOT programmers.
>>
>> Richard
>>
>> Richard L. Wood, Ph. D.
>> rwoodphd_at_yahoo.com
>>
>>
>> ----- Original Message ----
>> From: Jeffrey J. Potoff <jpotoff_at_chem1.eng.wayne.edu>
>> To: Audrey Salazar <alsalazar_at_northwestern.edu>
>> Cc: namd-l_at_ks.uiuc.edu
>> Sent: Wednesday, August 15, 2007 4:48:18 PM
>> Subject: Re: namd-l: Storing atom coordinates at each time step
>>
>> Audrey Salazar wrote:
>>
>>
>>> Hello,
>>> I am a first year graduate student modeling nucleic acids in NAMD.
>>> For every time step, NAMD, like all MD programs, calculates the
>>> coordinates of each atom for each time step.
>>>
>>> ** Is there a way that I store this information in a file?
>>>
>>> I have looked in all the files that my .conf file specifies to output:
>>> .vel, .coor, .dcd (these three files are illegible), .xst, and .xsc.
>>>
>>> Do any of these files contain the information that I seek? If the
>>> information is contained in the illegible files, how can I read them?
>>>
>>>
>>>
>>>
>> Dear Audrey,
>> The *.dcd file contains the information you are after. The data are
>> stored in binary format to reduce the amount of disk space used. You
>> can read the dcd file in VMD and save the coordinates in a human
>> readable format via "File" and "save coordinates". With a little bit of
>> work, I'm sure you could automate this process.
>>
>>
>>> For long nucleic acid chains, writing these coordinates to a very
>>> large file will be very cumbersome.
>>>
>>> **Is there a way that I could store the coordinates of the center of
>>> mass of parts of the chain at every time step to file instead?
>>>
>>>
>>>
>> Anything is possible if you're willing to write some code to do it. In
>> VMD, this could be done via the tcl scripting language.
>>
>> Regards,
>> Jeff
>>
>> --
>> ======================================================================
>> Jeffrey J. Potoff jpotoff_at_chem1.eng.wayne.edu
>> Associate Professor Wayne State University
>> Department of Chemical Engineering and Materials Science
>> 5050 Anthony Wayne Dr Phone:(313)577-9357
>> Detroit, MI 48202 Fax: (313)578-5815
>> http://potoff1.eng.wayne.edu
>> ======================================================================
>>
>>
>>
>> ------------------------------------------------------------------------
>> Yahoo! oneSearch: Finally, mobile search that gives answers
>> <http://us.rd.yahoo.com/evt=48252/*http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC>,
>> not web links.
>>

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:06 CST