You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to parameterize this ligand with OFF2.0.0 using BioSimSpace, starting from an sdf
It has three chiral centers and +1 charge.
When I used biosimspace and sire == 2024.3.0 or 2024.4.0.dev, the error is 'Unable to create OpenFF Molecule!', what is wrose, this version can not parameterise Chiral molecules without charge having Same error.
When I used biosimspace and sire == 2024.2.0 or less, the error is 'Unable to create OpenFF Interchange object!',but it can parameterise Chiral molecules without charge.
To Reproduce
In [1]: import BioSimSpace as BSS
In [2]: lig = BSS.IO.readMolecules("lig_C48.sdf")[0]
In [3]: lig_param = BSS.Parameters.openff_unconstrained_2_0_0(lig).getMolecule()
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in :1 │
│ │
│ /home/roy/mambaforge/envs/openbiosim_3.10/lib/python3.10/site-packages/BioSimSpace/Parameters/_p │
│ rocess.py:244 in getMolecule │
│ │
│ 241 │ │ │ │ │ "Parameterisation failed! Last error: '%s'" % str(self._last_error) │
│ 242 │ │ │ │ ) │
│ 243 │ │ │ else: │
│ ❱ 244 │ │ │ │ raise _ParameterisationError( │
│ 245 │ │ │ │ │ "Parameterisation failed! Last error: '%s'" % str(self._last_error) │
│ 246 │ │ │ │ ) from None │
│ 247 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ParameterisationError: Parameterisation failed! Last error: 'Unable to create OpenFF Molecule!'
In [4]: lig = BSS.IO.readMolecules("lig_31.sdf")[0]
But, It does work with allow_undefined_stereo=True, that causes issues further down the line.
lig_31.sdf is chiral no charge. lig_C48.sdf is chiral with +1 [[charge.]] ligands.zip
Version of Python: 3.10
rdkit version is suitable for BSS version.
rdkit and librdkit 2024.03.5 for sire and bss ==2024.3.0 and 2024.4.0.dev
rdkit and librdkit 2024.03.3 for sire and bss == 2024.2.0
Many thanks for your help.
The text was updated successfully, but these errors were encountered:
The more recent version of BioSimSpace uses the Sire-to-RDKit conversion to avoid going via an intermediate file. This must be the reason why you can't parameterise a chiral molecule without charge. I'll take a look at the resulting RDKit molecule (loading from SDF and direct conversion) to see what the difference is.
With BSS.setVerbose(True) you can see the full error message. For the chiral ligand with charge this is:
ParameterisationError: Parameterisation failed! Last error: 'Unable to create OpenFF Molecule!: UndefinedStereochemistryError('Unable to make
OFFMol from RDMol: RDMol has unspecified stereochemistry. RDMol name: MOLUndefined chiral centers are:\n - Atom C (index 3)\n - Atom C (index
6)\n - Atom C (index 7)\n - Atom C (index 23)\n')'
As you say, it will work with allow_undefined_stereo=True, but this isn't likely to work in practice due to knock-on effects. I'll check the SDF to see if there's anything obvious that's wrong.
I've had reports of similar issues for ligands that worked with the previous release. I am tracking the debugging here. The issue appears to be with the Sire-to-RDKit conversion for certain molecules. Annoyingly the directly conversion fixed other issues, so it's hard to just revert the change, i.e. something would be broken with either approach. I also can't try both methods, since the conversion sometimes works but gives invalid output, so you could end up silently creating a molecule that is incorrect.
Describe the bug
I am unable to parameterize this ligand with OFF2.0.0 using BioSimSpace, starting from an sdf
It has three chiral centers and +1 charge.
When I used biosimspace and sire == 2024.3.0 or 2024.4.0.dev, the error is 'Unable to create OpenFF Molecule!', what is wrose, this version can not parameterise Chiral molecules without charge having Same error.
When I used biosimspace and sire == 2024.2.0 or less, the error is 'Unable to create OpenFF Interchange object!',but it can parameterise Chiral molecules without charge.
To Reproduce
In [1]: import BioSimSpace as BSS
In [2]: lig = BSS.IO.readMolecules("lig_C48.sdf")[0]
In [3]: lig_param = BSS.Parameters.openff_unconstrained_2_0_0(lig).getMolecule()
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in :1 │
│ │
│ /home/roy/mambaforge/envs/openbiosim_3.10/lib/python3.10/site-packages/BioSimSpace/Parameters/_p │
│ rocess.py:244 in getMolecule │
│ │
│ 241 │ │ │ │ │ "Parameterisation failed! Last error: '%s'" % str(self._last_error) │
│ 242 │ │ │ │ ) │
│ 243 │ │ │ else: │
│ ❱ 244 │ │ │ │ raise _ParameterisationError( │
│ 245 │ │ │ │ │ "Parameterisation failed! Last error: '%s'" % str(self._last_error) │
│ 246 │ │ │ │ ) from None │
│ 247 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ParameterisationError: Parameterisation failed! Last error: 'Unable to create OpenFF Molecule!'
In [4]: lig = BSS.IO.readMolecules("lig_31.sdf")[0]
In [5]: lig_param = BSS.Parameters.openff_unconstrained_2_0_0(lig).getMolecule()
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in :1 │
│ │
│ /home/roy/mambaforge/envs/bsstutorials/lib/python3.10/site-packages/BioSimSpace/Parameters/_proc │
│ ess.py:244 in getMolecule │
│ │
│ 241 │ │ │ │ │ "Parameterisation failed! Last error: '%s'" % str(self._last_error) │
│ 242 │ │ │ │ ) │
│ 243 │ │ │ else: │
│ ❱ 244 │ │ │ │ raise _ParameterisationError( │
│ 245 │ │ │ │ │ "Parameterisation failed! Last error: '%s'" % str(self._last_error) │
│ 246 │ │ │ │ ) from None │
│ 247 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ParameterisationError: Parameterisation failed! Last error:[ 'Unable to create OpenFF Molecule!'].
But, It does work with allow_undefined_stereo=True, that causes issues further down the line.
lig_31.sdf is chiral no charge. lig_C48.sdf is chiral with +1 [[charge.]]
ligands.zip
Version of Python: 3.10
rdkit version is suitable for BSS version.
rdkit and librdkit 2024.03.5 for sire and bss ==2024.3.0 and 2024.4.0.dev
rdkit and librdkit 2024.03.3 for sire and bss == 2024.2.0
Many thanks for your help.
The text was updated successfully, but these errors were encountered: