From: Rajan Vatassery (rajan_at_umn.edu)
Date: Tue Dec 13 2011 - 12:46:50 CST

Hi,
        I have been trying to solvate a molecule with CH2Cl2 (the OPLS 3-site
model), but I haven't been able to get the solvate (version 1.3) plugin
to work. My problem is a bit easier than what the solvate plugin is
built for so I am constrained to this plugin.
        Specifically, I have a molecule that I have minimized in vacuum. I know
the dimensions of this molecule (from minmax) so I created a solvent box
that would encompass the molecule with the solvent padding that I
wanted. Ideally I would like to merge the two pdb files together, and
have a simple algorithm to remove close contacts then writepdb and
writepsf. However, I cannot figure out a way to do this. Here's what I
have tried:
*****
Solvate plugin command:

solvate TerthioPSFGEN50_D.psf MDRun50_D.pdb -o solvateD -s CU -minmax
{{-27.30 -27.30 -27.30} {27.3 27.32 27.32}} -x 0 -y 0 -z 0 +x 0 +y 0 +z
0 -b 2 -spdb 3cEqOPLSCH2Cl2.pdb -spsf 3cBoxCH2Cl2.psf -stop
3cEqOPLSCH2Cl2.top -ws 85.976 -ks {{type CH2}}

My files are:
Solute PSF: TerthioPSFGEN50_D.psf
Solute PDB: MDRun50_D.pdb
Solvent PDB: 3cEqOPLSCH2Cl2.pdb
Solvent PSF: 3cBoxCH2Cl2.psf
Solvent topology file: 3cEqOPLSCH2Cl2.top
Side length of the cubic solvent box is: 85.976 A
Each solvent molecule has a segid of QQQ and only one atom of type CH2

This plugin does not seem to work with my solvent because it either does
not encompass the solute with solvent as expected, and if I play around
with the -ws or any of the other dimensions to make the
solvent encompass the solute, I get an error telling me about a bug.
This error comes up (I believe) exclusively when the solvent box is
replicated in a periodic fashion. I have tried just about every
combination of the numerical values in the command line, and nothing
seems to work.

*****
Outside of the solvate.tcl script, I've tried a simple scripting
attempt:

It seems that the operative line in the solvate.tcl script is:
set sel [atomselect top "segid QQQ and $keysel and same residue as \
                   (x < $xmin or x > $xmax or \
                    y < $ymin or y > $ymax or \
                    z < $zmin or z > $zmax or \
                    within $rwat of (not segid QQQ))"]

so I tried to duplicate the "within" portion of this. What I realized is
that I think it is impossible to get two different IDs to interact with
each other.
        I first loaded VMD with the command:
vmd MDRun50_D.pdb TerthioPSFGEN50_D.psf
and then I loaded the files 3cEqOPLSCH2Cl2.pdb and 3cBoxCH2Cl2.psf with
the "new molecule" GUI tool. This gave me the solute (MDRun50_D.pdb with
ID 0) and the solvent (3cEqOPLSCH2Cl2.pdb with ID 1) in the same VMD
Main window.
        Is there any way that I can write the command:
set sel [atomselect 1 "within 2 of molid 0"]
in some other fashion? In the solvate.tcl script, line:
within $rwat of (not segid QQQ)
seems to be doing exactly what I need, but because the two PDBs are in
different IDs, I cannot use the same syntax. Am I stuck merging the
files by hand and then doing this elimination myself? I'll post all the
relevant files on
http://www.tc.umn.edu/~rajan/VMD-l.html
in a few minutes.

Thanks for any help I can get.

Rajan