Skip to content

Commit

Permalink
put back extending linear segment as default because its breaking eve…
Browse files Browse the repository at this point in the history
…rything to not have it be the default and I dont remember what I was debugging
  • Loading branch information
snelliott committed Jun 24, 2024
1 parent 62677af commit e1a0750
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion automol/graph/_0embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def distance_bounds_matrices(
# 3. reopen bounds on the torsions from the reactant
# (also opens >5-atom distances)
if relax_torsions:
rot_bkeys = rotational_bond_keys(gra, extend_lin_seg=False)
rot_bkeys = rotational_bond_keys(gra)

# open up torsions at rotational bonds
tors_ijs = [
Expand Down
4 changes: 2 additions & 2 deletions automol/graph/base/_06heur.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def rotational_bond_keys(
lin_keys=lin_keys,
with_h_rotors=with_h_rotors,
with_ch_rotors=with_ch_rotors,
extend_lin_seg=False
extend_lin_seg=True
)
rot_bkeys = [frozenset(ks[-2:]) for ks in rot_skeys_lst]
rot_bkeys = frozenset(sorted(rot_bkeys, key=sorted))
Expand Down Expand Up @@ -275,7 +275,7 @@ def rotational_coordinates(
lin_keys: Optional[List[int]] = None,
with_h_rotors: bool = True,
with_ch_rotors: bool = True,
extend_lin_seg: bool = False
extend_lin_seg: bool = True
):
"""Get torsion coordinates for rotational segments
Expand Down
4 changes: 2 additions & 2 deletions automol/tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ def test__rotational_bond_keys():

# Check that we don't misidentify rotational bond keys
cgr = automol.smiles.graph("C#CC=C")
assert graph.rotational_bond_keys(cgr, extend_lin_seg) == frozenset()
assert graph.rotational_bond_keys(cgr) == frozenset()


def test__rotational_segment_keys():
Expand Down Expand Up @@ -1615,7 +1615,7 @@ def test__rotational_coordinates():
tors_dct = automol.zmat.torsion_coordinates(zma, zgra)
coo_key_lst0 = set(map(tuple, map(reversed, tors_dct.values())))

coo_key_lst = graph.rotational_coordinates(zgra, extend_lin_seg=True, segment=False)
coo_key_lst = graph.rotational_coordinates(zgra, segment=False)
assert coo_key_lst == coo_key_lst0, f"{coo_key_lst} != {coo_key_lst0}"

# Make sure the segment version runs
Expand Down
4 changes: 2 additions & 2 deletions automol/tests/test_graph_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,8 @@ def test__rotational_bond_keys():
},
)
rtsg = graph.ts.reverse(tsg)
assert graph.rotational_bond_keys(tsg, extend_lin_seg=False) == frozenset()
assert graph.rotational_bond_keys(rtsg, extend_lin_seg=False) == frozenset()
assert graph.rotational_bond_keys(tsg) == frozenset()
assert graph.rotational_bond_keys(rtsg) == frozenset()


def test__radical_atom_keys():
Expand Down
2 changes: 1 addition & 1 deletion automol/tests/test_rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test__rotor_with_dummy_atoms():
rotors = rotor.rotors_from_zmatrix(C4H5OH_ZMA)

tors_lst = rotor.rotors_torsions(rotors, key_typ="geom", sort=True)
assert len(tors_lst) == 2
assert len(tors_lst) == 3

rotor_names = rotor.rotors_torsion_names(rotors)
assert rotor_names == (("D5",), ("D12",))
Expand Down

0 comments on commit e1a0750

Please sign in to comment.