Skip to content

Commit

Permalink
index conformers not... ids (#1091)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeff Wagner <[email protected]>
  • Loading branch information
lilyminium and j-wags authored Jan 10, 2022
1 parent 7fa8343 commit 5493557
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openff/toolkit/utils/rdkit_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,13 +1175,14 @@ def _elf_compute_rms_matrix(cls, molecule: "Molecule") -> np.ndarray:

n_conformers = len(molecule.conformers)

# rdkit does not have conformer indices but conformer "ids"
conformer_ids = [conf.GetId() for conf in rdkit_molecule.GetConformers()]

# Compute the RMS matrix making sure to take into account any automorhism (e.g
# a phenyl or nitro substituent flipped 180 degrees.
rms_matrix = np.zeros((n_conformers, n_conformers))

for i, j in itertools.combinations(conformer_ids, 2):
for i, j in itertools.combinations(np.arange(n_conformers), 2):

rms_matrix[i, j] = AllChem.GetBestRMS(
rdkit_molecule,
Expand Down

0 comments on commit 5493557

Please sign in to comment.