Re: [Rdkit-discuss] Count carbon atoms

2015-10-07 Thread Ling Chan
Or you can use AllChem.CalcMolFormula() to get the chemical formula. Ling On Wed, Oct 7, 2015 at 3:55 AM, Andrew Dalke wrote: > On Oct 7, 2015, at 11:30 AM, Christos Kannas wrote: > > Yes there is an easier way, by using substructure search, i.e. do a > substructure

[Rdkit-discuss] sulfoxide chirality

2015-09-04 Thread Ling Chan
Dear colleagues, I have a sulfoxide molecule (ligand of 1A9U from the PDB, the SDF is attached). The geometry at the sulfur is not planar. When I tried to get a smiles with stereo data using AllChem.AssignAtomChiralTagsFromStructure(mol) Chem.MolToSmiles(mol, isomericSmiles=True) it does

Re: [Rdkit-discuss] aligning maximum common substructure of 2 molecules

2017-02-20 Thread Ling Chan
Hello Thomas, This publication could be of interest to you. I have not read the whole paper so I don't know how relevant it is. Ling Graph-Based Molecular Alignment (GMA) Marialke, Korner, Tietze, Apostolakis J. Chem. Inf. Model. 47 (2007) 591-601 On Mon, Feb 20, 2017 at 3:32 PM, Thomas

Re: [Rdkit-discuss] protonating proper tertiary amines

2016-09-03 Thread Ling Chan
Hello Greg, Is UpdatePropertyCache "heavy"? If not, is it possible to fold it into SanitizeMol, so that users only need to remember the SanitizeMol function for refreshing a molecule? Thank you. Ling On Mon, Aug 29, 2016 at 10:41 PM, Greg Landrum wrote: > Hi Brian, >

Re: [Rdkit-discuss] SDF and FindMolChiralCenters()

2016-09-09 Thread Ling Chan
If your file has 3D coordinates, AssignAtomChrialTagsFromStructure may help you. Ling On Fri, Sep 9, 2016 at 3:40 PM, Paolo Tosco wrote: > Dear Dimitri, > > the MOL reader perceives chirality based on the bond stereo field of the > bond block. Instead the atom stereo

Re: [Rdkit-discuss] Extracting SMILES from text

2016-12-05 Thread Ling Chan
Thank you for sharing your results, Alexis. This is indeed an interesting problem. Just wonder what are the 339 FP's? Are they all English words with fewer than 6 characters? If RDKit can construct a molecule out of them, I suppose in theory they could be valid smiles? Looks like the problem

Re: [Rdkit-discuss] official Tripos MOL2 file format PDF document

2017-04-13 Thread Ling Chan
Thanks Nils, this is great. Guess we better download a copy now before this link is gone. On Thu, Apr 13, 2017 at 7:47 AM, Nils Weskamp wrote: > Dear All, > > does this link help: > > https://www.yumpu.com/en/document/view/15425101/tripos-mol2-file-format > > Cheers, >

Re: [Rdkit-discuss] setting valence of choice to S and P atoms in rdkit

2017-06-20 Thread Ling Chan
, to clean up the molecule. Ling Chan On Tue, Jun 20, 2017 at 7:37 AM, Janusz Petkowski <jjpet...@mit.edu> wrote: > Dear RDKit Community, > > I have a quick question regarding a possibility of setting valence of an > atom in rdkit. > > Let's say that I have a molecul

Re: [Rdkit-discuss] Sanitizing SD file

2017-12-13 Thread Ling Chan
Hello Sundar, Without access to your sd file I cannot be sure. But it is likely that you have a nitrogen with a valence exceeding 4. You may need to, e.g., change the N=O form into [N+][O-]. You may take a look at some of the following threads.

Re: [Rdkit-discuss] conda install rdkit

2020-10-11 Thread Ling Chan
annel let us install the up to date > distribution. You should check your .condarc file and see if removing any > of the channels in there will let you get the most recent rdkit. > > On Sun, Oct 11, 2020 at 10:59 AM Ling Chan wrote: > >> Thank you Taka and Dennis for the su

Re: [Rdkit-discuss] conda install rdkit

2020-10-16 Thread Ling Chan
. Ling Drew Gibson 於 2020年10月12日週一 上午4:35寫道: > Hi, > > I had a similar issue in the past. Try updating conda... > > conda update conda > > then try creating your RDKit environment again. > > Drew > > On Sat, 10 Oct 2020 at 23:47, Ling Chan wrote: > &

[Rdkit-discuss] MMFFMolProperties objects

2020-10-15 Thread Ling Chan
. Ling Chan ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Re: [Rdkit-discuss] conda install rdkit

2020-10-16 Thread Ling Chan
ink_campaign=sig-email_content=webmail> > <#m_6540286987246545246_m_-2612651416672237168_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Fri, 16 Oct 2020 at 21:00, Ling Chan wrote: > >> Thank you Drew for your suggestion. I tried it, but it did not help. >> &g

[Rdkit-discuss] conda install rdkit

2020-10-10 Thread Ling Chan
Dear colleagues, I am trying to install RDKit using conda. According to the manual at https://www.rdkit.org/docs/Install.html#how-to-install-rdkit-with-conda it is very simple. I just need to do conda create -c rdkit -n my-rdkit-env rdkit It used to work. Somehow when I try this again, things

Re: [Rdkit-discuss] conda install rdkit

2020-10-11 Thread Ling Chan
.03.6 > > However this will not solve the longer term issue that your conda environment > is now looking for an older URL for rdkit. > > Dennis > > > > On Sat, Oct 10, 2020 at 6:47 PM Ling Chan wrote: > >> Dear colleagues, >> >> I am trying to

Re: [Rdkit-discuss] conda spell to install rdkit?

2020-11-25 Thread Ling Chan
It would be great if someone with access can update the manual page at http://rdkit.org/docs/Install.html#how-to-install-rdkit-with-conda I encountered the same problem last month, as described in this thread. https://sourceforge.net/p/rdkit/mailman/message/37130755/ Thank you! Ling dmaziuk

Re: [Rdkit-discuss] rejoining pairs of fragments after fragmenting a molecule

2021-04-01 Thread Ling Chan
Mackey* > > *Chief Scientific Officer* > > *Cresset* > > New Cambridge House, Bassingbourn Road, Litlington, Cambridgeshire, SG8 > 0SS, UK > > tel: +44 (0)1223 858890mobile: +44 (0)7595 099165fax: +44 (0)1223 > 853667 > > email: *m...@cresset-group.com *

Re: [Rdkit-discuss] rejoining pairs of fragments after fragmenting a molecule

2021-04-01 Thread Ling Chan
rashes, because of Sanitization problem. Ling Chan 於 2021年4月1日週四 下午4:11寫道: > Thank you Mark for your suggestion. It sounds good and I gave it a try. > However, this leads to another question that may sound dumb. > > I have the atom indices of a fragment. For example, the fragment

Re: [Rdkit-discuss] rejoining pairs of fragments after fragmenting a molecule

2021-04-01 Thread Ling Chan
g. (bool)asMols=False [, (bool)sanitizeFrags=True) to provide > some workarounds with sanitization. > > Best, > Kangway > ------ > *From:* Ling Chan > *Sent:* Thursday, April 1, 2021 5:08 PM > *To:* Mark Mackey > *Cc:* RDKit > *Subject:* Re: [Rdki

[Rdkit-discuss] rejoining pairs of fragments after fragmenting a molecule

2021-03-31 Thread Ling Chan
Dear Colleagues, I am trying to do something that I think is quite simple, but I have not figured out a simple way. Don't know if I am missing something. I am sure that ultimately I can figure it out, but I wonder if there is a good way. I fragmented a molecule with some rules, using

Re: [Rdkit-discuss] rejoining pairs of fragments after fragmenting a molecule

2021-04-02 Thread Ling Chan
in EditableMol results in all indices above the deleted to decrease by one, i.e. atom ordering is preserved. Thank you! Ling Francois Berenger 於 2021年3月31日週三 下午5:27寫道: > On 01/04/2021 04:55, Ling Chan wrote: > > Dear Colleagues, > > > > I am trying to do something that I

[Rdkit-discuss] rdMolAlign manual pages

2021-03-29 Thread Ling Chan
Hello colleagues, Seems like the manual pages for the rdMolAlign package and its functions are empty. Perhaps the pointer did not get updated when the package was updated? e.g. https://www.rdkit.org/docs/source/rdkit.Chem.rdMolAlign.html or manual page for "AlignMol". Thank you Greg and all the

Re: [Rdkit-discuss] Error in RDKit output for finding ring atoms!

2021-03-11 Thread Ling Chan
Hello Goutam, There are not even 30 atoms in your smiles string. This is because, for example, [C@H] denotes one carbon atom. The H is there to describe the C. It is not an atom in the smiles string. Ling Goutam Mukherjee 於 2021年3月11日週四 上午8:35寫道: > Dear Members, > > I have found an error in

Re: [Rdkit-discuss] chair vs boat detection

2021-03-12 Thread Ling Chan
Thank you for the pointers, Paul. Ling Paul Emsley 於 2021年3月12日週五 上午10:12寫道: > > On 12/03/2021 05:11, Ling Chan wrote: > > > > > > Just wonder if there is any function to distinguish between a chair > > ring and a boat ring? > > > > Don't worry if th

Re: [Rdkit-discuss] chair vs boat detection

2021-03-12 Thread Ling Chan
of. Geoffrey Hutchison > Department of Chemistry > University of Pittsburgh > tel: (412) 648-0492 > email: geo...@pitt.edu > twitter: @ghutchis > web: https://hutchison.chem.pitt.edu/ > > On Mar 12, 2021, at 1:10 PM, Paul Emsley > wrote: > > > On 12/03/2021

Re: [Rdkit-discuss] explicit H atoms

2021-03-10 Thread Ling Chan
Hello Mark, I thought you could depict it like the attached, since only the narrow end of a wedged bond counts. Sure, it is confusing, but it is doable. Except that in section ST-0.5 of the IUPAC guidelines pointed out by Greg https://www.degruyter.com/document/doi/10.1351/pac200678101897/html it

Re: [Rdkit-discuss] explicit H atoms

2021-03-09 Thread Ling Chan
Hello Jean-Marc, This is a very interesting question. Given any molecule, consider its structure stripped of all H's. There is no reason why this stripped structure cannot be represented using wedged bonds etc. (Will continue on the next reply.) Hence potential problems can only arise when the

Re: [Rdkit-discuss] explicit H atoms

2021-03-09 Thread Ling Chan
especially if no atom is bonded to more than 4 other atoms. Ling Chan 於 2021年3月9日週二 上午11:32寫道: > Hello Jean-Marc, > > This is a very interesting question. > > Given any molecule, consider its structure stripped of all H's. There is > no reason why this stripped structure cannot

[Rdkit-discuss] chair vs boat detection

2021-03-11 Thread Ling Chan
Hello colleagues, Just wonder if there is any function to distinguish between a chair ring and a boat ring? Don't worry if there is no such utility. I can write my own geometry detection. Just that I don't want to reinvent the wheel. Thank you. Ling

[Rdkit-discuss] unisotoping

2021-04-17 Thread Ling Chan
Hello colleagues, I am trying to "unisotope" a molecule. When I print out the smiles of the processed molecule, the atoms that were unisotoped were surrounded by square brackets. Is there any way to get rid of these brackets? >>> m = Chem.MolFromSmiles("[13C][13C]") >>> for a in m.GetAtoms():

[Rdkit-discuss] MolToSmiles

2021-10-20 Thread Ling Chan
CH:0]1[CH2:0][CH2:0][CH2:0][CH2:0][CH2:0]1 Just wonder why does it not give something like O=C(OC(C)(C)C)NC(C=O)C1C1 Thank you for your insight. Ling Chan 1q6k_ligand.sdf Description: application/vnd.openmolecules.sdf ___ Rdkit-discuss mailing

Re: [Rdkit-discuss] State of the art for shape alignment

2021-11-12 Thread Ling Chan
Hello Tim, You may take a look at my publication, at https://link.springer.com/article/10.1007/s10822-017-0023-8 There is also a review of existing methods there. Ling Francois Berenger 於 2021年11月11日週四 下午5:34寫道: > On 12/11/2021 01:58, Paolo Tosco wrote: > > Hi Tim, > > > > Open3DAlign is

Re: [Rdkit-discuss] MolToSmiles atom ordering

2021-11-02 Thread Ling Chan
(mcanon) map_backward = mcanon.GetSubstructMatch(minput) Ling Chan 於 2021年11月2日週二 下午3:55寫道: > 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) ca

[Rdkit-discuss] MolToSmiles atom ordering

2021-11-02 Thread Ling Chan
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

[Rdkit-discuss] smiles-mol-smiles roundtrip can change stereochemistry

2021-11-06 Thread Ling Chan
Dear colleagues, I have encountered an instance where MolToSmiles(MolFromSmiles()) resulted in a change of stereochemistry of a double bond. An attached figure illustrates this. The problematic input smiles is "C1Nc2ccc(C)cc2/C1=C1/Nc2c2/C1=N\OCCOF". The original smiles was even longer. I

Re: [Rdkit-discuss] smiles-mol-smiles roundtrip can change stereochemistry

2021-11-06 Thread Ling Chan
I'll give you the original smiles too. Although it is longer, the round trip does not change the atom ordering. So perhaps it's easier to figure things out. "O=C1Nc2ccc(C(=O)N(F)CCF)cc2/C1=C1/Nc2c2/C1=N\OCCOF" Ling Chan 於 2021年11月6日週六 下午1:05寫道: > Dear colleagues, > >

Re: [Rdkit-discuss] MolToSmiles gives explicit H after ReplaceSubstructs

2021-11-05 Thread Ling Chan
ms = Chem.RemoveHsParameters() > params.removeDefiningBondStereo = True > Chem.RemoveHs(m6, params) > > or simply > > Chem.RemoveAllHs(m6) > > I think you may obtain the same result by just > > m6s = AllChem.DeleteSubstructs(m5, mf) > > Cheers, > p. > > > On Wed, Nov 3, 2021 at

Re: [Rdkit-discuss] GetSubstructMatch bug? + mol depiction issue

2021-11-05 Thread Ling Chan
romSmarts('C1CC2C3C(C1)C23') >> >> >> >>> m1.GetSubstructMatch(m4) >> >> (4, 3, 2, 1, 6, 5, 7) >> >> Another interesting bit is that while the Inchis of m2 and m3 are also >> the same, the conversion produces a warning about stereochemistry: >> >

Re: [Rdkit-discuss] MolToSmiles atom ordering

2021-11-03 Thread Ling Chan
c. > > > Cheers, > > > Andrew > da...@dalkescientific.com > > > > On Nov 3, 2021, at 00:18, Ling Chan wrote: > > > > O.K. Problem solved. Sorry about the spam, folks. > > &

[Rdkit-discuss] GetSubstructMatch bug? + mol depiction issue

2021-11-03 Thread Ling Chan
Dear colleagues, I have a molecule "FC12C31C32F". I stripped it of the F's, and tried to do a GetSubstructMatch. It worked. But if I reconstruct the stripped molecule from a smiles string, it does not. Please see attached. I suppose some info is lost when you reconstruct the stripped core

[Rdkit-discuss] MolToSmiles gives explicit H after ReplaceSubstructs

2021-11-03 Thread Ling Chan
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

Re: [Rdkit-discuss] smiles-mol-smiles roundtrip can change stereochemistry

2021-11-06 Thread Ling Chan
gives a different molecule. By the way, how can I reply to my own thread without creating a new thread each time and thus messing up this forum? I don't receive an incoming email for posts that I made and hence I cannot reply to an incoming email. Thanks. Ling Ling Chan 於 2021年11月6日週

[Rdkit-discuss] ReplaceSubstructs result: 2 pieces vs 1 piece

2022-02-07 Thread Ling Chan
Dear colleagues, Just wonder why is it that in the first case, it returns two molecular fragments, but in the second case, it returns one fragment. Many thanks! Ling [image: image.png] ___ Rdkit-discuss mailing list

[Rdkit-discuss] DeleteSubstructs next to a charged atom

2022-02-07 Thread Ling Chan
Dear Colleagues, DeleteSubstructs usually deletes the specified substructure from a molecule, AND then caps it with a hydrogen. However, it does not work like this when the deleted part is next to a charged atom. *> f = Chem.MolFromSmarts('F')* *> m = Chem.MolFromSmiles("FN(C)C")* *>

Re: [Rdkit-discuss] ReplaceSubstructs result: 2 pieces vs 1 piece

2022-02-08 Thread Ling Chan
inder of the molecule is restored" However, I would still appreciate if someone could suggest some work around to my "DeleteSubstructs" post. Thanks. Ling Ling Chan 於 2022年2月7日週一 下午5:44寫道: > Dear colleagues, > > Just wonder why is it that in the first case, it retu

Re: [Rdkit-discuss] mol properties in SDWriter

2023-09-28 Thread Ling Chan
as o: > o.write(m) > sio.seek(0) > with open("temp3.sdf", "w") as f: > for line in sio.readlines(): > f.write(re.sub(r'^>(.*?)\((.*?)\)', r'>\1', line)) > > best wishes > wim > > On Tue, Sep 26, 2023 at 1:20 AM Ling Chan wrote

[Rdkit-discuss] mol properties in SDWriter

2023-09-25 Thread Ling Chan
Dear Colleagues, I noticed that when writing out molecules using SDWriter() , the properties fields are followed by something like "(1)" , "(2)". I mean, the sdf looks like: propane RDKit 3D 3 2 0 0 0 0 0 0 0 0999 V2000 0.0.0. C 0 0 0 0 0

Re: [Rdkit-discuss] mol properties in SDWriter

2023-09-29 Thread Ling Chan
eveloper > > *he/him/his* > > [image: Schrödinger, Inc.] <https://schrodinger.com/> > > > On Fri, Sep 29, 2023 at 1:08 AM Andrew Dalke > wrote: > >> On Sep 26, 2023, at 01:17, Ling Chan wrote: >> > >(1) >> > 4.099 >> .. >

[Rdkit-discuss] atom indexing in mol and conformer

2022-06-18 Thread Ling Chan
Dear colleagues, Just wonder if the atom indexing in a conformer is always identical to that of the parent molecule? I suspect it is but would like to confirm. Specifically, I would like to confirm that for conf in mol.GetConformers(): conf.GetAtomPosition(idx) always corresponds to the

Re: [Rdkit-discuss] atom indexing in mol and conformer

2022-06-19 Thread Ling Chan
Good, thank you Sereina! Ling Sereina Riniker 於 2022年6月19日週日 上午1:48寫道: > Dear Ling, > > Yes, the atom indexing is the same for all conformers of a molecule. > > Best regards, > Sereina > > > > > On 19 Jun 2022, at 00:04, Ling Chan wrote: > > > > Dea

[Rdkit-discuss] Fingerprint visualization drawings

2022-12-29 Thread Ling Chan
Dear Colleagues, Happy New Year! I am trying to make some illustrations regarding the meaning of fingerprint bits. Thanks to Jan Jensen for the tips at the recent post of https://sourceforge.net/p/rdkit/mailman/message/37734537/ . I just wonder if there is any manual for the fingerprint drawing

[Rdkit-discuss] SDMolSupplier chirality

2022-12-21 Thread Ling Chan
Dear colleagues, Is there a way to make SDMolSupplier faithful to the input chirality? I mean, I would like to keep whatever info that is stored in the atom and bond blocks, avoiding deducing anything from the geometry. When I read in the attached sdf, it assigns a chirality to the charged

Re: [Rdkit-discuss] Changes in morgan fingerprint code?

2023-01-13 Thread Ling Chan
Yes, if you don't care about stereochemistry, you need to do a Chem.RemoveStereochemistry() prior to your comparison. But if you do care about stereochemistry, "CC=CC(C)(O)CF" and "C/C=C/[C@](C)(O)CF" are indeed different molecular specifications. As for fingerprints, I believe that most

Re: [Rdkit-discuss] Embedding of molecules with incorrect stereochistry assignment

2023-01-19 Thread Ling Chan
Keep trying with more random seeds? On Thu., Jan. 19, 2023, 07:38 Hao, wrote: > Hi Gianmarco, > > In my experience, this just means that you have an impossible molecule. I > haven't found any ways around it besides trying to embed. If it fails, try > to swap the other stereoisomer. I find this

Re: [Rdkit-discuss] MolToMolBlock problem

2023-02-22 Thread Ling Chan
moved some. But at the end of the exercise, I still ended up with > what I initially had, namely RDKit 2021.03.4. I had to install rdkit again from scratch to get the new version. > What am I doing wrongly? I forgot to set the channel to conda-forge. After I set this, the update was successful. Li

Re: [Rdkit-discuss] MolToMolBlock problem

2023-02-22 Thread Ling Chan
or an error message. > > -greg > > > On Tue, Feb 21, 2023 at 7:03 AM Ling Chan wrote: > >> Dear colleagues, >> >> Don't know if this is a bug, or if my input molecule is not good. I >> suspect that it is the former. >> >> If you run the following o

[Rdkit-discuss] MolToMolBlock problem

2023-02-20 Thread Ling Chan
Dear colleagues, Don't know if this is a bug, or if my input molecule is not good. I suspect that it is the former. If you run the following on the file "full.sdf", it will crash at the MolToMolBlock line. for m1 in Chem.SDMolSupplier(inputsdf, removeHs=False): m2=Chem.RemoveHs(m1)

Re: [Rdkit-discuss] Molfile from smiles

2023-05-01 Thread Ling Chan
Hello Santiago, In case you are still looking for an answer, somewhere in my notes I wrote the following. to get a better depiction of complicated topology, do this before rendering. from rdkit.Chem import rdDepictor rdDepictor.SetPreferCoordGen(True) Sometimes it helps. Good luck. Ling

Re: [Rdkit-discuss] Error reading SDF dataset from BindingDB

2023-07-25 Thread Ling Chan
Interesting. Thanks Rafael. So it's a bug of BindingDB. Perhaps you should let them know too. Ling Rafael L via Rdkit-discuss 於 2023年7月25日週二 上午12:53寫道: > Hi, I'm just creating this thread to get the problem and the solution > indexed by Google > > I downloaded several SDF datasets from

[Rdkit-discuss] atom indexing

2023-06-18 Thread Ling Chan
Dear colleagues, I got some questions about atom indexing. Just wonder if you could help me? 1. In m3=Chem.CombineMols(m1,m2) , is it guaranteed that the atom indices in m3 is equivalent to the indices in m1 followed by the indices in m2? 2. If I construct an editable mol from m1, is

Re: [Rdkit-discuss] atom indexing

2023-06-19 Thread Ling Chan
Great to know, many thanks Greg! Ling Greg Landrum 於 2023年6月19日週一 下午9:53寫道: > Hi Ling, > > On Mon, Jun 19, 2023 at 3:03 AM Ling Chan wrote: > >> >> I got some questions about atom indexing. Just wonder if you could help >> me? >> >>1. In m3=

Re: [Rdkit-discuss] problem with MolToSmiles with 6-valenced sulfur

2023-11-19 Thread Ling Chan
Thank you Christian! This is good to know. The meaning of the number after "OH" is not defined in the web page. I'll take a look at the publication. But yes, I get the idea. Ling Christian Meyenburg 於 2023年11月18日週六 下午12:14寫道: > Hi Ling, > > On 2023-11-17 18:40, Ling Cha

[Rdkit-discuss] problem with MolToSmiles with 6-valenced sulfur

2023-11-17 Thread Ling Chan
Dear colleagues, When I run MolToSmiles on a molecule with a 6-valenced sulfur, it produced a problematic smiles. Seems it's a bug? Thanks. Ling Running "Chem.MolToSmiles(Chem.MolFromMolFile("mol.sdf"))" on the following sdf, I got 'C[S@OH16](F)(F)(F)(F)F'