QCMagic: Difference between revisions
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
==scanSurface.py== |
==scanSurface.py== |
||
===Overview=== |
|||
Example |
Example command: |
||
$ python scanSurface.py --stretch=0,1,1,0.01 my_qchem_file.out Tag |
$ python scanSurface.py --stretch=0,1,1,0.01 my_qchem_file.out Tag |
||
Line 17: | Line 17: | ||
View all possible options with the command <code> python scanSurface.py --help</code>. |
View all possible options with the command <code> python scanSurface.py --help</code>. |
||
=== |
===Options=== |
||
====--normal-rotate==== |
|||
This may be used in simple cases to change a single bond angle. It relies on being able to work out the connectivity from knowledge of the bond lengths and VDW radii, so can be problematic if (a) your bond lengths are unusual (b) there are multiple paths between two atoms. |
|||
E.g. <code>--normal-rotate=0,1,2,90,0.1</code> will: |
|||
* split the molecule between atom0 and atom1; |
|||
* check if each of the other atoms are connected to atom0. If they are, group them with atom0 and if not, group them with atom1; |
|||
* rotate the group of atoms containing atom1 about an axis ''through'' atom1, and ''normal to the plane containing atom0, atom1 and atom2''. |
|||
====--tie==== |
|||
An additional option --tie is soon to be included. This allows multiple parameters to change in sync with each other. For example, we might want to investigate the effect of varying two bond lengths at the same time, but don't care what happens when one is stretched and the other unchanged. This could be very useful in the context of molecular vibrations. |
An additional option --tie is soon to be included. This allows multiple parameters to change in sync with each other. For example, we might want to investigate the effect of varying two bond lengths at the same time, but don't care what happens when one is stretched and the other unchanged. This could be very useful in the context of molecular vibrations. |
||
For each parameter you want to tie, two integers are required |
For each parameter you want to tie, two integers are required: |
||
* |
* one referring to the option; |
||
<blockquote> |
<blockquote> |
||
Key: ext_charge 0; scale 1; stretch 2; rotate 3; normal_rotate 4; orth_rotate 5; all_normal_rotate 6; rotate_axis 7 |
|||
</blockquote> |
</blockquote> |
||
* |
* one specifying the particular instance of said option (zero-based). |
||
Example command using --tie: |
|||
e.g. |
|||
$ python scanSurface.py '''--stretch=0,1,1,0.01''' ''--rotate=2,3,90,0.9'' --scale=2 --tie='''2,0''',''3,0' |
$ python scanSurface.py '''--stretch=0,1,1,0.01''' ''--rotate=2,3,90,0.9'' --scale=2 --tie='''2,0''',''3,0' |
||
This will |
This will: |
||
* simultaneously stretch bond |
* simultaneously stretch bond atom0-atom1 by 1 unit, and rotate about bond atom2-atom3 by 90°, in 100 steps; |
||
* scale the whole molecule up to twice its original size. As the --scale option is not tied, scanSurface will scale separately every possible geometry allowed by the previous (tied) options |
* scale the whole molecule up to twice its original size. As the --scale option is not tied, scanSurface will scale separately every possible geometry allowed by the previous (tied) options. |
||
''NB Ensure an equal number of steps for each tied parameter!'' |
''NB Ensure an equal number of steps for each tied parameter!'' |
Revision as of 14:25, 29 July 2016
QCMagic
QCMagic is a set of python libraries to manipulate qchem output, orbital-coefficient etc. files. You can clone it with
git clone ch-thom@git.csx.cam.ac.uk:QCHEM/qcmagic
The current main branch is winterClean and needs some TLC and documentation.
scanSurface.py
Overview
Example command:
$ python scanSurface.py --stretch=0,1,1,0.01 my_qchem_file.out Tag
Use this to run a scan on a molecule, running qchem at points on a surface defined by the options. The above example would stretch the bond between atom0 and atom1 by 10 units in steps of 0.01, and write the results to Tag.dat.
If multiple options are used, the scan will zigzag to cover the whole surface.
View all possible options with the command python scanSurface.py --help
.
Options
--normal-rotate
This may be used in simple cases to change a single bond angle. It relies on being able to work out the connectivity from knowledge of the bond lengths and VDW radii, so can be problematic if (a) your bond lengths are unusual (b) there are multiple paths between two atoms.
E.g. --normal-rotate=0,1,2,90,0.1
will:
- split the molecule between atom0 and atom1;
- check if each of the other atoms are connected to atom0. If they are, group them with atom0 and if not, group them with atom1;
- rotate the group of atoms containing atom1 about an axis through atom1, and normal to the plane containing atom0, atom1 and atom2.
--tie
An additional option --tie is soon to be included. This allows multiple parameters to change in sync with each other. For example, we might want to investigate the effect of varying two bond lengths at the same time, but don't care what happens when one is stretched and the other unchanged. This could be very useful in the context of molecular vibrations.
For each parameter you want to tie, two integers are required:
- one referring to the option;
Key: ext_charge 0; scale 1; stretch 2; rotate 3; normal_rotate 4; orth_rotate 5; all_normal_rotate 6; rotate_axis 7
- one specifying the particular instance of said option (zero-based).
Example command using --tie:
$ python scanSurface.py --stretch=0,1,1,0.01 --rotate=2,3,90,0.9 --scale=2 --tie=2,0,3,0'
This will:
- simultaneously stretch bond atom0-atom1 by 1 unit, and rotate about bond atom2-atom3 by 90°, in 100 steps;
- scale the whole molecule up to twice its original size. As the --scale option is not tied, scanSurface will scale separately every possible geometry allowed by the previous (tied) options.
NB Ensure an equal number of steps for each tied parameter!