Dear Users,

At first, thank You this really useful script!

I have modifed this 'addions.str' script, because I would like to replace the water molecules with NO gas molecules. Now it looks like this:

! INITIALIZE CHLORIDES; COORDS SET 0,0,0
read sequ no @ICL
generate no noang nodihe first none last none
coor set xdir 0.0 ydir 0.0 zdir 0.0 sele segid no end

! PICK A WATER MOLECULE AND REPLACE IT WITH A CHLORIDE ION
set k 1
label ilp
define xcld sele ( @SOL ) .or. segid NO end ! EXCLUDED SEGMENTS
define prox sele xcld .around. @MND end ! NEARBY EXCLUDED ATOMS
define list sele atom SOLV * OH2 .and. .not. prox end ! WATERS NOT NEARBY
calc in int( ?RAND * ?NSEL ) ! RANDOM INTEGER, BASED ON WATER COUNT
if in .lt. 1 set in ?NSEL ! CHECK FOR ZERO, CHANGE TO MAX VALUE
define targ sele list .subset. @IN end ! PICK WATER VIA RANDOM INDEX
coor stat sele targ end ! GET OH2 ATOM COORDS, ASSIGN TO CHLORIDE
coor set xdir ?XAVE ydir ?YAVE zdir ?ZAVE sele atom NO @K NO end
delete atom sele .byres. targ end sort ! REMOVE THE WATER MOLECULE
incr k by 1
if k .le. @ICL goto ilp


return

When I try with this one, a warning level occurs in the 'loop*.log' file:

CHARMM> coor set xdir ?XAVE ydir ?YAVE zdir ?ZAVE sele atom NO @K NO end
Parameter: K -> "1"
RDCMND substituted energy or value "?XAVE" to "33.118"
RDCMND substituted energy or value "?YAVE" to "6.324"
RDCMND substituted energy or value "?ZAVE" to "17.03"
SELRPN> 0 atoms have been selected out of 32947

***** LEVEL 0 WARNING FROM *****
***** ZERO ATOMS SELECTED
******************************************
BOMLEV ( -1) IS NOT REACHED. WRNLEV IS 5

SELECTED COORDINATES SET IN THE MAIN SET.

My NO residue is a three-site gas model:
RESI NO 0.000
GROUP
ATOM OM LP 0.595
ATOM N NO -0.250
ATOM O ON -0.345
BOND N O
ACCEPTOR O
ACCEPTOR N
PATCHING FIRS NONE LAST NONE


Can anyone explains me why CHARMM can not do the selection?

Thank You in advance,
Aniko

Last edited by Aniko Labas; 05/27/15 07:35 PM.