From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Oct 09 2006 - 12:14:55 CDT

On Mon, 9 Oct 2006, Miller, Patrick wrote:

patrick,

PM> I'm working on a trajectory file plugin and want to get access
PM> to bond information (this file has no structure data in it).
PM> The idea is that I would load a molecule from PDB and/or PSF
PM> files and have the bonds computed in the normal way before reading
PM> trajectory information. So, inside my plugin....
PM>
PM> static int read_next_timestep(void* handle, int natoms,
PM> molfile_timestep* info) {
PM> ...
PM> /* How do I get the current pairlist of bonds? */
PM> }
PM>
PM> I want to correct raw atom positions to account for the periodic
PM> boundary....

as far as i can remember (but my memory keeps getting more
and more hazy these days ;-)), there is no API for that
unless you are reading the information from the same file
(and then you could keep the info around in a static struct).

regardless, the better solution for this would be that you
pass the cell information and then write an extension
to vmd that does pbc wrapping from within VMD. apart from
being more universal, it would also much easier to implement.

there are already scripts (pbcwrap/pbctools), and there were
discussions amongst VMD developers/hackers to implement the
time critical parts into VMD directly (similar to e.g. the
measure commands). on top if that, you do not only need the
bonding information, but you want to (optionally) make the
pbc wrapping strictly per atom or with bonds intact, per
residue, per segment, solvent aware and so on).

cheers,
   axel.

PM>
PM> Thanks for any pointers,
PM>
PM> Pat
PM>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.