Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
avcopan committed Sep 7, 2021
1 parent dd94f65 commit 4e4bd1f
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions automol/geom/_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ def is_unique(geo, geo_lst, check_dct=None):

# def hydrogen_bonded_structure(geo, grxn=None,
# dist_thresh=4.55, angle_thresh=1.92):
def hydrogen_bonded_structure(geo, grxn=None,
dist_thresh=4.92, angle_thresh=1.92):
# def hydrogen_bonded_structure(geo, grxn=None,
# dist_thresh=5.3, angle_thresh=1.92):
def hydrogen_bonded_structure(geo, grxn=None,
dist_thresh=4.92, angle_thresh=1.92):
""" Compare bond lengths in structure to determine if there
is a hydrogen bond
Expand Down
2 changes: 1 addition & 1 deletion automol/inchi/_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def add_stereo(ich):
:rtype: str
"""
geo = geometry(ich)
print ('geometry test:',automol.geom.string(geo))
print('geometry test:', automol.geom.string(geo))
ich = automol.geom.inchi(geo, stereo=True)
return ich

Expand Down
6 changes: 3 additions & 3 deletions automol/par.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def string(rxn_class):
cls_str = typ(rxn_class)

out_str = ''
for string in (isc_str, radrad_str, spin_str, cls_str):
if string:
out_str += '{} '.format(string)
for str_ in (isc_str, radrad_str, spin_str, cls_str):
if str_:
out_str += '{} '.format(str_)

return out_str.strip()

Expand Down
9 changes: 6 additions & 3 deletions automol/reac/_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ def hydrogen_migrations(rct_gras, viable_only=True):


# 2. Homolytic scissions
def homolytic_scissions(rct_gras, viable_only=True):
# AVC comment: replaced commented-out if statement by changing the default here
# to False. Is the viability check broken for this case?
# def homolytic_scissions(rct_gras, viable_only=True):
def homolytic_scissions(rct_gras, viable_only=False):
""" find all possible homolytic scission reactions for these reactants
:param rct_gras: graphs for the reactants, without stereo and without
Expand Down Expand Up @@ -149,8 +152,8 @@ def homolytic_scissions(rct_gras, viable_only=True):
prds_keys=list(map(atom_keys, prd_gras)),
))
# filter removes all reactions
# if viable_only:
# rxns = filter_viable_reactions(rxns)
if viable_only:
rxns = filter_viable_reactions(rxns)

return ts_unique(rxns)

Expand Down
2 changes: 1 addition & 1 deletion automol/reac/_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def elimination_grid(zrxn, zma, npoints=(7, 5)):

grid1 = numpy.linspace(r1min, r1max, npoints1)
grid2 = numpy.linspace(r2min, r2max, npoints2)

print(automol.zmat.string(zma))
print(frm_name, frm_bnd_len)
print(grid1)
Expand Down
2 changes: 1 addition & 1 deletion automol/reac/_zmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,5 +385,5 @@ def _zma_names(zma, bnd_keys):

frm_bnd_keys = ts.forming_bond_keys(zrxn.forward_ts_graph)
brk_bnd_keys = ts.breaking_bond_keys(zrxn.forward_ts_graph)

return (_zma_names(zma, frm_bnd_keys), _zma_names(zma, brk_bnd_keys))
3 changes: 2 additions & 1 deletion automol/rotor/_rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def grids(rotor_lst,
for rotor in rotor_lst:
rotor_grids = ()
for torsion in rotor:
print('rotor grids input test:', torsion.zma, torsion.name, span, torsion.symmetry, increment)
print('rotor grids input test:', torsion.zma, torsion.name,
span, torsion.symmetry, increment)
rotor_grids += (
automol.pot.grid(
torsion.zma, torsion.name,
Expand Down
8 changes: 4 additions & 4 deletions automol/tests/test_reac.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy
import automol
from automol.par import ReactionClass
from automol.graph import ts
# from automol.graph import ts

SUBSTITUTION_RXN_STR = """
reaction class: substitution
Expand Down Expand Up @@ -894,8 +894,8 @@ def _check_reaction(rxn_obj,
# print(automol.zmat.string(zma))
# print(zrxn)

frm_bnd_keys = ts.forming_bond_keys(zrxn.forward_ts_graph)
brk_bnd_keys = ts.breaking_bond_keys(zrxn.forward_ts_graph)
# frm_bnd_keys = ts.forming_bond_keys(zrxn.forward_ts_graph)
# brk_bnd_keys = ts.breaking_bond_keys(zrxn.forward_ts_graph)
# print('keys')
# print(frm_bnd_keys)
# print(brk_bnd_keys)
Expand All @@ -918,7 +918,7 @@ def _check_reaction(rxn_obj,
gbnd_keys = automol.reac.rotational_bond_keys(grxn)
assert len(gbnd_keys) == len(bnd_keys)

zaxes = sorted(map(sorted, bnd_keys))
# zaxes = sorted(map(sorted, bnd_keys))
axes = sorted(map(sorted, gbnd_keys))
tors_symms = [automol.reac.rotational_symmetry_number(grxn, *a)
for a in axes]
Expand Down
6 changes: 3 additions & 3 deletions phydat/phycon.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
SOL = (qcc.get('speed of light in vacuum') *
qcc.conversion_factor('meter / second', 'bohr hartree / h'))
SOLMS = qcc.get('speed of light in vacuum')
KB = qcc.get('kb') # The Boltzmann constant (JK$^{-1}$)
H = qcc.get('h') # The Planck constant (Js)
HBAR = qcc.get('hbar') # The Planck constant (Js) over 2pi
KB = qcc.get('kb') # The Boltzmann constant (JK$^{-1}$)
H = qcc.get('h') # The Planck constant (Js)
HBAR = qcc.get('hbar') # The Planck constant (Js) over 2pi

# Energy Conversion factors
KCAL2CAL = qcc.conversion_factor('kcal/mol', 'cal/mol')
Expand Down

0 comments on commit 4e4bd1f

Please sign in to comment.