Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that determining rotors twice doesn't cause an issue. (#668)
Solves the issue that determining rotors twice may cause. For example: ```python n3_xyz = """N -1.1997440839 -0.1610052059 0.0274738287 H -1.4016624407 -0.6229695533 -0.8487034080 H -0.0000018759 1.2861082773 0.5926077870 N 0.0000008520 0.5651072858 -0.1124621525 H -1.1294692206 -0.8709078271 0.7537518889 N 1.1997613019 -0.1609980472 0.0274604887 H 1.1294795781 -0.8708998550 0.7537444446 H 1.4015274689 -0.6230592706 -0.8487058662""" spc = ARCSpecies(label='N3', xyz=n3_xyz, multiplicity=1, smiles='NNN', directed_rotors = {"brute_force_opt":[["all"]]}) # taken from species_test.py spc.determine_rotors() print(spc.rotors_dict) spc.determine_rotors() ``` outputs: ```python {0: {'pivots': [[1, 4], [4, 6]], 'top': [[1, 2, 5], [6, 7, 8]], 'scan': [[2, 1, 4, 6], [1, 4, 6, 7]], 'torsion': [[1, 0, 3, 5], [0, 3, 5, 6]], 'number_of_running_jobs': 0, 'success': None, 'invalidation_reason': '', 'times_dihedral_set': 0, 'trsh_counter': 0, 'trsh_methods': [], 'scan_path': '', 'directed_scan_type': 'brute_force_opt', 'directed_scan': {}, 'dimensions': 2, 'original_dihedrals': [], 'cont_indices': []}} SpeciesError: The pivots [1, 2] do not represent a rotor in species N3. Valid rotor pivots are: [[[1, 4], [4, 6]], [1, 4], [4, 6]] ```
- Loading branch information