From: Ashish .Chauniyal (ashishchauniyal_at_gmail.com)
Date: Wed Apr 16 2014 - 10:07:00 CDT

Dear all,

I have to merge two .pdb files into one and make a lammps data file out of
it. Please can someone find what am I doing wrong, my TCL console says
invalid command name "x" this x keeps on changing and I cant pinpoint where
the error is. Here is the code.

#topotools is already included

mol new MG.xyz
set Cusel [atomselect top "name H"]
$Cusel set name Cu
$Cusel set mass 63.54
set Zrsel [atomselect top "name He"]
$Zrsel set name Zr
$Zrsel set mass 91.224

set all [atomselect top "all"]
$all writepdb leftside.pdb

$all moveby {80.0 0.0 0.0}
$all writepdb rightside.pdb

#merging the two files
set solute [mol new leftside.pdb]
set solvent [mol new rightside.pdb]
set combined [::TopoTools::mergemols "$solute $solvent"]

$combined writepdb combine.pdb
topo writelammpsdata data.composite atomic