Hi Jean-Marc,
You can strip the valence field from the MolBlock with a regex:
import re
regex = re.compile(r"^(\s*\d+\.\d{4}\s*\d+\.\d{4}\s*\d+\.\d{4} ... \d \d
\d \d \d )(\d)(.*)$")
print("\n".join(regex.sub(r"\g<1>0\g<3>", ...: line) for line in
Chem.MolToMolBlock(Chem....:
Dear all,
the atom block of the Connection Table produced by RDKit
(Chem.MolToMolBlock() function)
from the '[NH4+]' SMILES chain is
0. 0. 0. N 0 0 0 0 0 4 0 0 0 0 0
in which the '4' in column 10 indicates that the number of bonds of the
N atoms (implicit
2 matches
Mail list logo