Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
solvent-box.str
#424 10/23/03 10:52 AM
Joined: Sep 2003
Posts: 4,829
Likes: 3
lennart Online Content OP
Forum Member
OP Online Content
Forum Member
Joined: Sep 2003
Posts: 4,829
Likes: 3
*NAME: solvent-box.str
*PURPOSE: make a TIP3 box with user-defined edges, and make room for solute
*AUTHOR: Lennart Nilsson, Karolinska Institutet (October 7, 2003)
* THERE IS NO ERROR CHECKING IN THIS FILE
*
!NB! The following CHARMM error message indicates that at some stage during
! the construction process CHARMM's maximum number of residues is exceeded.
! Try again with a somewhat smaller system, or use a larger CHARMM version
!(LARGE instead of MEDIUM, or XXLARGE if LARGE is insufficient)
!***** LEVEL -4 WARNING FROM *****
!***** DATA STRUCTURE REALLOCATED IN ALLDT
!******************************************

!ASSUMPTIONS:
! The psf and coordinates of the solute are present
! A selection "SOLUTE" defining the solute has been made
! (define solute sele ... end)
! There is no segment present with segid WAT, WAT0, WAT1, WAT2 or WAT3
! XSIZ, YSIZ and ZSIZ have been s set to the desired box dimensions
! Uses $CHM_STREAM/read-watbox.str to get coordinates for primary water box
! Unix environment variable CHM_STREAM points to directory containing these
! scripts
!RESULT:
! At return there will be a new segment named WAT containing TIP3 water
! molecules ! that have their oxygen atom in the box, and not overlapping
! with the solute.
! The system is centered at the origin, with the main axis of inertia of the
! SOLUTE! along the x-axis. For the deletion of overlapping waters only
! heavy solute atoms and water oxygens are considered; overlap distance
! criteria are defined below
! No other manipulations (minimizations etc) are performed on the system;
! bomblevel is set to -2 to avoid stopping at empty selections or
! empty segments

!USAGE EXAMPLE:
!read rtf card name /applic/charmm/toppar/top_all22_prot.inp
!read para card name /applic/charmm/toppar/par_all22_prot.inp
!read psf card name my_structure.psf
!read coor card name my_structure.crd
!set XSIZ 27.0
!set YSIZ 30.0
!set ZSIZ 35.0
!define SOLUTE sele segid prot .or. segid dna1 .or. segid dna2 end
!stream $CHM_STREAM/solvent-box.str
!! here you may want to add some boundary potential
!cons harm force 50.0 sele SOLUTE end
!mini sd nstep 50
!mini abnr nstep 50
!. . .
!LOCAL VARIABLES:
! XTR,YTR,ZTR,XNUM,YNUM,ZNUM,BOX,XB2,YB2,ZB2
! NW0,NROD,NSLAB,OVERLAP,OVERAP2,I
!Defines selection SOLUTE1
! distance to use when deleting waters that overlap with the solute
! possibly different for second overlay of slightly shifted/rotated slab
set OVERLAP 2.2
set OVERLAP2 2.2
! solvation will be done by sliding a slab of TIP3 along the x-axis
! the water box we start with is a cube with 18.856A side containing 216 TIP3
set BOX 18.856
set NW0 216
! for the water-deletions we will use only the heavy atoms of the solute
define SOLUTE1 sele SOLUTE .and. .not. hydrogen end
! set bomblevel to -2 to avoid stopping on empty selections or empty segments
bomb -2

! begin calculations
! place SOLUTE along xaxis centered at (XSIZ/2,YSIZ/2,ZSIZ/2) in first octant so
! we can easily move our box around to cover the solute
calc XB2 = @XSIZ / 2.0
calc YB2 = @YSIZ / 2.0
calc ZB2 = @ZSIZ / 2.0
coor orient sele SOLUTE end
coor trans xdir @XB2 ydir @YB2 zdir @ZB2

calc XNUM = INT(@XSIZ / @BOX + 1)
calc YNUM = INT(@YSIZ / @BOX + 1)
calc ZNUM = INT(@ZSIZ / @BOX + 1)

! number of water molecules in a rod and in a slab
calc NROD = @NW0 * @YNUM
calc NSLAB = @ZNUM * @NROD

!generate one rod of boxes along Y-axis
read sequence tip3 216
gene wat0 noangle nodihe
stream $CHM_STREAM/read-watbox.str
! put it in the first octant
coor stat sele segid wat0 .and. .not. hydrogen end
calc XTR = - ?XMIN
calc YTR = - ?YMIN
calc ZTR = - ?ZMIN
coor trans xdir @XTR ydir @YTR zdir @ZTR sele segid WAT0 end

read sequence tip3 216
gene wat noangle nodihe
coor dupl sele segid wat0 end sele segid wat end

if YNUM .eq. 1 goto do_z
! loop over the remaining 2 to NUM boxes in the rod
set I 2
label yloop
read sequence tip3 216
gene wat1 noangle nodihe
coor dupl sele segid wat0 end sele segid wat1 end
coor transl ydir @BOX sele segid wat1 end
coor transl ydir @BOX sele segid wat0 end
join wat wat1 renumber
incr I by 1
if I le @YNUM goto yloop

! done with the rod, make a slab perpendicular to X-axis
label DO_Z
! wat0 is no longer needed
delete atom sele segid wat0 end
if ZNUM .eq. 1 goto do_x
rename segid wat0 sele segid wat end
read sequence tip3 @NROD
gene wat noangle nodihe
coor dupl sele segid wat0 end sele segid wat end

set I 2
label ZLOOP
read sequence tip3 @NROD
gene wat1 noangle nodihe
coor dupl sele segid wat0 end sele segid wat1 end
coor transl zdir @BOX sele segid wat1 end
coor transl zdir @BOX sele segid wat0 end
join wat wat1 renumber
incr I by 1
if I le @ZNUM goto zloop

! done with the slab, now let it slide along the x-axis, after centering everything at orig
label DO_X
delete atom sele segid wat0 end
rename segid wat0 sele segid wat end

coor transl xdir -@XB2 ydir -@YB2 zdir -@ZB2

read sequence tip3 @NSLAB
gene wat2 noangle nodihe
coor dupl sele segid wat0 end sele segid wat2 end
! delete water molecules further away than XB2, YB2, ZB2 A from origin
delete atom sele .byres. ( segid wat2 .and. type OH2 .and. -
( property abs x .gt. @XB2 .or. property abs y .gt. @YB2 -
.or. property abs z .gt. @ZB2) ) end
! and also those overlapping with the SOLUTE
delete atom sele .byres. ( segid wat2 .and. type OH2 .and. -
( SOLUTE1 .around. @OVERLAP ) ) end
! do the same slab again, but translated -1A and rotated 30 degrees around the x-axis
read sequence tip3 @NSLAB
gene wat3 noangle nodihe
coor dupl sele segid wat0 end sele segid wat3 end
coor rota xdir 1.0 phi 30.0 sele segid wat3 end
coor transl xdir -1.0 sele segid wat3 end
! delete water molecules further away than XB2, YB2, ZB2 A from origin
delete atom sele .byres. ( segid wat3 .and. type OH2 .and. -
( property abs x .gt. @XB2 .or. property abs y .gt. @YB2 -
.or. property abs z .gt. @ZB2) ) end
! and also those overlapping with the SOLUTE or existing WAT2 segment
delete atom sele .byres. ( segid wat3 .and. type OH2 .and. -
( (SOLUTE1 .or. (segid wat2 .and. type OH2)) .around. @OVERLAP2 ) ) end
join wat2 wat3 renumber

if XNUM .eq. 1 goto done

set I 2
label XLOOP
read sequence tip3 @NSLAB
gene wat3 noangle nodihe
coor dupl sele segid wat0 end sele segid wat3 end
coor transl xdir @BOX sele segid wat3 end
coor transl xdir @BOX sele segid wat0 end
! delete water molecules further away than XB2, YB2, ZB2 A from origin
delete atom sele .byres. ( segid wat3 .and. type OH2 .and. -
( property abs x .gt. @XB2 .or. property abs y .gt. @YB2 -
.or. property abs z .gt. @ZB2) ) end
! and also those overlapping with the SOLUTE
delete atom sele .byres. ( segid wat3 .and. type OH2 .and. -
( SOLUTE1 .around. @OVERLAP ) ) end
join wat2 wat3 renumber
! do the same slab again, but translated -1A and rotated 30 degrees around the x-axis
read sequence tip3 @NSLAB
gene wat3 noangle nodihe
coor dupl sele segid wat0 end sele segid wat3 end
coor rota xdir 1.0 phi 30.0 sele segid wat3 end
coor transl xdir -1.0 sele segid wat3 end
! delete water molecules further away than XB2, YB2, ZB2 A from origin
delete atom sele .byres. ( segid wat3 .and. type OH2 .and. -
( property abs x .gt. @XB2 .or. property abs y .gt. @YB2 -
.or. property abs z .gt. @ZB2) ) end
! and also those overlapping with the SOLUTE or existing WAT2 segment
delete atom sele .byres. ( segid wat3 .and. type OH2 .and. -
( (SOLUTE1 .or. (segid wat2 .and. type OH2) ).around. @OVERLAP2 ) ) end
join wat2 wat3 renumber
incr I by 1
if I le @XNUM goto xloop

label DONE
delete atom sele segid wat0 end
rename segid wat sele segid wat2 end
return

Last edited by lennart; 05/24/05 06:27 PM.

Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: solvent-box.str
lennart #425 09/10/04 09:41 AM
Joined: May 2004
Posts: 222
C
Forum Member
Offline
Forum Member
C
Joined: May 2004
Posts: 222
"
! distance to use when deleting waters that overlap with the solute
! possibly different for second overlay of slightly shifted/rotated slab
set OVERLAP 2.2
set OVERLAP2 2.2
"

May i ask how was 2.2A for water rationalised?

Re: solvent-box.str
chuan #426 09/10/04 10:53 AM
Joined: Sep 2003
Posts: 4,829
Likes: 3
lennart Online Content OP
Forum Member
OP Online Content
Forum Member
Joined: Sep 2003
Posts: 4,829
Likes: 3
This is not a sacred number, feel free to change it. From experience this is a reasonable magnitude, giving a nearly correct density - ie, volume changes in the system are small and relax rapidly if you run a constant pressure simulation.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: solvent-box.str
lennart #427 09/13/04 03:47 AM
Joined: May 2004
Posts: 222
C
Forum Member
Offline
Forum Member
C
Joined: May 2004
Posts: 222
Thanks.

For others who are looking at this, what are the values that you might be using?

The OH bond in ' The nature of the chemical bond' states 0.96A to 1.02 A. Probably, that was used as a reference?

Re: solvent-box.str
lennart #428 09/23/05 02:18 AM
Joined: Mar 2005
Posts: 42
L
Forum Member
Offline
Forum Member
L
Joined: Mar 2005
Posts: 42
Hello!!!

I used your script to solvate my protein and i have found some weird features in the solvated system. I am able to see lines of less density inside my box, Y can see the copies of the solvent box. I dont understand exacly how your script solvate the system, so I try to changue some values to have an homogeneous density box. I changue OVERLAP and OVERLAP2 to a smaller value, nevertheless, the line is still in place and the solvent seems to be more densely packaged. Regarding these, I would like to ask how to avoid having a solvent media with zones of less density in the boundary of the solvent boxes. And the second one is how to solvate the system with water of different density. I have make solvent boxes with desired density using the program packmol, and I though that using that boxes instead the one in this forum would allow this. But I am not sure if your algorithm makes the solvent density to be of a predefined value.

Thanks


Leonardo Sepulveda Durán Universidad de Chile
Re: solvent-box.str
Leonardo #429 09/23/05 07:12 AM
Joined: Sep 2003
Posts: 4,829
Likes: 3
lennart Online Content OP
Forum Member
OP Online Content
Forum Member
Joined: Sep 2003
Posts: 4,829
Likes: 3
The build-up procedure may well lead to some inhomogeneities along borders of the basic box used; I have not tried to optimize this, but the resulting system is not meant to be used for any analysis, it needs to be equilibrated, which should quickly take care of this. The target density is that of the initial box which is about 1000 kg/m**3. Due to difficulties in computing the protein volume it may not be so easy to provide a very exact number for the density in the final system. The pressure is easier to control.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: solvent-box.str
lennart #430 06/20/06 03:38 PM
Joined: Jan 2006
Posts: 19
V
Forum Member
Offline
Forum Member
V
Joined: Jan 2006
Posts: 19
Hi Lennart,
I have found your scripts really useful and sorry in advance if my question is too basic.
I used your solvent-box.str file and I got:
1) only the core of my protein hydrated
2) the protein atoms coordinates changed.
Actually my box is too small to hydrate the whole structure, I would need a bigger one.
I unsuccessfully modified XSIZ, YSIZ and ZSIZ value in the input file getting always the following fatal error:
“a counter variable has exceeded its maximum allowable value”
I don’t know what to do.

Any help is really appreciated

Regards
Vittorio

Re: solvent-box.str
victor25 #431 06/20/06 05:47 PM
Joined: Sep 2003
Posts: 8,580
Likes: 11
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,580
Likes: 11
You may need to use another CHARMM executable that was compiled with a larger atom limit; the CHARMM banner printed at startup indicates the version and the atom limit.


Rick Venable
computational chemist

Re: solvent-box.str
lennart #432 06/06/08 07:40 PM
Joined: Jan 2005
Posts: 86
M
Forum Member
Offline
Forum Member
M
Joined: Jan 2005
Posts: 86
Dear Prof. Nilson

When I try to use this script for a smaller box size it works fine but when I use a larger box (which is what I need for my system) I am getting the "string too small" error! I searched through the forum and found out that I need to break down the wat string into smaller strings. Although I understand the script but still I am not able to do it successfully. Would you please tell me how can I proceed with that and overcome this error?

I also tried the other way mentioned in the forum i.e. of changing util/selcta.src ATTYP CHARACTER*4 to CHARACTER*8, and recompiled charmm with xxlarge option and I still don't get rid of this problem.

Kindly suggest me something.

regards,
MzZt.

Re: solvent-box.str
mzzt #433 06/06/08 08:07 PM
Joined: Sep 2003
Posts: 8,580
Likes: 11
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,580
Likes: 11
How many water molecules? Which version of CHARMM?

I am highly skeptical that the ATTYP change is related in any way to the problem you are having. Mostly, these problems tend to come from input script errors, or from trying to import PDB files for the water coordinates.

Page 1 of 2 1 2

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.3.31-1~deb10u1 Page Time: 0.013s Queries: 35 (0.008s) Memory: 0.7820 MB (Peak: 0.8824 MB) Data Comp: Off Server Time: 2021-12-01 00:36:55 UTC
Valid HTML 5 and Valid CSS