From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Sep 21 2015 - 08:20:25 CDT

On Mon, Sep 21, 2015 at 8:06 AM, Frank Zack <frankzack123_at_remove_yahoo.de>
wrote:

> Hi All,
>
> I've encountered a problem trying to merge 2 different moleculues
> (All-atom representation, class2 force-field) into a single one...
> I've provided both *.psf and *.pdb files for each molecule (reading the
> molecule with topo readlammpsdata, creating psf by "animate write psf
> mol1.psf" and creating pdb with "set m1 [atomselect top all]; $m1 writepdb
> mol1.pdb"...)
>
> Then I proceeded according to the tutorial:
>
> package require topotools 1.1
> # load to be merged molecules into VMD
> set midlist {} set mol [mol new part1.psf waitfor all]
> mol addfile part1.pdb
> lappend midlist $mol set mol [mol new part2.psf waitfor all]
> mol addfile part2.pdb lappend midlist $mol
> # do the magic
> set mol [::TopoTools::mergemols $midlist]
> animate write psf merged.psf $mol
> animate write pdb merged.pdb $mol
>
> It seems to work. But if I now try to write a lammps data-file (topo
> writelammpsdata) there's only 1 bond-type, 1 angle-type, 1 dihedral-type
> and 1 improper-type...As a consequence my bonds section looks like
>
> 1 1 1 10
> 2 1 1 4
> 3 1 1 2
> ...
> 268717 1 268816 268818
> 268718 1 268816 268819
>
> ,where the 2nd column represents the bond-type. As you can see the
> bond-type is 1 for all bonds, irrespective of the actual bond-types as
> defined in the original lammps data-files (and psf-files, i guess). Is
> mergemol intended to work like that or did i make a mistake?
> The only way I can think of "reconstructing" the proper types is to write
> my own script and change the bond-,angle-,dihedral- and improper-types
> according to the corresponding atom-types. However I'm not sure yet if
> mergemols re-sorts the atom-types or if it just keeps the original ones..--e89a8ffbab7f93d2c8052041be8b--