|
Last change
on this file since 0779a9 was 0779a9, checked in by Frederik Heber <heber@…>, 17 years ago |
|
some mor changes to fine-tune the cluster generation.
Sadly, VolumeOfConvexEnvelope() is not robust/stable, with Ratio1.4-1/1800K/compundH.*.xyz no usable convex envelope was found but points were connected right through the cluster.
|
-
Property mode
set to
100755
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 | #
|
|---|
| 3 | # calculates the density of a molecule contained in a espack config file
|
|---|
| 4 |
|
|---|
| 5 | MOLECUILDER="/home/heber/workspace/ESPACK/bin/molecuilder"
|
|---|
| 6 |
|
|---|
| 7 | if [ -z $1 ]; then
|
|---|
| 8 | echo "Usage: $0 <config file>"
|
|---|
| 9 | echo "We assume, that there is also an xyz file to the config file."
|
|---|
| 10 | exit 1
|
|---|
| 11 | else
|
|---|
| 12 | config=$1
|
|---|
| 13 | if [ ! -e $config ]; then
|
|---|
| 14 | echo "Config file $config does not exist!"
|
|---|
| 15 | exit 1
|
|---|
| 16 | fi
|
|---|
| 17 | fi
|
|---|
| 18 |
|
|---|
| 19 | # if xyz is missing, call molecuilder to create it
|
|---|
| 20 | if [ ! -e ${config}.xyz ]; then
|
|---|
| 21 | echo "Config xyz file ${config}.xyz does not exist, creating it"
|
|---|
| 22 | $MOLECUILDER ${config} -t 0. 0. 0.
|
|---|
| 23 | fi
|
|---|
| 24 |
|
|---|
| 25 | mass=`/home/heber/workspace/ESPACK/bin/CalculateMass.sh ${config}.xyz | awk -F" " {'print $3'}`
|
|---|
| 26 | echo "Mass is $mass atomicmassunit"
|
|---|
| 27 | boxlengths=`grep ^Box --after-context=3 ${config} | tail -n 3`
|
|---|
| 28 | volume=`echo $boxlengths | awk -F" " {'print $1*$3*$6'}`
|
|---|
| 29 | if [ `grep IsAngstroem ${config} | awk -F" " {'print $2'}` == "1" ]; then
|
|---|
| 30 | unit="angstrom^3"
|
|---|
| 31 | else
|
|---|
| 32 | unit="atomiclength^3"
|
|---|
| 33 | fi
|
|---|
| 34 | echo "Volume is $volume $unit"
|
|---|
| 35 | density=`units "$mass atomicmassunit / $volume $unit" "g/cm^3" | grep \* | awk -F" " {'print $2'}`
|
|---|
| 36 | echo "Density is $density g/cm^3"
|
|---|
| 37 |
|
|---|
| 38 | exit 0
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.