Inorder to make an ensemble one has to use two scripts, the “new_randomStructure.py” and a bash script.The new_randomStructure.py creates random initial .bas files and VELOCITIES from the Md runs. while the bash script moves the input files for fireball and the initial files to each directory. The following is the a description one how new_random_Structure works. To make an ensemble we only need to use the final bash script.
For new_random_Structure.py to operate, one has to have the following files at the same directory
answer.xyz
VELOCITY.dat
Both of these files are generated in the MD part. To use this script one has to type in the command line :
python new_random_Structure.py <Number of MD steps> <number of atoms> <job number>
For example for azobenzene 24 atoms and 60000 MD step we can use :
$ python new_randomStructure.py 60000 24 6
At this point we have to write a bash script which makes directories and copies every file that is needed into the directories and makes soft links to “Fdata” and “fireball.x”. Depending one whether we are running on a PC or super computer and the ability of the super computer to do an array job we will use these two methods
This bash script can be used to run a single job which creates the neccecary directories.
First make a directory and call it “MDET”,
mkdir MDET
Let us make a directory that contains “answer.xyz” and “VELOCITY.dat”, we can call it “init”. Assuming these to files are in a directory called MD we will move them to MDET/init
cd MDET
mkdir init
cp ../MD/answer.xyz init/
cp ../MD/answer.xyz init/
Let us make another directory that contains our input files, we can call it “input”. This directory will contain “fireball.in”,“mdet.input” and “gamma.kpts”.
We move the new_randomStructure.py to a directory names util.
So far we have created three directories “util”, “input”, and “init”, a tree structure for the directories will look like:
--MD
--MDET----util----new_randomStructure.py
----input---fireball.in
---mdet.input
---gamma.kpts
----init----answer.xyz
----VELOCITY.dat
Now We will create a file with name setup.h in MDET directory using vi or any text editor
$ vi setup.h
Then we have to copy the following in the steup.h.
REMEMBER YOU HAVE TO CHANGE ANY VALUE THAT IS INSIDE < >, TO SOMETHING SUITABLE TO YOUR CALCULATIONS
#!/bin/bash
for i in `seq 1 <number of ensemble>`;
do
mkdir ens.$i
cd ens.$i
cp ../init/answer.xyz .
cp ../init/VELOCITY.dat .
cp ../util/new_randomStructure.py .
python new_randomStructure.py 60000 24 $i
rm answer.xyz
rm VELOCITY.dat
rm new_randomStructure.py
cp ../input/fireball.in .
cp ../input/mdet.input .
cp ../input/gamma.kpts .
ln -s <Fdata location> Fdata
ln -s <fireball.x location>
done
Next stop is to run the fireball.x in each directory. Which depends on where the job is running