I’ve written a program that does this: https://github.com/jensengroup/xyz2mol
You need to set "charged_fragments = False” to work with radicals
Best regards, Jan
On 15 Nov 2018, at 15:05, Peter St. John
mailto:peterc.stj...@gmail.com>> wrote:
Makes sense, apologies for the lack of details --
Hi Peter,
a few weeks ago I wrote something very close to what you describe:
https://gist.github.com/ptosco/4844d3635cf14d11e5e14381993915c1
which takes coordinates from a XYZ block (which is what you get from
Gaussian) and assigns them to an RDKit molecule generated from a SMILES
string. I
> Essentially I'm taking the result of a Gaussian optimization (for a radical);
> constructing an SDF file with OpenBabel (via cclib), and then trying to read
> the result in RDKit.
> I have the SMILES string of the radical, but the connectivity is lost in the
> gaussian output file. So the SDF
Makes sense, apologies for the lack of details -- it was a bit of a
convoluted process to get to that molecule.
Attached is a python script that hopefully reproduces it.
Essentially I'm taking the result of a Gaussian optimization (for a
radical); constructing an SDF file with OpenBabel (via
Hi Peter,
Without seeing how you're building the molecule this one is a bit tricky to
help with.
If I start with a standard molecule and just adjust the valence count
things are fine:
In [22]: m = Chem.MolFromSmiles('CNC(C)C')
In [23]: m.GetAtomWithIdx(0).SetNumRadicalElectrons(1)
In [24]: mh
a.GetNumRadicalElectrons() does have the right number.
If it set all the atoms to not have implicit hydrogens with
for atom in mol.GetAtoms():
atom.SetNoImplicit(True)
then I still get a sanitization error with
>>> Chem.SanitizeMol(mol)
ValueError: Sanitization error: Explicit valence for
I have a molecule with radicals for which I'm trying to correct the bond
orders.
The mol block I have currently is shown below.
Ultimately it thinks the first carbon (which is supposed to have 2 explicit
hydrogens, 1 C-C bond, and 1 radical electron) has a valence of 5. So when
I try to call
7 matches
Mail list logo