Skip to content

Commit

Permalink
Added tests for rotate_substituent
Browse files Browse the repository at this point in the history
  • Loading branch information
kmlefran committed Jan 29, 2024
1 parent 3828f7a commit 4d41919
Show file tree
Hide file tree
Showing 70 changed files with 414,730 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified subproptools/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
8 changes: 7 additions & 1 deletion subproptools/sub_reor.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ def rotate_substituent_aiida(
molecule_xaxis = _set_xaxis(_set_origin(xyz_w_y_pt, originAtom), negXAtom)
final_y = molecule_xaxis[posYAtom - 1]
final_orientation = _set_yaxis(molecule_xaxis[0:-1], final_y)
elif posYAtom:
posYPoint = molecule_xyz["xyz"][posYAtom - 1]
else:
molecule_xaxis = _set_xaxis(
_set_origin(molecule_xyz["xyz"], originAtom), negXAtom
Expand Down Expand Up @@ -745,9 +747,13 @@ def rotate_substituent(sumFileNoExt, originAtom, negXAtom, posYAtom=0):
# perform reorientation
if not posYAtom and len(molecule_xyz["Atoms"]) > 2:
posYPoint = _get_posy_point(sumFileNoExt, atomDict, attachedAtom, negXAtomLabel)
elif posYAtom:
posYPoint = molecule_xyz["xyz"][posYAtom - 1]
else:
posYPoint = []
if len(posYPoint) > 0:
print(molecule_xyz["xyz"])
print(posYPoint)
xyz_w_y_pt = np.append(molecule_xyz["xyz"], [posYPoint], axis=0)
# perform reorientation
molecule_xaxis = _set_xaxis(_set_origin(xyz_w_y_pt, originAtom), negXAtom)
Expand Down Expand Up @@ -856,7 +862,7 @@ def rotate_sheet(
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 if override desired, numerical index(starting form 1) of atom to place on +y
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, label2... label depicting situation for molecule(substrate, method) e.g. "SubH", "B3LYP/cc-pvDZ" etc
Expand Down
1,630 changes: 1,630 additions & 0 deletions tests/test_data/CFHCH3.sum

Large diffs are not rendered by default.

2,388 changes: 2,388 additions & 0 deletions tests/test_data/CFHCH3_atomicfiles/c1.agpviz

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions tests/test_data/CFHCH3_atomicfiles/c1.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Title Card Required
C1
Auto
Critical Point Data
4 0 0
-1.07200447546262E+00 2.75078304057096E-01 -6.77683736037888E-10 C5
2.99115721546819E-01 1.79733970154982E+00 1.05756656144443E+00 H2
2.99115732727216E-01 1.79733974888736E+00 -1.05756653094508E+00 H3
9.14689442262505E-01 4.56991519494873E-01 6.56510350176200E-10 F4
0 0
Options
Integer 3
42 1
48 2
52 1
Real 0
591 changes: 591 additions & 0 deletions tests/test_data/CFHCH3_atomicfiles/c1.int

Large diffs are not rendered by default.

Loading

0 comments on commit 4d41919

Please sign in to comment.