From: Olya Kravchenko (ovkrav_at_gmail.com)
Date: Wed Jan 06 2016 - 15:51:47 CST

Hi all,

I am trying to remove water molecules from inside the membranes after
solvating the system, and now I am stuck at selecting the right
criteria for removal. I'd very much appreciate your advice.

My system consists of two parallel 150x150 POPC membrane bilayers (one
is shifted by ~70A along the z axis in comparison with the other, i.e.
the distance between them is roughly 15-20A) and a symmetrical protein
that spans across both. I want to delete water molecules from the
inside of the membranes but leave the ones that are located in the
intermembrane space between the two.

Here is a script that I use:

package require solvate
solvate my_file.psf my_file.pdb -o TEMP_solvate -b 1.5 -minmax {{-46
-45 -97} {99 100 28}}
set all [atomselect top all]
$all set beta 0
set seltext1 "segid WT1 to WT99 and same residue as (z > 0 and abs(z) < 25)"
set seltext2 "segid WT1 to WT99 and same residue as (within 3 of protein)"
set sel1 [atomselect top $seltext1]
set sel2 [atomselect top $seltext2]
$sel1 set beta 1
$sel2 set beta 1
set badwater [atomselect top "name OH2 and beta > 0"]
set seglist [$badwater get segid]
set reslist [$badwater get resid]
mol delete all
package require psfgen
resetpsf
readpsf TEMP_solvate.psf
coordpdb TEMP_solvate.pdb
foreach segid $seglist resid $reslist {
delatom $segid $resid
}
writepdb solvated_my_file.pdb
writepsf solvated_my_file.psf

This deletes water only from the upper membrane.

I tried different combinations of numbers and selection criteria but I
still can't get the right distribution of water. For example, when I
add the line:

set seltext3 "segid WT1 to WT99 and same residue as (z < 0 and abs(z) < 25)"

the result is the same, only the upper part gets deleted.

If I change selection to include x and y values in the following way:

set seltext1 "segid WT1 to WT99 and same residue as (z > 0 and abs(x)
< 99 and abs(y) < 100)"
set seltext2 "segid WT1 to WT99 and same residue as (z < 0 and abs(x)
< 99 and abs(y) < 100)"
set seltext3 "segid WT1 to WT99 and same residue as (within 3 of protein)"

then all water gets deleted (i.e. water molecules that were added
during solvation).

If I tried a number of combinations for z (such as (z < 0 and z > 10),
etc.) I get similar results as above, i.e. either everything is
removed, or only half is removed and the other half is ignored.

Is there a proper way to figure out the right criteria?

Thanks in advance!!

Olga