From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Nov 17 2009 - 12:40:49 CST

On Tue, Nov 17, 2009 at 12:15 PM, Ding, L. <ld82_at_leicester.ac.uk> wrote:
> Hi, My name is Lifeng. I just start to learn to use VMD. I am using my own MD script to model polymer chain system. The problem I have is I am having trouble to generate a appropriate file format which is recognizable by VMD.

first of all, why write another MD code for bead-spring models, when
there are several very
efficient ones around.

> I can manage to generate a simple xyz format and VMD can visualize it for me. However I can't go further to identify each polymer chain which should be ideally marked with different colour.

if VMD recognizes the springs in your model as bonds, all you have to do
is to switch to "Residue" coloring method. vmd will categorize the polymers
into fragments and then assign residue numbers which in turn can be used
for colorization.

> I was trying to generate a pdb file format. But the 200 pages of pdb file format introduction drive me crazy. Could someone here with polymer MD experience help me out?

.pdb is a very bad file format for MD for a lot of reasons.
actually .xyz isn't much better, since it requires to parse text files,
which takes an enormous amount of time when reading
long trajectory files.

in any case, most MD codes use a dual file format approach. you have
one (often text format) file that contains the information about atom and
residue/molecule identities and typs, as well as bonds, angles and other
topology related data, and a second (binary format) file that contains only
the coordinates and can be read in very efficiently and without loss of
accuracy. NAMD for example uses .psf and .dcd for that.

hope that helps,
    axel.

>
> Many thanks
>
> Lifeng
>
>

-- 
Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.