Rotation Usage

Installation

To use subproptools, first install it using pip:

(.venv) $ pip install subproptools

Perform Rotation for a Molecule

subproptools.sub_reor.rotate_substituent(sumFileNoExt, originAtom, negXAtom, posYAtom=0)[source]

Rotates a substituent to the defined coordinate system.

Parameters:
  • sumFileNoExt (string) – name of a sum file, without the .sum extension

  • originAtom (int) – the integer number of the atom to place at the origin

  • negXAtom (int) – the integer number of the atom to place along the -x axis

  • posYAtom (int) – override for above defined +y point, set to posYAtom instead

Returns:

pandas data frame of output geometry (columns Atom, x, y, z)

Examples

>>> rotate_substituent('SubCH3_CFH2_anti2146_reor',1,2)
Atom    x   y   z
C1      0.  0.  0.
H2 -{float} 0.  0.
.(remaining geometry)
.
.

Notes

Coordinate system defined as: originAtom at (0,0,0) negXAtom at (-x,0,0) Atom on +y defined as: average of lone pairs for 2 lone pairs on originAtom Position of lone pair for 1 lone pair on originAtom For no lone pairs: map BCPs onto reference for the atom type Minimum distance in BCP space defined the atom to put on +y

Output Rotated Molecule to gjf file

subproptools.sub_reor.output_to_gjf(old_file_name, reor_geom, esm='wB97XD', basis_set='aug-cc-pvtz', add_label='', n_procs=4, mem='3200MB', charge=0, multiplicity=1, wfx=True)[source]

Given a rotated molecule, writes new geometry to single point Gaussian calculation

Parameters:
  • file (old_file_name - the file name of the sum)

  • rotate_substituent (reor_geom - the data frame output of)

  • point (esm - whatever electronic structure method is to be used in single)

  • used (basis_set - basis set to be)

  • name (add_label - any extra label for file)

  • empty (default)

  • clusters (mem='3200MB' -amount of memory for remote)

  • desired (set to 0 if not)

  • clusters

  • desired

  • molecule (multiplicity - multiplicity of)

  • molecule

  • wfx (wfx - whether or not to write)

  • True (default)

Returns:

no return, but creates new gjf file old_file_name_reor_add_label.gjf File looks like: %chk=new_file_name.chk %nprocs=n_procs %mem=mem #p esm/basis_set output=wfx nosymmetry

single point on old_file reoriented by subproptools

charge multiplicity (xyz geom)

new_file_name.wfx (blank lines)

Rotate a Set of Molecules

subproptools.sub_reor.rotate_sheet(csv_file, esm, basis, n_procs=4, mem='3200MB', wfx=True, extra_label='')[source]

Given csv file and Gaussian calculation options, reorient files in csv_file and output gjf

Parameters:
  • columns (csv_file - csv file containining these)

  • Substituent

  • originAtom

  • negXAtom

  • posYAtom

  • charge

  • multiplicity

  • label1 (substrate, method)

  • label2

  • ...

  • Substituent – string label for substituent

  • originAtom – numerical index(starting form 1) of atom to use as origin

  • negXAtom – numerical index(starting form 1) of atom to place on -x

  • posYAtom – usually 0, but override if desired, numerical index(starting form 1) of atom to place on +y

  • charge – charge of the molecule

  • multiplicity – multiplicity of the molecule

  • label1

  • molecule (label2... label depicting situation for)

  • esm – electronic structure method (HF/MP2/DFT functional/etc)

  • basis – string for basis to be used

  • n_procs – number of processors for use on Cedar, default to 4

  • mem – memory to use on Cedar, default to 3200MB

  • wfx – if we wish to write wfx, default True

  • extra_label – an additional label for the reoriented file if needed, default none

Returns:

no return value, but outputs to gjf files in working directory(or directory in path of filenames)

Rotation with Precomputed Atomic and Critical Point Properties

subproptools.sub_reor.rotate_substituent_aiida(sum_file_folder, atom_dict, cc_dict, originAtom=1, negXAtom=2, posYAtom=0)[source]

Rotates a substituent to the defined coordinate system.

Parameters:
  • sum_file_folder (aiida FolderData) – FolderData object containing .sum file

  • atom_dict – dict of output from get_atomic_props

  • cc_dict – dict of VSCC data

  • originAtom (int) – the integer number of the atom to place at the origin

  • negXAtom (int) – the integer number of the atom to place along the -x axis

  • posYAtom (int) – override for above defined +y point, set to posYAtom instead

Returns:

dictionary ‘atomic_symbols’ for atomic symbols and ‘geom’ for 3xN np.array of rotated coordinates

Examples

>>> rotate_substituent('SubCH3_CFH2_anti2146_reor',1,2)
Atom    x   y   z
C1      0.  0.  0.
H2 -{float} 0.  0.
.(remaining geometry)
.
.

Notes

Coordinate system defined as: originAtom at (0,0,0) negXAtom at (-x,0,0) Atom on +y defined as: average of lone pairs for 2 lone pairs on originAtom Position of lone pair for 1 lone pair on originAtom For no lone pairs: map BCPs onto reference for the atom type Minimum distance in BCP space defined the atom to put on +y