CHARMM Development Project
Posted By: rssc Saving Optimized Crystal Parameters - 11/22/08 05:15 AM
Dear all,

I checked one of examples for the alanine crystal that performs a full optimization (atomic positions and unit cell parameters). I would like to know where the optimized "a", "b", and "c" parameters are stored? And if so, is there a way that I can save them in a file?

Thanks,
RSSC



ALANINE example:
===============================================
Open read card unit 13 name @9xtl_xray.crd
Read coor card unit 13
Close unit 13

! Define the crystal.
Crystal Define Orthorhombic 6.025 12.324 5.783 90.0 90.0 90.0

! Read in an existing crystal transformation file.
Open read card unit 14 name @9xtl_ala.xtl
Crystal Read card unit 14
Close unit 14

! Calculate an energy.
Energy ihbfrq 0 inbfrq 10 imgfrq 10 cutim 999.0

! Perform the minimisation.
Minimise Abnr Lattice Nstep 250 Nprint 50 Tolgrd 0.1 Inbfrq 0 Imgfrq 0

! Save the optimised coordinates.
Open write card unit 17 name @9xtl_alamin1.crd
Write coor card unit 17
* Optimised coordinates for crystalline alanine. The lattice is
* optimised with a = , b = and c = .
*
===============================================
Posted By: rmv Re: Saving Optimized Crystal Parameters - 11/22/08 05:58 PM
You can easily put the a,b,c values in the title of the coord file via:

Open write card unit 17 name @9xtl_alamin1.crd
Write coor card unit 17
* Optimised coordinates for crystalline alanine. The lattice is
* optimised with a = ?XTLA , b = ?XTLB and c = ?XTLC .
*

However, it is also fairly straightforward to go one step further and create a stream file for the crystal setup using the optimized values:

open unit 11 write card name opt-cryst.str
echu 11
echo * crystal setup
echo *
echo Crystal Define Orthorhombic ?XTLA ?XTLB ?XTLC 90.0 90.0 90.0
echo Open read card unit 14 name @9xtl_ala.xtl
echo Crystal Read card unit 14
echo Close unit 14
echo return

In subsequent scripts, the crystal setup is accomplished via:

stream opt-cryst.str
© CHARMM forums