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)
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
Hello colleagues,
I tried to change all F's into H's. It worked. But when I converted the
result into a smiles string, there is the occasional lingering explicit
hydrogen. It is there even after I do a RemoveHs().
Just wonder what is this explicit H about, since it may have implications
on any
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
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 =
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 =
Dear colleagues,
Just wonder if I can obtain a mapping of the atom indices upon
canonicalization by MolToSmiles ? I am aware that canonicalization (and
hence atom reordering) can be suppressed in MolToSmiles, but I do want to
canonicalize the output smiles.
If you are interested, here is a bit
> 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))
> ...
>
Dear colleagues,
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))
...
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:
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
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
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,
Hi all,
Is there any way to preserve atom order from Mol object during
exporting to smiles? I tried MolToSmiles with rootedAtAtom=0 and
canonical=False options but it not always prevent oryginal order.
I know I can use _smilesAtomOutputOrder to map old indices to new one
in canonical smiles but
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
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
Dear all,
I am looking for a way to relate atom indexes of a Mol object
and the order of appearance of the atoms along the corresponding SMILES
chain, as produced by Chem.MolToSmiles().
Thanks in advance,
Jean-Marc
--
Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
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
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
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
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
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
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
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
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
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
27 matches
Mail list logo