François Bérenger
François Bérenger
this is only reasonable if there is a rather small number of fragments to choose from
there must be an integer parameter for safety to prevent looping; like maximum total number of fragments
fragments would need to be canonicalized first: keep only one copy of a given fragment per fragments table
The problem with sanitize=False then doing the "sanitization" later is that there is much more code involved. Correcting the formal charge of 4-valent N atoms is something pretty common. Common...
So, to be clear, the solution I propose is that we fix the incriminated molecule (if some option is present), warn about it, then go through the whole sanitization procedure....
Here is some code that does the correction I have in mind: ```python # N with valence 4 becomes N+ def correct_N_formal_charge(mol): for a in mol.GetAtoms(): if a.GetAtomicNum() == 7...
I think the goal of this code is to find the min and max partial charges in the molecule. 500 is used instead of +inf; -500 is used instead of...
@maclandrol maybe this can be closed; unless you still have a problem with it
Ok, so you did find a numerical bug where this code can return inf or nan.
Sorry, now it does; forgot to push the tags.