Skip to content

Commit 28d0988

Browse files
committed
Minor adjustments
1 parent 68f9af4 commit 28d0988

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

arc/job/adapters/ts/heuristics.py

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,31 +1221,6 @@ def setup_zmat_indices(initial_xyz: dict,
12211221
}
12221222
return initial_zmat, zmat_indices
12231223

1224-
def setup_zmat_indices(initial_xyz: dict,
1225-
xyz_indices: dict) -> Tuple[dict, dict]:
1226-
"""
1227-
Convert XYZ coordinates to Z-matrix format and set up corresponding indices.
1228-
1229-
Args:
1230-
initial_xyz: XYZ coordinates of the molecule.
1231-
xyz_indices: Dictionary mapping atom types to their XYZ indices.
1232-
1233-
Returns:
1234-
Tuple containing:
1235-
- dict: Z-matrix representation of the molecule
1236-
- dict: Dictionary mapping atom types to their Z-matrix indices
1237-
"""
1238-
initial_zmat = zmat_from_xyz(initial_xyz, consolidate=False)
1239-
zmat_indices = {
1240-
"a": key_by_val(initial_zmat.get("map", {}), xyz_indices["a"]),
1241-
"b": key_by_val(initial_zmat.get("map", {}), xyz_indices["b"]),
1242-
"f": key_by_val(initial_zmat.get("map", {}), xyz_indices["f"]),
1243-
"d": key_by_val(initial_zmat.get("map", {}), xyz_indices["d"]) if xyz_indices["d"] is not None else None
1244-
}
1245-
1246-
return initial_zmat, zmat_indices
1247-
1248-
12491224
def adjust_dihedral_angles(initial_zmat: dict,
12501225
zmat_indices: dict,
12511226
dihedrals_to_change_num: int) -> bool:
@@ -1263,10 +1238,8 @@ def adjust_dihedral_angles(initial_zmat: dict,
12631238
matches = get_matching_dihedrals(initial_zmat, zmat_indices['a'], zmat_indices['b'],
12641239
zmat_indices['f'], zmat_indices['d'])
12651240
total_dihedrals_num = len(matches)
1266-
12671241
if (dihedrals_to_change_num > total_dihedrals_num) and (total_dihedrals_num != 0):
12681242
return False
1269-
12701243
indices_list = matches[:dihedrals_to_change_num] if matches else None
12711244

12721245
if indices_list:
@@ -1412,19 +1385,17 @@ def process_family_specific_adjustments(is_set_1: bool,
14121385
d_atoms = ([[f_xyz, d_xyz, a_xyz], [b_xyz, a_xyz, o_xyz], [a_xyz, h1_xyz, o_xyz]]
14131386
if d_xyz is not None else
14141387
[[f_xyz, b_xyz, a_xyz], [b_xyz, a_xyz, o_xyz], [a_xyz, h1_xyz, o_xyz]])
1415-
14161388
r_value = hydrolysis_parameters['default_parameters']['r_value']
14171389
a_value = hydrolysis_parameters['family_parameters'][str(reaction_family)]['a_value']
14181390
d_values = hydrolysis_parameters['family_parameters'][str(reaction_family)]['d_values']
14191391

14201392
if is_set_1:
14211393
if reaction_family == 'ether_hydrolysis':
1422-
r_value = hydrolysis_parameters['family_parameters'][str(reaction_family)]['r_value_adjustment']
1394+
r_value[0] = hydrolysis_parameters['family_parameters'][str(reaction_family)]['r_value_adjustment']
14231395
initial_xyz = zmat_to_xyz(initial_zmat)
14241396
return generate_hydrolysis_ts_guess(initial_xyz, water, r_atoms, a_atoms, d_atoms,
14251397
r_value, a_value, d_values, zmats_total, is_set_1)
14261398
elif is_set_2:
1427-
d_atoms[0] = [f_xyz, b_xyz, a_xyz]
14281399
initial_xyz = zmat_to_xyz(initial_zmat)
14291400
return generate_hydrolysis_ts_guess(initial_xyz, water, r_atoms, a_atoms, d_atoms,
14301401
r_value, a_value, d_values, zmats_total, is_set_1, threshold=0.6)

0 commit comments

Comments
 (0)