Closed kexul closed 3 years ago
If you visualise the sdf
file, you can see that it's not actually protonated. This is because RDKit
makes the hydrogens implicit by default when you load the mol2
file. If you pass protonated=True
, it will then obviously result in an error, because it's not actually protonated and you are trying to parametrise an unprotonated ligand. However, it is going to crash even if you input protonated=False
, because RDKit
has problems with unprotonated benzamidines and you have to always pass them manually protonated in practice.
The above script will work if you generate the sdf
file as follows:
from rdkit import Chem
mol = Chem.MolFromMol2File('ligand.mol2', removeHs=False)
Chem.MolToMolFile(mol, 'ligand.sdf')
I got a
mol2
file with net charge+1
, it could be properly parameterized by ProtoCaller, when I converted it tosdf
, an error occurred.Here is the original
mol2
file and convertedsdf
file. ligand.zipHere is the code to reproduce:
Here is the code I've used to convert
mol2
tosdf
: