Dear Paolo,
Thank you for all the tips. I was not aware of these.
In fact I did suspect that that [H] has something to do with the
stereochemistry, since the original F made the bond stereo. However, the
"[H]" did not go away even after I called
AllChem.SanitizeMol(m6)
AllChem.AssignStereochemis
Hi Ling,
By default hydrogens defining double bond stereochemistry are not removed.
You may remove that residual hydrogen by either
params = Chem.RemoveHsParameters()
params.removeDefiningBondStereo = True
Chem.RemoveHs(m6, params)
or simply
Chem.RemoveAllHs(m6)
I think you may obtain the same
Cool, good to know this special property. Thank you Andrew!
Ling
Andrew Dalke 於 2021年11月2日週二 下午10:36寫道:
> Hi Ling,
>
> If there are symmetries then a substructure search like will only give
> you one mapping, and that might not be the canonical mapping.
>
> What you're looking for is the spec
Hi Ling,
If there are symmetries then a substructure search like will only give you
one mapping, and that might not be the canonical mapping.
What you're looking for is the special property _smilesAtomOutputOrder
>>> from rdkit import Chem
>>> mol = Chem.MolFromSmiles("O=C(NCc1cc(OC)c(O)cc1)
O.K. Problem solved. Sorry about the spam, folks.
I can use GetSubstructMatch, as follows.
# sinput is the input smiles
# scanon is the output smiles
minput = Chem.MolFromSmiles(sinput)
scanon=Chem.MolToSmiles(minput)
mcanon=Chem.MolFromSmiles(scanon)
map_forward = minput.GetSubstructMatch(mcano
> On Oct 21, 2021, at 04:50, Ling Chan wrote:
>
> I got the attached sdf. When I did a MolToSmiles, it gives me the following.
>
> >>> for m in Chem.SDMolSupplier("pdb_structures/1q6k_ligand.sdf"):
> ... print (Chem.MolToSmiles(m))
> ...
> [CH3:0][C:0]([CH3:0])([CH3:0])[O:0][C:0](=[O:0])[N
On Nov 18, 2019, at 17:40, David Cosgrove wrote:
>
> Point taken. I don’t think you’d be able to get RDKit to spit such SMILES
> strings out unless you tortured it pretty hard, however.
Did someone mention one of my favorite things to do? :) See:
http://dalkescientific.com/writings/diary/
On Mon, 18 Nov 2019 16:40:28 +
David Cosgrove wrote:
> Point taken. I don’t think you’d be able to get RDKit to spit such SMILES
> strings out unless you tortured it pretty hard, however.
Export smiles with arbitrary given atom order is diffrent problem.
Normally working with mol object you
Hi Rocco,
Point taken. I don’t think you’d be able to get RDKit to spit such SMILES
strings out unless you tortured it pretty hard, however.
Dave
On Mon, 18 Nov 2019 at 16:36, Rocco Moretti wrote:
> Actually, it is possible to get arbitrary orders, if you (ab)use the '.'
> component ("zero orde
Actually, it is possible to get arbitrary orders, if you (ab)use the '.'
component ("zero order bond") directive and the numeric bonding ("ring
closure") directives:
>>> Chem.MolToSmiles( Chem.MolFromSmiles("O1.Cl2.C12" ) )
'OCCl'
Whether you want to do things that way is another question.
On Mo
Hi Rafal,
It is not always possible to preserve the atom ordering in the SMILES
string because there is an implied bond between contiguous symbols in the
SMILES. I think, for example, that the molecule with the SMILES OCCl
couldn’t have the order in the molecule object O first, Cl second, C third,
Dear Jose Manuel,
Many thanks for your quick answer and for your script.
All the best,
Jean-Marc
Le 01/02/2019 à 13:20, Jose Manuel Gally a écrit :
Dear Jean-Marc,
I believe this can be achieved by using the Mol property
"_smilesAtomOutputOrder", which is set only after using the functi
Dear Jean-Marc,
I believe this can be achieved by using the Mol property
"_smilesAtomOutputOrder", which is set only after using the function
Chem.MolToSmiles.
Please find attached a very simple example of how it can be extracted.
Cheers,
Jose Manuel
On 01.02.19 13:03, Jean-Marc Nuzillard w
I agree with Andrew's suggestion. The optional list argument defaulting to None
exactly how I would solve it and fits (I think) with at least most of the RDKit.
-greg
On Mon, Dec 19, 2016 at 9:14 PM +0100, "Brian Kelley"
wrote:
I'm happy to do that as long as there is a consensus.
I'm happy to do that as long as there is a consensus. We could also expose the
properties in non-string form, but that is a bit harder to do.
GetPropsAsDict does this, but has the overhead that it does a conversion for
everything, not just the thing you want. It does handle the underlying ty
On Dec 19, 2016, at 6:22 PM, Brian Kelley wrote:
> I had thought about making a CanonicalAtomOrder function that does this as
> well, or perhaps making a MolToSmiles variant.
I learned about this function from Noel's blog post at
https://nextmovesoftware.com/blog/2013/07/01/accessing-smiles-atom
I would vote for make a more obvious way to get to these values. I have
had the need to do this when working with external depictors (i.e. mol ->
smiles -> depict with atom highlighting is one use case) I just couldn't
think of a valid API way of doing this. Attaching these values to the
molecul
On Mon, Dec 19, 2016 at 9:43 AM, Maciek Wójcikowski
wrote:
>
> There is also CanonicalRankAtoms [http://www.rdkit.org/Python_
> Docs/rdkit.Chem.rdmolfiles-module.html#CanonicalRankAtoms] which seams to
> be forgotten.
>
One thing to be aware of here is that this provides the canonical ranking
of
Hi Jean-Marc and others,
There is also CanonicalRankAtoms [
http://www.rdkit.org/Python_Docs/rdkit.Chem.rdmolfiles-module.html#CanonicalRankAtoms]
which seams to be forgotten.
Pozdrawiam, | Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl
2016-12-18 23:14 GMT+01:00 Jean-Marc Nuzilla
Thank you Andrew, Brian and David for your answers.
mol.GetProp("_smilesAtomOutputOrder") does the job.
I also expected a.GetProp("molAtomMapNumber") could do it for each atom a.
All the best,
Jean-Marc
Le 18/12/2016 à 19:04, Andrew Dalke a écrit :
> On Dec 18, 2016, at 6:32 PM, Brian Kelley wr
On Dec 18, 2016, at 6:32 PM, Brian Kelley wrote:
> >>> m.GetProp("_smilesAtomOutputOrder")
> '[3,2,1,0,]'
>
> Note that this returns the list as a string which is sub-optimal.
> GetPropsAsDict will convert these to proper python objects, however, this is
> considered a private member so you nee
Hi Jean-Marc,
There is a property of the molecule created when it is read that contains
this information. I forget what it is called, but if you call the
molecule's GetPropNames function you should see something obvious in the
values returned. You can then call GetProp with that property name to
Jean-Marc,
This is very non-obvious, but here is how you can do it from python:
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles("NCCC")
>>> Chem.MolToSmiles(m)
'CCCN'
>>> m.GetProp("_smilesAtomOutputOrder")
'[3,2,1,0,]'
Note that this returns the list as a string which is sub-optim
23 matches
Mail list logo