compute com/molecule error

Dear Alex,
I would like to follow up on your message.
According to the topo manual no parameters such as pair coeffs are written out using writelammmpsdata.
Instead what I found are lines such as

1 1

2 10

3 11

.
.
.
Does this have a specific meaning?
Could you please elaborate how all the data ended up in the example you provided?
Thank you very much,
Markus

Sorry: I meant Axel.
Markus

Dear Alex,
I would like to follow up on your message.
According to the topo manual no parameters such as pair coeffs are written
out using writelammmpsdata.

yes.

Instead what I found are lines such as
# 1 1
# 2 10
# 3 11

these are comments. they are added to highlight
how atom, bond, angle, dihedral and other types are mapped
from the data VMD knows about (which can be a string)
to the numerical ids that LAMMPS requires. if you do a
topo retypebonds for example a bond between atom type 1
and type 2 will be listed as bondtype "1-2"

i am thinking about ways how i can have it that the numerical
types are preserved when you are not building a topology from
scratch but are reading, manipulating and writing back a lammps
data file. the scripts that the core of the topotools plugin is based
on were written to deal with three character atom types that we
use in our coarse grain model. and then these comments can
be extremely helpful.

Does this have a specific meaning?
Could you please elaborate how all the data ended up in the example you
provided?

i did roughly the following (from memory, so please excuse typos):

topo readlammpsdata data.tp full
set sel [atomselect top all]
$sel set resid [$sel get fragment]

# this will assign molecule ids, but fragment is indexed from 0
# so this needs to be fixed.

set sel2 [atomselect top {fragment 0}]
set lastid [llength [lsort -integer -unique [$sel get fragment]]]
$sel2 set resid $lastid

# ...and write it out

topo writelammpsdata data.tp-fixed full

i then checked those comments and saw that
the atom type mapping was preserved, but not
bonds, angles and so on.

so i took a text editor, read in your data file
deleted the Atoms section, and copied over the
new and fixed Atoms section.

does that help?

cheers,
    axel.
section and copied it

Sorry: I meant Axel.

no problem. my brain uses a "sed -e s/Alex/Axel/" filter by default.
about 30% of all people seem to mix those up, at least initially.
i am used to it.

cheers,
    axel.