Topic Options
#415 - 10/23/03 06:51 AM setup-truncated-octahedron.str
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
*FILENAME: setup-truncated-octahedron.str
*PURPOSE: setup truncated octahedron system
*AUTHOR: Lennart Nilsson, Karolinska Institutet, October 2003; overhauled January 2005
*
!RESULTS:
! Sets up crystal, defines basic image centering, which may have to be adjusted for production use
! Deletes all residues with at least one non-hydrogen atom outside the truncated octahedron.
! The truncated octahedron is centered at the origin and fits exactly in a cube with side A
!The same procedure can be used to generate any crystal - just change the crystal define command
!ASSUMPTIONS:
! PSF and coordinates from a system at least as large as the truncated octahedron
! have to be present
! Coordinates should be centered at the origin
! One parameter is necessary: A, which is the sidelength of the cube in which the TO fits
! Selection SOLUTE should be defined as non-solvent (will not be subject to image centering)
! Comparison coordinates and WCOMP are overwritten

!USAGE EXAMPLE:
!
!read rtf,para,psf,coor for solvated system according to assumption above
!set A 40
!define SOLUTE select .not. segid wat end
!stream setup-truncated-octahedron.str
!! then minimize and run eg CPT dynamics or just standard NVE
!shake bonh param
!dynamics start ....
!! for subsequent jobs the crystal and image centering have to be setup again

calc ax = @a * sqrt (0.75)
set b 109.4712206344907
!! Define the crystal.
crystal define octahedral @ax @ax @ax @b @b @b
crystal build cutoff 14.0
image byresidue select .not. SOLUTE end
! done with crystal and image centering definitions, now do the trimming of the system to
! fit in the desired primary shape.
coor copy comp
update cutim 14.0
! find and delete residues that have changed position,
! they are the ones that are outside the primary box
coor diff comp
coor dist comp weig
delete atom sele .byres. prop wcomp .gt. 0.0 end

return



Edited by lennart (01/20/05 05:28 AM)
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#416 - 12/08/04 01:04 AM Re: setup-truncated-octahedron.str [Re: lennart]
chuan Offline
Forum Member

Registered: 05/17/04
Posts: 222
I m not sure if this script is understood. Right before the small script component below, we have a ready protein in waterbox with multiple water segid e.g. WAT2, WAT5, etc.

BOX was set to 70.But when i run the component below, we have a final octahedral of about 18A. Parameter A was founded also to have a value of 18A. Most of my protein residues are and water molecules are lost.

Can someone enlighten me?

set A @BOX ! parameters required for setup-truncated-octahedron.str
stream $CHM_STREAM/setup-truncated-octahedron.str
calc ax = @A * sqrt (0.75) ! required for crystal facilities
set b 109.4712206344907 ! same
coor conv align symm @ax @ax @ax @b @b @b

! save coordinates and psf
! C write psf card name @FILE-solv.psf
! * @FILE with crystal waters solvated with TIP3 waters, setup from top_all22_prot
! *
! write coor card name @FILE-solv.crd
! * @FILE with crystal waters solvated with TIP3
! * in rectangular box: @XSIZ x @YSIZ x @ZSIZ
! *

! save the PSF and coordinates for later use
open write formatted unit 27 name @FILE-solv.psf
write psf card unit 27
* with crystal waters solvated with TIP3 waters, par lipid-prot 27
*


open unit 1 write card name @FILE-solv.pdb
write coor pdb unit 1
* @FILE for viewing
* in rectangular box: @XSIZ x @YSIZ x @ZSIZ
*


! save size to file so we can reuse it
write title name @FILE-box-size.str
** PBC box definition for @FILE simulation
**
*set XSIZ @XSIZ
*set YSIZ @YSIZ
*set ZSIZ @ZSIZ
*set A @A
*return
*
_________________________
CHARMM 30b1 driven by 1/ Xeon (32 bits) 2/ Redhat 7.3 (32 bits) with a Quadrics-modified 2.4-18-5 kernel 3/ Chuan, with 95% of the mentorship coming from great scientists frequenting this forum. 4/ Gracious support from the forum.

Top
#417 - 12/08/04 02:55 AM Re: setup-truncated-octahedron.str [Re: chuan]
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
Curious. There is nothing in the original script that changes variable A. If you post the output produced by:
set A @BOX
stream $CHM_STREAM/setup-truncated-octahedron.str

it may clarify matters.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#418 - 12/08/04 08:13 PM Re: setup-truncated-octahedron.str [Re: lennart]
chuan Offline
Forum Member

Registered: 05/17/04
Posts: 222
You are right on.
_________________________
CHARMM 30b1 driven by 1/ Xeon (32 bits) 2/ Redhat 7.3 (32 bits) with a Quadrics-modified 2.4-18-5 kernel 3/ Chuan, with 95% of the mentorship coming from great scientists frequenting this forum. 4/ Gracious support from the forum.

Top
#419 - 01/20/05 05:25 AM Re: setup-truncated-octahedron.str [Re: lennart]
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
I have replaced this script with a somewhat simpler version.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#420 - 05/05/08 07:09 AM Re: setup-truncated-octahedron.str [Re: lennart]
Michael_H Offline
Forum Member

Registered: 05/05/08
Posts: 7
Hello!
I am trying to understand the volume formula for the truncated octahedron which is according to http://mathworld.wolfram.com/TruncatedOctahedron.html
V=8*sqrt(2)*a**3
where "a" is the length of an edge. The distance "b" between two quadratic faces is
b=2*sqrt(2)*a
also:
V=b**3/2

The crystl.doc file says:
Quote:


OCTAhedral - a = b = c, alpha = beta = gamma = 109.4712206344907
(a.k.a truncated octahedron)
(example: 40.0 40.0 40.0 109.471220634 109.471220634 109.471220634 )
(volume = 4*sqrt(3))/9 * a**3 )
(truncated cube length = a * sqrt(4/3) )
(degrees of freedom = 1)




Here, the distance "b" between two quadratic faces, called truncated cube length in the doc, is
b=a*sqrt(4/3)
Also here:
V=b**3/2

When charmm sets up a truncated octahedron from a cubic box it obviously rotates the whole system, ie. the atoms or does it rotate only the truncated octahedron within the cubic box leaving out the atoms and thus reduces the resulting edge length and volume?

Thanks for any help.

Top
#421 - 05/05/08 02:05 PM Re: setup-truncated-octahedron.str [Re: Michael_H]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
I'm not so sure that equating 'b' with the 'truncated cube length' is correct.

If you apply an OCTA lattice to a cube of water atoms, you'll likely get large energies; the user must arrange the atoms in the desired shape. The initial script in this post by Lennart (and a simplified followup) demonstrate one approach. I've found that one can also use a sphere of matching volume as a pathway (via minimization) to RHDO and OCTA lattices of water; there's an RHDO example here in the Script Archive.

Top
#422 - 05/08/08 05:43 AM Re: setup-truncated-octahedron.str [Re: rmv]
Michael_H Offline
Forum Member

Registered: 05/05/08
Posts: 7
Mystery solved:

CHARMM formula for the volume of the trunc.cuboctahedron:
V = 4*sqrt(3)/9 * a**3
'a' is the distance between two hexagonal faces and not as I initially thought the edge length.

'b' is the length between two quadratic faces (truncated cube length).
b = a*sqrt(4/3.)
'a' can also be seen as
a = b*sqrt(3) / 2
which is half of the space diagonal.

Unfortunately, I haven't found a proof for the CHARMM formula but numerical results are equal to results of V=8*sqrt(2)*a**3

Top
#423 - 06/25/08 08:18 PM Re: setup-truncated-octahedron.str [Re: Michael_H]
Jon_Wright Offline
Forum Member

Registered: 11/01/06
Posts: 15
Hi,

We're been using this script to cut a truncated octahedron out from the sphere and are curious as to how the TO is orientated. When we look at it on the graphics there does not seem to be an obvious reason for the TO orientation. We expected either the center of a square faces or hexagonal face to be aligned with the X-axis but it seems that no faces are actually aligned on any axes.

Is there a reason for the TO to have an orientation that does not have any obvious alignments to the X-axes?

Jon

Top

Moderator:  chmgr, John Legato, petrella