Rep:Mod:ABCluster
General Comments on ABCluster
ABCluster enables structural searches on atomic and molecular clusters. It consists of five main utilities: atom-optimizer, rigidmol-optimizer, cg-optimizer, isomer, and lego.
ABCluster can be run entirely on its on when used with the inbuilt force field procedures (atom-optimizer, rigidmol-optimizer, cg-optimizer).
Additionally, ABCluster (isomer, and lego) can be run in conjunction with third-party software, e.g. Gaussian to calculate geometries and energies from quantum chemical methods.
IMPORTANT: ABCluster does not realise if an optimization failed, e.g. due to convergence problems! The output will display a successfull job termination even if the calculation was aborted unexpectedly. Check the optimization files ABCluster is generating!
How to set up ABCluster on
A Mac
The following instructions were tested on a Mac running MacOS Catalina.
Installing ABCluster v.2.0:
1. Download the ABCluster binaries for Mac OS X
2. Untar the downloaded file
3. Rename the created folder ABCluster-MacOS to ABCluster
4. Move the folder ABCluster to the desired directory (e.g. /Applications)
5. Try to call one of the ABCluster submodules e.g. lego via: /Applications/ABCluster/isomer
If the first lines of your output show the ABCluster logo below, you are lucky and can skip the following instuctions.
* * * * * * * * * * * * * * * * * *
* ____ _____ _ _ *
* /\ | _ \ / ____| | | | * * * * *
* / \ | |_) | | | |_ _ ___| |_ ___ _ __ *
* / /\ \ | _ <| | | | | | / __| __/ _ \ '__| *
* / ____ \| |_) | |____| | |_| \__ \ || __/ | *
* /_/ \_\____/ \_____|_|\__,_|___/\__\___|_| *
* *
* * * * * * * * * * * * * * * * * * * * * * * * *
ABCluster 2.0
Specific flag: official version
Platform: Mac OS X
Compiled by: Mac@wirelessprv-10-192-8-208.near.illinois.edu
Compiling date: Jul 30 2018 22:19:01
C++ compiler: g++
C++ options: -O3 -Os --std=c++0x -lboost_system
Most probably calling isomer will result in the following output instead:
dyld: Library not loaded: /usr/local/opt/boost/lib/libboost_system.dylib Referenced from: /Applications/ABCluster/./isomer Reason: image not found zsh: abort ./isomer
If you experience this problem, you need to install boost 1.62.0. Here are some instructions, which are outlined in the following section as well.
The instructions rely on producing symlinks with Homebrew. So you maybe want to get the Homebrew before starting the installation of boost.
Installing boost v.1.62.0:
1. Download boost_1_62_0.tar.bz2
2. Unpack the downloaded directory: tar xjf boost_1_62_0.tar.bz2
3. Go into the new folder: cd boost_1_62_0
4. Run the following two commands (execution of the second command takes some 5-10 minutes):
a) ./bootstrap.sh --prefix=/usr/local/Cellar/boost162/1.62.0 --libdir=/usr/local/Cellar/boost162/1.62.0/lib
b) ./b2 --prefix=/usr/local/Cellar/boost162/1.62.0 --libdir=/usr/local/Cellar/boost162/1.62.0/lib -d2 -j4 --layout=tagged install threading=multi,single link=shared,static address-model=64 architecture=x86 pch=off cxxflags="-arch x86_64 -std=c++11 -stdlib=libc++" linkflags=-stdlib=libc++
5. Do the symlinks via: brew link boost162
6. Try to call lego again: /Applications/ABCluster/lego
This should start ABCluster succesfully.
The HPC
Download ABCluster for Linux, untar it, and copy it into your $HOME directory on the HPC. cd into the ABCluster directory.
First create a document called jobhold.sh and copy the following code inside:
#!/bin/bash
# Submit and get job ID.
me=`whoami`
jobid=`qsub -N abcluster submit.pbs | tail -1`
# Detect if the job is finished.
sleep_time=10 # in second
jobstate="Q"
while [ -n "${jobstate}" ]
do
sleep ${sleep_time}
jobstate=`qstat -u ${me} | grep ${jobid}`
done
Now create a document submit.pbs with the following content:
#!/bin/sh
#PBS -l walltime=119:59:00
#PBS -lselect=1:ncpus=24:mem=91000MB
#PBS -j oe
#PBS -q pqph
module load gaussian/g09-d01
fn=filename
# run gaussian
pbsexec g09 ${fn}.com
#
cp $TMPDIR/${in}.chk /$PBS_O_WORKDIR/.
#
# exit
Input files
Most likely you want to run optimizations on molecular clusters using the lego utility. Four types of input files are needed: .inp, .cluster, .xyz, and a optfile.
The content of .inp files differ sligthly when running ABCluster locally on a Mac or on the HPC.
The following input files can be used to perform a structural search on the water dimer with Gaussian on the B3LYP/6-31G/GD3BJ level of theory.
.inp file on a Mac
This file set calculation details for ABCluster, like input and output files.
Create H2O_2.inp:
H2O_2 # Result file name H2O_2.cluster # Cluster file name cube 2.5 2 2 2 # Structure types 5 # Number of calculations >>>> ./xyz2gaussian optfile $inp$ > $xxx$.com g16 < $xxx$.com > $xxx$.log 2>/dev/null ./gaussian2xyz $xxx$.log > $out$ mv job.chk $xxx$.chk >>>>
This file assumes you have set an alias g16 to start Gaussian. Change the corresponding line if your alias is different or set the alias accordingly in your .bashrc file.
Check the manual for other sensible structure types than cube for your system.
.inp file on the HPC
Create H2O_2.inp:
H2O_2 # Result file name H2O_2.cluster # Cluster file name cube 2.5 2 2 2 # Structure types 5 # Number of calculations >>>> ./xyz2gaussian optfile $inp$ > $xxx$.com sed -i '11c fn=$xxx$' submit.pbs ./jobhold.sh ./gaussian2xyz $xxx$.log > $out$ >>>>
.cluster file
The .cluster file tells ABCluster where to find the monomer input structures and how many molecules of each species to put intp the cluster.
Create H2O_2.cluster:
1 # Number of .xyz files to be read ./H2O.xyz 2 # Path to a .xyz file and number of instances of the molecule to be created
If you want to run a job on two different molecules simply add another line which is giving the path to the .xyz file of the second molecule and the number of molecules of this kind.
One or more .xyz files
The .xyz files define the monomer input structures. A .xyz file containing a good monomer structure could be a result of a previous Gaussian optimization.
Create H2O.xyz:
3 H2O O -1.594277 1.348303 0.000000 H -0.632946 1.385547 0.000000 H -1.880068 2.266926 0.000000
optfile
The optfile sets calculation details for the Gaussian optimizations.
%nproc=2 %mem=500MB %chk=job.chk # opt b3lyp/6-31g empiricaldispersion=gd3bj water dimer search 0 1 >>>> >>>>
How to run ABCluster on
A Mac
Assuming all input files are in the same directory as the ABCluster utilities, cd into that directory first.
Call ABCluster with: nohup ./lego H2O_2.inp >& H2O.out &
If you are calling lego from outside the ABCluster directory you need to give the whole path to lego and the .inp file. Additionally, you need to modify the lines in the .inp file to call gaussian2xyz and xyz2gaussian.
The HPC
Do the same as you would on you local machine but load the appropriate compiler first: module load gcc/5.4.0 After job submission, lego will run on the login nodes and submit Gaussian optimizations pqph. CURRENTLY CHASING ICT TO FIND OUT IF LEGO IS TAKING UP A LOT OF RESOURCES ON THE LOGIN NODES.
Output
During one calculation run several output files will be generated.
1. A .out file stating the energies of all structures generated during the run in a descending order.
2. A series of Gaussian .com and .log files called abclusterUSERNAME_# -> Check if optimizations terminated normally!
3. A directory called H2O_2-LM containing #.gjf and #.xyz files. These files specify output geometries and their energies.