Closed ghost closed 5 years ago
Please let me know the compound that throws the above exception.
These 4 fingerprinter's all fail with the same error, for all structures randomly selected from Chembl. I pulled out one example "O=C(C1=C(C=2C=CC(Cl)=C(Cl)C2)CCC1)N3CCOCC3", which fails with the Pubchem fp. The same process also uses the Lingo, Hybridization, EState, Distance Moment, Signature and Circular fp's which succeed for all the same randomly selected structures Is the common element to the failing fp methods Smarts pattern matching ?
I could not reproduce it using the following code with NCDK-1.5.2 from NeGet. Could you post a code to repro.
using NCDK;
using NCDK.Fingerprints;
class Program
{
static void Main(string[] args)
{
var printer = new PubchemFingerprinter(CDK.Builder);
var mol = CDK.SmilesParser.ParseSmiles("O=C(C1=C(C=2C=CC(Cl)=C(Cl)C2)CCC1)N3CCOCC3");
var bfp = printer.GetBitFingerprint(mol);
}
}
Has ChemObjectBuilder been replaced?
I use
var mol = new SmilesParser(ChemObjectBuilder.Instance).ParseSmiles(m.smiles);
where m.smiles is an example smiles string
CDK.Builder equals NCDK.Silent.ChemObjectBuilder and the following code also worked fine.
using NCDK.Default; // Silent also works fine
using NCDK.Fingerprints;
using NCDK.Smiles;
class Program
{
static void Main(string[] args)
{
var printer = new PubchemFingerprinter();
var mol = new SmilesParser(ChemObjectBuilder.Instance).ParseSmiles("O=C(C1=C(C=2C=CC(Cl)=C(Cl)C2)CCC1)N3CCOCC3");
var bfp = printer.GetBitFingerprint(mol);
}
}
Thanks for checking. Leave it with me and I will investigate further.
Found the problem which is not an NCDK issue.
Using Nuget NCDK package 1.5.2 on .Net Core 2.1 Several fingerprint methods (eg KlekotaRoth, SubStructure, MACCS, Pubchem) failing with error "Specified method is not supported."