mbuild icon indicating copy to clipboard operation
mbuild copied to clipboard

Indices of atom loading from SMILES may not be definitive

Open daico007 opened this issue 3 years ago • 3 comments

Bug summary

Atom order might not be definitive when loading from a SMILES string when using RDKit. Specifically, the index of the atoms when loading from a SMILES string with rdkit may changed with different rdkit version. This may affect functions that rely on atom indices like mbuild.lib.recipes.Polymer. This issue is not imminent, but we probably need to assert the order when loading in a SMILES string to ensure we got when we expect when select a compound by its index. This issue is brought up by Jeffrey Wagner during the MoSDeF-OpenFF meeting.

Software versions

  • Which version of mBuild are you using? (python -c "import mbuild as mb; print(mb.__version__)")
  • Which version of Python (python --version)?
  • Which operating system?

daico007 avatar Feb 17 '22 20:02 daico007

Any updates on this @daico007?

CalCraven avatar Aug 11 '22 15:08 CalCraven

Nothing at the moment, I was thinking of implement some rudimentary sorting during the convert RDKit structure step to assert the orders are correct, but I have started nothing yet. This was something brought up by Jeff during one of our meeting with the OpenFF folks.

daico007 avatar Aug 11 '22 16:08 daico007

Gotcha yeah, I think this is a worthwhile issue since so many of our workflows are starting to use the loading from SMILES. I'll see if I can generate some code here to post that replicates the issue, to make sure it's still here.

CalCraven avatar Aug 11 '22 16:08 CalCraven