static void Demo() { var toluene = RWMol.MolFromSmiles("Cc1ccccc1"); var mol1 = RWMol.MolFromMolFile(Path.Combine("Data", "input.mol")); var stringWithMolData = new StreamReader(Path.Combine("Data", "input.mol")).ReadToEnd(); var mol2 = RWMol.MolFromMolBlock(stringWithMolData); using (var suppl = new SDMolSupplier(Path.Combine("Data", "5ht3ligs.sdf"))) { while (!suppl.atEnd()) { var mol = suppl.next(); if (mol == null) { continue; } Console.WriteLine(mol.getAtoms().Count); using (var maccs = RDKFuncs.MACCSFingerprintMol(mol)) { Console.WriteLine(ToString(maccs)); } } } using (var gzsuppl = new ForwardSDMolSupplier(new gzstream("Data/actives_5ht3.sdf.gz"))) { while (!gzsuppl.atEnd()) { var mol = gzsuppl.next(); if (mol == null) { continue; } Console.WriteLine(mol.getAtoms().Count); using (var maccs = RDKFuncs.MACCSFingerprintMol(mol)) { Console.WriteLine(ToString(maccs)); } } } }
// TODO: Add strictParsing public static RWMol MolFromMolFile(string molFileName, bool sanitize = true, bool removeHs = true) { return(RWMol.MolFromMolFile(molFileName, sanitize, removeHs)); }