From: Axel Kohlmeyer (
Date: Tue Mar 09 2010 - 13:24:49 CST

hi alexandre,

On Tue, Mar 9, 2010 at 1:24 PM, Alexandre Suman de Araujo
<> wrote:
> Hi all.
> Is it possible to use MergeStructs plugin in Tk console or scripts?


> If yes, which is the sintax should I use?

package require megstructs 1.0
namespace import Mergestructs::*

mergestructs {file1.psf file1.pdb} {file2.psf file2.pdb} file3

that would require having the two molecules as external files.

if you want to do this with internal data (perhaps after modifying
bonding or atom types/names/coordinates) you can also try

package require topotools 1.0
namespace import TopoTools::mergemols

set newmol [mergemols {0 1 2}]

animate write psf file3.psf $newmol
animate write pdb file3.pdb $newmol

there are a few small improvements in the topotools package
since vmd 1.8.7, so if you don't want to update to the latest
VMD alpha version, you can download the updated package
by itself from

mergestructs uses psfgen and topotools uses the internal
information that VMD has after loading a psf or similar topology
format. so depending on what you are doing one of the two
may be the better solution.


> Cheers
> --
> **************************************************************
> Alexandre Suman de Araujo                                    *
> Faculdade de Ciências Farmacêuticas de Ribeirão Preto        *
> Universidade de São Paulo                                    *
> Dep. de Física e Química                                     *
> Grupo de Física Biológica     * e-mail:*
> Av. do Café, s/n°             * e-mail:  *
> CEP: 14040-903                * Phone: +55 (16) 3602-4172    *
> Ribeirão Preto, SP, Brasil    * Phone: +55 (16) 3602-4222    *
> **************************************************************

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