Skip to content

Commit

Permalink
Cleans up and fixes linting complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
avcopan committed Nov 1, 2023
1 parent e5ff536 commit a866f81
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 31 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
[X] Implement Reaction object structure addition
[X] Stereo-correct join for atom stereo
[X] Stereo-correct join for bond stereo
[ ] Fix bug in test_graph.py/test__smiles()
LEFT OFF AT automol.geom.ts.join_at_forming_bond()
-> SEE test_ts_geometry.ipynb
[ ] Figure out and TEST reagent reordering
Expand Down
2 changes: 1 addition & 1 deletion automol/geom/ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def geometry_from_reactants(
# 2. Correct the stereochemistry against the TS graph, so it is consistent with both
# reactants and products
ts_geo = automol.graph.stereo_corrected_geometry(tsg, geo, geo_idx_dct=geo_idx_dct)

print(bdist_factor)
return ts_geo
# This
# # 1. Evaluate the distances, updating them for the TS graph
Expand Down
13 changes: 3 additions & 10 deletions automol/graph/base/_geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import automol.geom.base
from automol import util
from automol.extern import py3dmol_, rdkit_
from automol.graph.base._algo import (
branch_atom_keys,
ring_systems_atom_keys,
Expand Down Expand Up @@ -386,7 +385,7 @@ def linear_vinyl_corrected_geometry(


def geometry_pseudorotate_atom(
gra, geo, key, ang=numpy.pi, degree=False, geo_idx_dct=None, debug_visualize=False
gra, geo, key, ang=numpy.pi, degree=False, geo_idx_dct=None
):
r"""Pseudorotate an atom in a molecular geometry by a certain amount
Expand Down Expand Up @@ -460,13 +459,6 @@ def geometry_pseudorotate_atom(
)

geo = automol.geom.rotate(geo, rot_axis, ang, orig_xyz=xyz, idxs=rot_keys)
if debug_visualize:
view = py3dmol_.create_view()
rdm = rdkit_.from_geometry_with_graph(geo, gra)
mlf = rdkit_.to_molfile(rdm)
view = py3dmol_.view_molecule_from_molfile(mlf, view=view)
view = py3dmol_.view_vector(rot_axis, orig_xyz=xyz, view=view)
view.show()
else:
geo = None

Expand Down Expand Up @@ -554,7 +546,8 @@ def geometry_dihedrals_near_value(

nkeys_dct = atoms_neighbor_atom_keys(gra)
bnd_keys = backbone_bond_keys(gra)
bnd_keys -= set(itertools.chain(*rings_bond_keys(gra)))
if not rings:
bnd_keys -= set(itertools.chain(*rings_bond_keys(gra)))

dih_keys = []
for atm2_key, atm3_key in bnd_keys:
Expand Down
17 changes: 0 additions & 17 deletions automol/graph/base/_stereo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,20 @@

import numpy

import automol.amchi.base # !!!!
import automol.geom.base # !!!!
from automol.graph.base._algo import (
connected_components,
)
from automol.graph.base._amchi import connected_amchi_with_indices
from automol.graph.base._canon import (
is_canonical_enantiomer,
parity_evaluator_from_geometry_,
refine_priorities,
reflect_local_stereo,
stereo_assignment_representation,
stereogenic_atom_keys,
stereogenic_bond_keys,
stereogenic_keys,
stereogenic_keys_from_priorities,
to_local_stereo,
)
from automol.graph.base._core import (
atom_keys,
atom_stereo_keys,
atom_stereo_parities,
bond_stereo_keys,
bond_stereo_parities,
frozen,
has_stereo,
implicit,
is_ts_graph,
relabel,
set_atom_stereo_parities,
set_bond_stereo_parities,
set_stereo_parities,
stereo_parities,
without_stereo,
Expand Down
1 change: 0 additions & 1 deletion automol/tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,6 @@ def test__smiles():
"""
smis = [
# Rings:
'C1[C@@]2(C3)O[C@@]2(C[N@H]3)OC1',
r'[CH2]/C=C1\[N@H]C(=C1)O[O]',
'C1CC1',
# Stereo atoms:
Expand Down
1 change: 0 additions & 1 deletion phydat/phycon.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""
Library of physical constants
"""
import numpy
from qcelemental import constants as qcc


Expand Down

0 comments on commit a866f81

Please sign in to comment.