Difference between revisions of "CamCASP/Notes/4"
import>Am592 |
import>Am592 |
||
Line 40: | Line 40: | ||
</pre> |
</pre> |
||
Then search for ''Rank'' and type ''t''. |
Then search for ''Rank'' and type ''t''. |
||
+ | |||
+ | ==Creating an energy file== |
||
+ | You will need an energy file (and overlap file) when creating an overlap model. The energy file should be in a the format (for example): |
||
+ | <pre> |
||
+ | TITLE Energy scan of MOL-A by MOL-B |
||
+ | TITLE pyridine1 and pyridine2 |
||
+ | TITLE Basis sadlej and type MC |
||
+ | TITLE Midbonds NONE and type weighted |
||
+ | MOL-A pyridine1 |
||
+ | MOL-B pyridine2 |
||
+ | POINTS 500 |
||
+ | ENERGY-UNITS KJ/MOL |
||
+ | LENGTH-UNITS BOHR |
||
+ | ANGLE-UNITS DEGREE |
||
+ | LABELS INDEX Rx Ry Rz alphaNx 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 -5.870040E-01 3.957260E+00 9.016280E+00 1.227930E+02 -9.097780E-01 -1.008600E-01 4.026560E-01 |
||
+ | 1.087500E-01 -2.364920E+00 -9.875980E+00 4.871440E+00 0.0E+00 0.0E+00 0.0E+00 |
||
+ | 0.0E+00 0.0E+00 0.0E+00 0.0E+00 |
||
+ | ... |
||
+ | ... |
||
+ | END |
||
+ | END-FILE |
||
+ | </pre> |
||
+ | If you have performed the energy scan using the '''ENERGY-SCAN''' module in CamCASP, then this file will be in such a format. But if you have performed a number of single-point (dimer geometry) calculations at specific dimer geometries using the ''batch_SAPT.pl'' script, you will not have such a file. |
||
+ | |||
+ | So, how do you construct it? |
||
+ | |||
+ | Use the ''batch_search.pl'' script as follows. |
||
+ | # Create a file called ''keys'' containing just ''saptdft-camcasp''. This keyword will tell the ''search.pl'' script to search for SAPT(DFT) energies in the format used by CamCASP. |
||
+ | # Run the ''batch_search.pl'' script using a command like: |
||
+ | <pre> |
||
+ | batch_search.pl pyridine2 -geom random-scan2.dat -d 6 -camcasp > energy_saptdft.dat |
||
+ | </pre> |
||
+ | |||
+ | The file ''energy_saptdft.dat'' should look something like: |
||
+ | <pre> |
||
+ | Energies in kJ/mol |
||
+ | |||
+ | 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 -5.870040E-01 3.957260E+00 9.016280E+00 1.227930E+02 -9.097780E-01 -1.008600E-01 4.026560E-01 |
||
+ | 1.087500E-01 -2.364920E+00 -9.875980E+00 4.871440E+00 0.0E+00 0.0E+00 0.0E+00 |
||
+ | 0.0E+00 0.0E+00 0.0E+00 0.0E+00 |
||
+ | ... |
||
+ | </pre> |
||
+ | So it is in almost the correct format. You need to add the preamble: |
||
+ | <pre> |
||
+ | TITLE Energy scan of MOL-A by MOL-B |
||
+ | TITLE pyridine1 and pyridine2 |
||
+ | TITLE Basis sadlej and type MC |
||
+ | TITLE Midbonds NONE and type weighted |
||
+ | MOL-A pyridine1 |
||
+ | MOL-B pyridine2 |
||
+ | POINTS 500 |
||
+ | ENERGY-UNITS KJ/MOL |
||
+ | LENGTH-UNITS BOHR |
||
+ | ANGLE-UNITS DEGREE |
||
+ | </pre> |
||
+ | Or whatever is appropriate in your case. These fields are used by CamCASP, so make sure they are correct. |
||
+ | And you will also need to add the last two lines: |
||
+ | <pre> |
||
+ | END |
||
+ | END-FILE |
||
+ | </pre> |
||
+ | That is all you need do, unless you want to fill up the ''Elst-Asymp'', ''Ind2-Asymp'', ''Disp-Asymp'' and |
||
+ | ''Delta'' fields. For the first three you will need to use '''ORIENT''' and the '''batch_ORIENT.pl''' script. The last one, ''Delta'', is any energy correction you would like to include. See [[ CamCASP/Notes/6 | Overlap Models ]] for more details. |
Revision as of 16:07, 2 December 2008
CamCASP => Notes => Odds and Ends
Converting units
The energy file produced by the ENERGY-SCAN module will probably use the units: Bohr, Degree, cm-1. These may not be appropriate and may need changing. It is easy enough to do this using a script, but there is a more convenient and probably more reliable way of converting the units in this file. That is to use the PROCESS program.
Here's the PROCESS command file to convert the energies in file energy_file.dat to kJ/mol.
Global Units kJ/mol CamCASP /home/am592/CamCASP/current End Energy Read energy_file.dat Write energy_file_kJ.dat End Finish
NOTES:
- The advantage of this over any script is first of all speed --- the code's already written for you so why bother writing your own.
- Second, PROCESS will convert from any of the recognised energy units to kJ/mol and it knows what units the energies are in as this information is in the energy file. Here's an example of the header of an energy file:
TITLE Energy scan of MOL-A by MOL-B TITLE pyridine1 and pyridine2 TITLE Basis sadlej and type MC TITLE Midbonds NONE and type weighted MOL-A pyridine1 MOL-B pyridine2 POINTS 500 ENERGY-UNITS KJ/MOL LENGTH-UNITS BOHR ANGLE-UNITS DEGREE
- And you could have read in multiple files, each with its own set of units and it (should) all work correctly.
VIM tricks
- Inserting the Type field in the *.mom files
:map t ^vllly$a Type ^[p^[
Then search for Rank and type t.
Creating an energy file
You will need an energy file (and overlap file) when creating an overlap model. The energy file should be in a the format (for example):
TITLE Energy scan of MOL-A by MOL-B TITLE pyridine1 and pyridine2 TITLE Basis sadlej and type MC TITLE Midbonds NONE and type weighted MOL-A pyridine1 MOL-B pyridine2 POINTS 500 ENERGY-UNITS KJ/MOL LENGTH-UNITS BOHR ANGLE-UNITS DEGREE LABELS INDEX Rx Ry Rz alphaNx 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 -5.870040E-01 3.957260E+00 9.016280E+00 1.227930E+02 -9.097780E-01 -1.008600E-01 4.026560E-01 1.087500E-01 -2.364920E+00 -9.875980E+00 4.871440E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 ... ... END END-FILE
If you have performed the energy scan using the ENERGY-SCAN module in CamCASP, then this file will be in such a format. But if you have performed a number of single-point (dimer geometry) calculations at specific dimer geometries using the batch_SAPT.pl script, you will not have such a file.
So, how do you construct it?
Use the batch_search.pl script as follows.
- Create a file called keys containing just saptdft-camcasp. This keyword will tell the search.pl script to search for SAPT(DFT) energies in the format used by CamCASP.
- Run the batch_search.pl script using a command like:
batch_search.pl pyridine2 -geom random-scan2.dat -d 6 -camcasp > energy_saptdft.dat
The file energy_saptdft.dat should look something like:
Energies in kJ/mol 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 -5.870040E-01 3.957260E+00 9.016280E+00 1.227930E+02 -9.097780E-01 -1.008600E-01 4.026560E-01 1.087500E-01 -2.364920E+00 -9.875980E+00 4.871440E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 0.0E+00 ...
So it is in almost the correct format. You need to add the preamble:
TITLE Energy scan of MOL-A by MOL-B TITLE pyridine1 and pyridine2 TITLE Basis sadlej and type MC TITLE Midbonds NONE and type weighted MOL-A pyridine1 MOL-B pyridine2 POINTS 500 ENERGY-UNITS KJ/MOL LENGTH-UNITS BOHR ANGLE-UNITS DEGREE
Or whatever is appropriate in your case. These fields are used by CamCASP, so make sure they are correct. And you will also need to add the last two lines:
END END-FILE
That is all you need do, unless you want to fill up the Elst-Asymp, Ind2-Asymp, Disp-Asymp and Delta fields. For the first three you will need to use ORIENT and the batch_ORIENT.pl script. The last one, Delta, is any energy correction you would like to include. See Overlap Models for more details.