Difference between revisions of "CamCASP/Notes/7"
import>Am592 |
import>Am592 |
||
Line 62: | Line 62: | ||
FINISH |
FINISH |
||
</pre> |
</pre> |
||
− | The new bits are the '''ENERGY-SCAN''' commands and those indicated by '***'. The '''Skip MOs''' command is needed to get CamCASP to go on without reading in the molecular orbitals. The '''ENERGY-SCAN''' module probes the first molecule (benzene1) with the second (benzene2). The order is important. But all we need are the geometries, so we '''Scan Nothing'''. The results of the energy scan will be in file '''random.dat'''. |
+ | The new bits are the '''ENERGY-SCAN''' commands and those indicated by '***'. The '''Skip MOs''' command is needed to get CamCASP to go on without reading in the molecular orbitals. The '''ENERGY-SCAN''' module probes the first molecule (benzene1) with the second (benzene2). The order is important. But all we need are the geometries, so we '''Scan Nothing'''. The results of the energy scan will be in file '''random.dat'''. This file looks like: |
+ | <pre> |
||
+ | TITLE Energy scan of MOL-A by MOL-B |
||
+ | TITLE benzene1 and benzene2 : GRID |
||
+ | TITLE Basis sadlej and type MC+ |
||
+ | TITLE Midbonds 3S2P1D and type weighted |
||
+ | MOL-A benzene1 |
||
+ | MOL-B benzene2 |
||
+ | POINTS 40 |
||
+ | ENERGY-UNITS CM-1 |
||
+ | LENGTH-UNITS BOHR |
||
+ | ANGLE-UNITS DEGREES |
||
+ | LABELS INDEX Rx Ry Rz alpha Nx Ny Nz E(1)elst E(2)ind E(2)disp E(1)exch E(2)exind E(2)exdisp TotOverlap Elst-Asymp Ind2-Asymp Disp-Asymp Delta |
||
+ | 1 0.145892E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 |
||
+ | 2 0.134629E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 |
||
+ | ... |
||
+ | ... |
||
+ | 40 -0.665925E+01 -0.444957E+01 0.827950E+01 0.141980E+03 0.515613E+00 0.712421E+00 -0.476025E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 |
||
+ | END |
||
+ | END-FILE |
||
+ | </pre> |
||
+ | * Now we need to make small changed to '''random.dat''' in order to get it in a form suitable for the batch scripts. Do the following. Copy it to '''random.geom''' (could be any name really, but let's use this). Now edit random.geom so that it looks like: |
||
+ | <pre> |
||
+ | ! TITLE Energy scan of MOL-A by MOL-B |
||
+ | ! TITLE benzene1 and benzene2 : GRID |
||
+ | ! TITLE Basis sadlej and type MC+ |
||
+ | ! TITLE Midbonds 3S2P1D and type weighted |
||
+ | ! MOL-A benzene1 |
||
+ | ! MOL-B benzene2 |
||
+ | ! POINTS 40 |
||
+ | ! ENERGY-UNITS CM-1 |
||
+ | ! LENGTH-UNITS BOHR |
||
+ | ! ANGLE-UNITS DEGREES |
||
+ | ! LABELS INDEX Rx Ry Rz alpha Nx Ny Nz |
||
+ | 1 0.145892E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 |
||
+ | 2 0.134629E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 |
||
+ | ... |
||
+ | ... |
||
+ | 39 -0.587535E+01 -0.392578E+01 0.730487E+01 0.141980E+03 0.515613E+00 0.712421E+00 -0.476025E+00 |
||
+ | 40 -0.665925E+01 -0.444957E+01 0.827950E+01 0.141980E+03 0.515613E+00 0.712421E+00 -0.476025E+00 |
||
+ | ! END |
||
+ | ! END-FILE |
||
+ | </pre> |
||
+ | We have commented out all text lines that tell us which system this file is for. And we have removed the energy columns that come after '''Nz'''. |
||
+ | This file is now ready to be read by the batch scripts. |
||
− | N |
||
+ | |||
+ | NOTES: |
||
+ | * It is often convenient to split this file into multiple parts so as to run the batch jobs in 'parallel' on multiple nodes. If you do so, the ''INDEX'' column comes in handy as it is used by the batch scripts to decide on the job number. |
||
==SAPT(DFT) jobs with batch_SAPT.pl== |
==SAPT(DFT) jobs with batch_SAPT.pl== |
Revision as of 18:13, 17 March 2009
CamCASP => Notes => Using the batch scripts
The ${CAMCASP}/bin/ folder contains a few batch scripts for running sets of jobs at various dimer geometries.
Obtaining the geometry file
The batch scripts all use a geometry file that contains the translation and rotation parameters needed to construct the dimer. This file is constructed by CamCASP as follows.
- Create a standard CamCASP command file for the dimer using CLUSTER.
- Edit it to look like:
TITLE benzene1 and benzene2 : GRID TITLE Basis sadlej and type MC+ TITLE Midbonds 3S2P1D and type weighted MEMORY 2048 MB SET Global_data CamCASP-path /home/am592/SITUS Units Bohr cm-1 Scf-code Dalton XC-func PBE0 Overwrite yes END MOLECULE benzene1 at 0.0 0.0 0.0 Charge 0 Echo No Hessian format SAPT2006 Skip MOS <----------*** Basis Main Spherical Units Bohr Format GAMESS C1 6.0 2.64623243 0.00000000 0.00000000 TYPE C1 #include-camcasp basis/gamess_us/sadlej/C --- ... ... END MOLECULE benzene2 at 0.0 0.0 0.0 Charge 0 Echo No Hessian format SAPT2006 Skip MOS <----------*** Basis Main ... ... END Begin Energy-scan Probe benzene1 with benzene2 Scan Nothing Units Bohr Random Points 40 dRmin -1.5 dRmax 1.2 Radial 2 End Energy-file PREFIX random End FINISH
The new bits are the ENERGY-SCAN commands and those indicated by '***'. The Skip MOs command is needed to get CamCASP to go on without reading in the molecular orbitals. The ENERGY-SCAN module probes the first molecule (benzene1) with the second (benzene2). The order is important. But all we need are the geometries, so we Scan Nothing. The results of the energy scan will be in file random.dat. This file looks like:
TITLE Energy scan of MOL-A by MOL-B TITLE benzene1 and benzene2 : GRID TITLE Basis sadlej and type MC+ TITLE Midbonds 3S2P1D and type weighted MOL-A benzene1 MOL-B benzene2 POINTS 40 ENERGY-UNITS CM-1 LENGTH-UNITS BOHR ANGLE-UNITS DEGREES LABELS INDEX Rx Ry Rz alpha Nx Ny Nz E(1)elst E(2)ind E(2)disp E(1)exch E(2)exind E(2)exdisp TotOverlap Elst-Asymp Ind2-Asymp Disp-Asymp Delta 1 0.145892E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 2 0.134629E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 ... ... 40 -0.665925E+01 -0.444957E+01 0.827950E+01 0.141980E+03 0.515613E+00 0.712421E+00 -0.476025E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 END END-FILE
- Now we need to make small changed to random.dat in order to get it in a form suitable for the batch scripts. Do the following. Copy it to random.geom (could be any name really, but let's use this). Now edit random.geom so that it looks like:
! TITLE Energy scan of MOL-A by MOL-B ! TITLE benzene1 and benzene2 : GRID ! TITLE Basis sadlej and type MC+ ! TITLE Midbonds 3S2P1D and type weighted ! MOL-A benzene1 ! MOL-B benzene2 ! POINTS 40 ! ENERGY-UNITS CM-1 ! LENGTH-UNITS BOHR ! ANGLE-UNITS DEGREES ! LABELS INDEX Rx Ry Rz alpha Nx Ny Nz 1 0.145892E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 2 0.134629E+02 0.000000E+00 0.000000E+00 0.180000E+03 0.100000E+01 0.000000E+00 0.000000E+00 ... ... 39 -0.587535E+01 -0.392578E+01 0.730487E+01 0.141980E+03 0.515613E+00 0.712421E+00 -0.476025E+00 40 -0.665925E+01 -0.444957E+01 0.827950E+01 0.141980E+03 0.515613E+00 0.712421E+00 -0.476025E+00 ! END ! END-FILE
We have commented out all text lines that tell us which system this file is for. And we have removed the energy columns that come after Nz.
This file is now ready to be read by the batch scripts.
NOTES:
- It is often convenient to split this file into multiple parts so as to run the batch jobs in 'parallel' on multiple nodes. If you do so, the INDEX column comes in handy as it is used by the batch scripts to decide on the job number.
SAPT(DFT) jobs with batch_SAPT.pl
You cannot always perform an energy scan using the ENERGY-SCAN module in CamCASP as this module requires you to use the MC type of basis. If you need to use the MC+, DC or DC+ types of bases, then you will need to use the batch_SAPT.pl script. What this script does is to use a template CLUSTER command file and a file containing the translation and rotation parameters that define the dimer in order to run a batch of SAPT(DFT) (and also SAPT) calculations in an automatic way.
Here are the options:
$ batch_SAPT.pl Usage: batch_SAPT.pl [-j] job [-geom name] [-clt name] [ -b dc | mc | mc+ | dc+ ] -ipa IP(A) -ipb IP(B) [-q queue] [-M memory in MB]
You need to supply:
- The job name. For example, this might be benzene2.
- The name of the geometry file. The default name will be jobname.geom, so if this file is called benzene2.geom, then there is no need to specify it explicitly.
- The name of the CLUSTER command file. See below. As with the geometry file, there is a default value of jobname.clt.
- The type of basis to be used. (Is this now obsolete?)
- The ionisation potentials of the two monomers.
- The name of the queue. As always, there are special 'queues': bg says run the job in the background. The other special 'queue' none may not be usable.
- You can also specify the memory to be used. This memory (in MB) will be passed to DALTON. The memory given to CamCASP should be in the CLUSTER file.
The template CLUSTER file
What the batch_SAPT.pl script does is use a template CLUSTER file to create the various DALTON and CamCASP input files at each dimer geometry. Here's what such a file looks like:
Title Benzene dimer : Sadlej MC+ ! Set Global-data CamCASP /home/ajm/CamCASP Units Bohr Degree End Molecule benzene1 Units Bohr C1 6.0 2.6462324347 0.0000000000 0.0000000000 C2 6.0 1.3231162173 2.2917045128 0.0000000000 C3 6.0 -1.3231162173 2.2917045128 0.0000000000 C4 6.0 -2.6462324347 0.0000000000 0.0000000000 C5 6.0 -1.3231162173 -2.2917045128 0.0000000000 C6 6.0 1.3231162173 -2.2917045128 0.0000000000 H1 1.0 4.7082995437 0.0000000000 0.0000000000 H2 1.0 2.3541497718 4.0775070135 0.0000000000 H3 1.0 -2.3541497718 4.0775070135 0.0000000000 H4 1.0 -4.7082995437 0.0000000000 0.0000000000 H5 1.0 -2.3541497718 -4.0775070135 0.0000000000 H6 1.0 2.3541497718 -4.0775070135 0.0000000000 End Molecule benzene2 Units Bohr C1 6.0 2.6462324347 0.0000000000 0.0000000000 C2 6.0 1.3231162173 2.2917045128 0.0000000000 C3 6.0 -1.3231162173 2.2917045128 0.0000000000 C4 6.0 -2.6462324347 0.0000000000 0.0000000000 C5 6.0 -1.3231162173 -2.2917045128 0.0000000000 C6 6.0 1.3231162173 -2.2917045128 0.0000000000 H1 1.0 4.7082995437 0.0000000000 0.0000000000 H2 1.0 2.3541497718 4.0775070135 0.0000000000 H3 1.0 -2.3541497718 4.0775070135 0.0000000000 H4 1.0 -4.7082995437 0.0000000000 0.0000000000 H5 1.0 -2.3541497718 -4.0775070135 0.0000000000 H6 1.0 2.3541497718 -4.0775070135 0.0000000000 End Rotate benzene2 by alpha about Nx Ny Nz Place benzene2 at Rx Ry Rz Files Molecules benzene1 and benzene2 File-prefix JOB Basis Sadlej Type MC+ Midbond 3s2p1d Type Weighted Aux-basis aTZ Interface files Memory 2 GB End Finish
Most of the file is as described in the Users' Guide. But there are important changes. We assume that the second molecule, benzene2 in the example, is to be rotated and translated. So we have included commands to do this:
Rotate benzene2 by alpha about Nx Ny Nz Place benzene2 at Rx Ry Rz
But the actual rotations and translations are not specified. Instead we have used tags alpha,Nx,Ny,Nz for the rotation angle (degrees) and axis, and tags Rx Ry Rz for the point (in Bohr) at which the benzene2 molecule will be placed. The units used can be changed but they must be consistent with those used to create the geometry file. The batch_SAPT.pl script will replace these tags by actual values.
The other change is the job name: This has been specified as
File-prefix JOB
and will be replaced by the actual job name by the batch_SAPT.pl script. The actual job name will be the job name given to this script and an additional '_###' numerical index taken from the geometry file. This helps to keep the runs distinct from each other.
So you can now run the job using
batch_SAPT.pl benzene2 -clt benzene2.clt -geom random.geom -b mc+ -ipa 0.3397 -ipb 0.3397 -q intel.q -M 3000
where my geometries are in file random.geom.
As jobs finish, they are copied to your main directory (from where the command was issued) to sub-folders benzene2_001, benzene2_002, etc. The actual indices used will depend on the geometry indices in the geometry file. This is handy as, should you split the geometry file into pieces to run on multiple nodes of your machine, the file names used will not clash.
You will need to search through all these directories for the results. This can be done using the batch_search.pl script.