From: Axel Kohlmeyer (
Date: Thu Feb 19 2015 - 21:47:12 CST

On Thu, Feb 19, 2015 at 8:22 PM, Hugo Santos Silva <> wrote:
> Dear all,
> In a week time, I've got to know Lammps, followed Axel Kohlmeyer's beautiful
> tutorial on topotools and finally got some nice topologies running for
> tests. thank you!
> However, I indeed have two issues that probably are due only to my
> "noobness":
> 1 - I'm trying to create a C60 topology using topotools. All the carbons are
> equal (called them CFUL) but there are two different bond types.
> After loading the pdb file, my tcl script looks like this>
> set selc [atomselect top {name C}]
> $selc set type CFUL
> $selc set mass 12.01100
> $selc set charge 0.000 ;
> set sel [atomselect top all]
> topo retypebonds
> topo addbond 0 1 BPENT
> (...)
> topo addbond 0 18 BHEX

that is incorrect syntax. topo addbond currently cannot add a bond
type or bond order.
the only want to do this would be to do:

set blist { {0 1 BPENT} ... {0 18 BHEX} }
topo setbondlist type $blist

> (...)
> topo retypeangles

this has no effect since there are no angles defined yet.

> topo addangle 0 1 2 APENT
> (...)
> topo addangle 1 0 18 AHEX
> (...)

hmmm... looks that the documentation disagrees with the implementation.

> topo retypedihedrals
> topo adddihedral 0 1 2 14 DIHED
> (...)
> the issue arises from the fact that topotools can recognize the angletypes
> as APENT and AHEX, for example, but not the bonds! no matter what I do (mol
> bondsrecalc top, mol reanalyze top), when I ask bondtypenames, it lists me
> 90 different bond types CXX-CYY instead of listing 2, BPENT and BHEX, as it
> does for angles. any clue on this, please?

bonds in VMD are handled (internally) differently than angles,
dihedrals and impropers, that has consequences on what topotools can

> 2 - yesterday I was trying to input some impropers for a given traditional
> molecule with CA, HA, CT and HC atom types. the bonds and angles were nicely
> recognized.
> it guessed lots of dihedrals and I just wanted one of them. i deleted the
> rest.
> but, for impropers, as it should be, vmd's guess was not perfect. then,
> instead of adding all of them by hand, I would expect that typing topo
> retypeimpropers CA-CA-CT-HC, I would have all the impropers formed by these
> atoms indexes listed and added. instead, topotools just ignored me. again,
> any clue on what I'm doing wrong?

that is not what the code is supposed to do. retyping means that all
existing impropers (or dihedrals or angles) are given a new type based
on the atom names. this somewhat follows the way how the CHARMM force
field assigns its force field parameters for bonded interactions. the
topology file (e.g. a .psf file) only contains the sequences of atoms
that make up those topology elements. there are no individual types
assigned. topo retypeXXX hence generates such initial type

in short, your major problem is that you didn't pay enough attention
what the individual commands mean and what they are supposed to do and


> Thank you for your help
> Cheers,
> Hugo
> --
> __________________
> FP7-ITN Marie Curie PhD Fellow
> Équipe de Physique et Chimie des Polymères (EPCP) et de Chimie-Physique
> (ECP)
> Institut des Sciences Analytiques et de Physico-Chimie pour l'Environnement
> et les Matériaux - IPREM
> Université de Pau et des Pays de l'Adour - UPPA
> 2 rue du Psdt. Pierre Angot, 64053, Pau Cedex, France
> +33(0)559407996 (bureau) / +33(0)622151308 (portable)
> Fachbereich Chemie - Institut für Physikalische und Theoretische Chemie
> Eberhard Karls Universität Tübingen
> Auf der Morgenstelle 18, 72076 Tübingen, Deutschland
> Handy: +49(0)176/35039713

Dr. Axel Kohlmeyer
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.