From: Axel Kohlmeyer (
Date: Wed Apr 28 2010 - 10:37:36 CDT

On Wed, 2010-04-28 at 10:39 -0400, Chenchen Wang wrote:
> Hi,


please always keep the list in cc, so that people will see
the resolution of a question.

> I used the XYZ format as the input structure file which only has the
> xyz coordinates of each atom in it.Then I loaded it,the correct
> structure of polyethylene chain appeared on the display screen. I used
> commands "topo numangles", it gave 0 as a result. So because I did not
> provide angle/dihedral/improper information in my input file,then

yes. where should it come from??
already the bond information is not contained
in your input and VMD is trying to guess it from
a list of covalent radii under the assumption that
you have covalent bonds and that the atom names that
you are using are the names of the elements.

> VMD would not give me these information?But I need these information
> for the data. file in LAMMPS, can I get these information without
> providing them? Is there a tool can do this?Because for a large

for the most part, yes. there is a way to reconstruct this
information, but you have to use and check this very carefully.
in most force fields the definition of angle and dihedral
potentials follows the bond topology and the atom types.
if this is true in your case you can reconstruct those
definitions using some of the topotools facilities.
make sure that you have installed the latest version from:

then you should first assign the atom types (you can do this
by using appropriate atom names in your .xyz file) and
then you should do "topo retypebonds" so that VMD can internally
distinguish bonds between different atom types, that would
otherwise get all the same (wrong) bond type. when VMD reconstructs
bonds upon loading a file, it does not assign a bond type.

next you can use "topo guessangles" and "topo guessdihedrals"
to reconstruct the angle and dihedral definitions. apropriate
types will be assigned automatically. there is also an
option to guess impropers, but this is limited to a few cases.
in general, those definitions require additional information
from the force field data base.

finally, you can use "topo writelammpsdata data.myfile full"
or "topo writelammpsdata data.myfile molecular" to generate
your lammps data file containing all the information that VMD
has collected about your system in the process.

i would _strongly_ suggest to try out this procedure with
a very, very small system, where you can manually cross
check that the multiple "guessing" steps are working correctly,
before you try it on a real life problem. the package is fairly
new and even though it has been working well and reliably
for several people, there is always a chance of some
"undocumented feature" when somebody uses them on a new problem.

> system,it is really hard to count them by yourself...

counting is only the minor issue. assigning the proper types
consistently is much worse. this is why i wrote the plugin in
the first place, since our group is working on surfactants
where it is a similar necessity to generate the corresponding

> Thank you!
> On Wed, Apr 28, 2010 at 5:46 AM, Axel Kohlmeyer <>
> wrote:
> On Wed, Apr 28, 2010 at 1:19 AM, Chenchen Wang
> <> wrote:
> > Hi,all
> >
> > I just started to use VMD, and I want to use the topotools
> to get the
> > topology information of polyethylene chain.But for number of
> bonds,I get the
> > correct information,but for angles,dihedrals and impropers,
> it gives 0. I
> > don't understand why.Can anyone help me with this?
> VMD can only show you the information you provide
> and this depends on the file format that you are using.
> please explain on more detail the steps that you perform
> and the commands that you use and perhaps there is a
> way to help you. with the present amount of information,
> i can only say that you must be doing something wrong.
> cheers,
> axel.
> > Angles:0 Dihedrals:0 Impropers:0 Cross-terms:0
> > Bondtypes:0 Angletypes:0 Dihedraltypes:0 Impropertypes:0
> >
> > Thank you!
> >
> --
> Dr. Axel Kohlmeyer
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.