Difference between revisions of "CamCASP/Notes/4"

From CUC3
Jump to navigation Jump to search
import>Am592
import>Am592
Line 33: Line 33:
 
</pre>
 
</pre>
 
# And you could have read in multiple files, each with its own set of units and it (should) all work correctly.
 
# 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
  +
<pre>
  +
:map t ^vllly$a Type ^[p^[
  +
</pre>
  +
Then search for ''Rank'' and type ''t''.

Revision as of 15:28, 28 November 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:

  1. 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.
  2. 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
  1. 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.