From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Tue Aug 11 2015 - 09:48:47 CDT

Hi Ash,

Is there a particular reason they need to have different segment names?
There are multiple ways of solving this problem. One is just to rename
the segments using atomselections, so something like:

mol load file2.psf file2.pdb
set sel [atomselect top "segname X"]
$sel set segname Y
set all [atomselect top "all"]
$all writepsf newfile2.psf

The other is to use topotools to do the merging if you don't care about
the result having distinct segnames. See
http://www.ks.uiuc.edu/Research/vmd/plugins/topotools/. You'll want
mergemols at the very bottom, which gives an example of how to use it.

-Josh Vermaas

On 08/10/2015 07:29 PM, Ash Johnson wrote:
> Hello,
>
> I am writing a TCL script that involves merging two structures. When there are no conflicting segment names, I can use
>
> ::MergeStructs::mergeMolecules {file1.psf file1.pdb} {file2.psf file2.pdb} output
>
> to merge them. However, I would like to merge two nearly-identical sections of membrane (generated with the membrane builder) that are translated away from each other. When using the GUI for MergeStructs, it recognizes the conflict and allows me to add a prefix for the segments, but currently those functions are not called in mergeMolecules. What is the best way to go about implementing this in my script?
>
> Thanks,
> Ash
>