Hi Andy,
A better option is to sanitize the products of a reaction enumeration
before using them as reactants.
Look at this example from RDKit "Getting Started" documentation.
Note that the molecules that are produced by the chemical reaction
processing code are not sanitized, as this artificial
Hi Christos,
Many thanks for the reply. I hadn't appreciated that the presence of a
single invalid reagent would bring the entire thing crashing down, rather
than issuing a warning/error and moving onto other molecules in the set.
Good to know, and I'll have to be less lazy in my code ;-)
Best,
A
Hi Andy,
The reason that your code breaks is that the second product of the third
iteration ( 'NN(Cc1c1)(Cc1c1)Cc1c1') is not a valid
molecule.
And when calling Chem.MolFromSmiles( 'NN(Cc1c1)(Cc1c1)Cc1c1')
it creates a None object.
So you have to filter out the mole
3 matches
Mail list logo