Dear Rick,

So if I understand well, the best solution is if I generate a pdb file which contains 1 NO molecule with coordinates and than I should translate them in every loop cycle. In order to do this I have modified the addions.str in the following way:

read sequ no @ICL
generate no noang nodihe first none last none
coor set xdir -0.031 ydir 4.923 zdir 17.073 sele atom NO * OM end
coor set xdir -0.183 ydir 5.621 zdir 16.975 sele atom NO * N end
coor set xdir 0.064 ydir 4.485 zdir 17.134 sele atom NO * O 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 N end
coor trans xdir ?XAVE ydir ?YAVE zdir ?ZAVE sele atom NO @K OM end
coor trans xdir ?XAVE ydir ?YAVE zdir ?ZAVE sele atom NO @K N end
coor trans xdir ?XAVE ydir ?YAVE zdir ?ZAVE sele atom NO @K O end
delete atom sele .byres. targ end sort ! REMOVE THE WATER MOLECULE
incr k by 1
if k .le. @ICL goto ilp


return


Now this script works, replaces the 188 NO molecules with real coordinates of each of the atoms, but several of this newly built molecules are out of the water box. Do You have any suggestion why happens this?

Thank You in advance,
Aniko

Last edited by Aniko Labas; 05/28/15 08:06 AM.