Closed dotsdl closed 3 years ago
@jthorton noted that order of atoms is actually maintained by QCE Molecule
even if atoms moved around, so the problem really comes down to interpreting connectivity for the OpenFF Molecule
. This is difficult to do generally, but a filtering heuristic like the one he has proposed may be our best option in the interim.
Closed by #65
It is sometimes (in practice, rarely) the case that atoms move around during QM optimization, and in this case creating an
openff.toolkit.toplogy.Molecule
could result in a molecule with coordinates mismatched on the wrong atoms.The OpenFF
Molecule
object is created from the original CMILES attached to theQCElemental.models.Molecule
(QCEMolecule
) prior to the optimization, but the final geometry of the molecule, though always the same array size and shape, may have an ordering different than the starting geometry due to atom movements. This would proceed silently with the current implementation of creating an OpenFFMolecule
from a QCEMolecule
.We need a way to identify these cases upon creating an OpenFF
Molecule
, and throwing appropriate exceptions and/or warnings. @jthorton has a heuristic he has put intoopenff-qcsubmit
. It may also be possible to do checks on atom element identity matching against the CMILES-generated OpenFFMolecule
and the QCEMolecule
the geometry is being extracted from.