From: Bjoern Olausson (namdlist_at_googlemail.com)
Date: Wed Jul 01 2009 - 07:19:39 CDT

On Monday 29 June 2009 15:51:01 Axel Kohlmeyer wrote:
> On Mon, 2009-06-29 at 12:29 +0200, Bjoern Olausson wrote:
>
> hi bjoern,
>
> > Could you redirect me to some VMD 1.8.7 <-> Python tutorial? I would like
> > to stick to python as much as possible ;-)
>
> since the python support in VMD is so restricted this is probably
> not the best way to understand "the VMD way". almost all documentation
> that is available is in the user's guide. many of the more sophisticated
> analysis scripts and methods are written in tcl. by sticking to python,
> you will limit yourself and get only a restricted impression of the
> capabilities of VMD. now the repeated requests for python enabled
> binaries, show that there are people out there that use the python
> interface in VMD a lot, but almost nobody has published any plugins
> or script libraries that can be re-used by others. i learned most of
> what i know about smart VMD scripting from studying other people's
> tcl scripts.
>
I see. So with the next problem on my table, I'll give TCL a try.

> [...]
>
> > And while I am on it... I am writing a small python script which can
> > combine multiple output files and selectively plot whatever is plotable
> > ;-)
> >
> > For this reason I was looking around for the formating of the output
> > file. Something like that link below for PDB-files:
> > http://deposit.rcsb.org/adit/docs/pdb_atom_format.html#ATOM
> >
> > Especially I am interested in the formating and naming of the columns of
> > this part:
> >
> > PRESSURE: 29109200 546.983 413.11 92.8291 413.11 -486.118 30.045 92.8291
> > 30.045 -566.529
> > GPRESSURE: 29109200 388.5 383.831 6.4171 339.175 -407.812 358.594
> > -111.003 -223.426 -491.163
> > PRESSAVG: 29109200 32.2755 -27.1969 -120.07 -27.1969 8.01839 -60.9932
> > -120.07 -60.9932 -3.92224
> > GPRESSAVG: 29109200 30.6858 -30.7705 -117.957 -14.7335 12.1397 -64.4612
> > -123.885 -49.5245 -4.49357
> > ENERGY: 29109200 2828.8126 8444.6120 4596.9095
> > 59.0735 -39328.9221 -1866.4500 0.0000 0.0000
> > 13455.6967 -11810.2678
>
> sorry, this doesn't make any sense to me. you seem to be quoting part
> of a NAMD output file, but that has _nothing_ to do with the protein
> database atomic file format.
>
You are right, that does not have anything to do with PDB format, it was just
an example for a good documented file format ;-) Is there a similar
description for the NAMD output file? (Is it whitespace separated, fixed
columns...)

And how ist the output of "outputPressure" formated (I guess whitspace
separated) and what is the common naming of the pressure tensors?

PRESSURE: Timestep PXX PYY PZZ PXY PXZ PYZ ??? ??? ???
PRESSURE: 29101000 113.817 270.048 -425.735 270.048 -577.887 116.238 -425.735
116.238 -25.2852

> if you want to plot the data from a simulation run, have a look at
> the namd plot plugin already bundled with VMD. no need to re-invent
> that wheel again. ;)
> http://www.ks.uiuc.edu/Research/vmd/plugins/namdplot/
>
I know about this plugin, but it is to inflexible for my purpose and I wrote
one for CHARMM which is easily adopted to NAMD output ;-) And it is way more
comfortable to just launch 'anamo.py -f "*.out" -x Time -y TEMPAVG' and get a
graphic of the plot and a file containing the requested data of all files in
the directory for a quick diagram on how your simulation is doing ;) You can
even add multiple x and y values.
http://olausson.de/scriptarchive/16-modeling/50-anaoutpy

You can find the NAMD version here:
http://olausson.de/scriptarchive/16-modeling/56-anamopy

Thanks for your patience and your advice
I appreciate it very much

kind regards
Bjoern