Topic Options
#2364 - 08/02/04 10:14 AM non rectangular box
beginner Offline
Forum Member

Registered: 07/19/04
Posts: 165
Hi All,

Please suggest me the input script to build a water box angles of 90 90 and 60 degrees!!!!


Thx in advance.


Top
#2365 - 08/02/04 01:40 PM Re: non rectangular box [Re: beginner]
BRBrooks Offline

Forum Member

Registered: 09/02/03
Posts: 394
Loc: Rockville, Maryland
Please look at crystl.doc

You want the "HEXA" (hexagonal) unit cell if you want the angles to be fixed.

Top
#2366 - 08/03/04 04:55 AM Re: non rectangular box [Re: BRBrooks]
beginner Offline
Forum Member

Registered: 07/19/04
Posts: 165
Dear Professor Brooks,

Thank you very much for your response and suggestion.

I have just started to learn charmm. I feel very confused on charm command up to now.
I want to construct a water box with a = b # c in length and a = b = 90 degree and c = 60 degree in angle. After that my structure will be immersed in a water box and will be simulated on periodic boundary condition using images file.

Following is my input file; it is assumed that RTF and PARAM files have been opened and read

READ COOR CARD FREE
* The coordinates for the water molecule
*
3
1 1 TIP OH2 .00000 .06577 .00000
2 1 TIP H1 .75902 -.52198 .00000
3 1 TIP H2 -.75907 -.52195 .00000

set 1 1
set 2 3.27926
label line

gene so@1 duplicate solv
coor duplicate sele segid solv end sele segid so@1 end
coor trans xdir @2 sele segid so@1 end

incr 1 by 1
incr 2 by 3.27926
if 1 le 14 goto line

set 1 1
label 2line
join solv so@1 renumber
incr 1 by 1
if 1 le 14 goto 2line

open write unit 12 card name "water_line.pdb"
write coor pdb unit 12
close unit 12


set 1 1
set 2 1.8933
label plane


gene so@1 duplicate solv
coor duplicate sele segid solv end sele segid so@1 end
coor trans ydir @2 sele segid so@1 end


incr 1 by 1
incr 2 by 3.104
if 1 le 9 goto plane


set 1 1
label 2plane
join solv so@1 renumber
incr 1 by 1
if 1 le 9 goto 2plane


open write unit 12 card name "water_plane.pdb"
write coor pdb unit 12
close unit 12


set 1 1
set 2 3.104
label box

gene so@1 duplicate solv
coor duplicate sele segid solv end sele segid so@1 end
coor trans zdir @2 sele segid so@1 end

incr 1 by 1
incr 2 by 3.104
if 1 le 9 goto box

set 1 1
label 2box
join solv so@1 renumber
incr 1 by 1
if 1 le 9 goto 2box

!coor orient

open write unit 12 card name "water_box.pdb"
write coor pdb unit 12
close unit 12

coor stat

stop


;( I have no idea how to set the angel to solve my problem.

Any way, to construct a water box by using crystal option in charm, it is not necessary to define the position (coordinate) of the water (ie read…water.crd on the1st step), is it?


Thank you in advance.

Top
#2367 - 08/09/04 10:01 AM Re: non rectangular box [Re: beginner]
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
There is no need to construct all the atom positions for all individual water molecules, you can start with a box of water and adapt it to your needs. See eg solvent-box.str in the Script Archive forum.
To obtain coordinates for a non-orthorombic unit cell you can start from an orthorombic system (or any other geometry if you like), which is large enough to completely enclose the system you want to end up with. Then define your crystal and delete atoms outside the final primary box, like this:
code:

crystal define ....
crystal build cutoff 14.0
image byres sele segid wat end
coor copy comp
update cutim 14.0 !
! find and delete atoms that have changed position -
! they are outside the primary box
coor diff comp
scalar xcomp ipow 2
scalar xcomp store 1
scalar ycomp ipow 2
scalar ycomp +store 1
scalar zcomp ipow 2
scalar zcomp +store 1
scalar wcomp recall 1
delete atom sele .byres. prop wcomp .gt. 0.0 end


_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#2368 - 08/17/04 04:52 AM Re: non rectangular box [Re: lennart]
beginner Offline
Forum Member

Registered: 07/19/04
Posts: 165
Dear Professor Lennart Nilsson,

Thanks you very much for your suggestion.

Yours sincerely,

Top

Moderator:  John Legato, lennart