Re: [Rdkit-discuss] Redirect error messages to a file in Python?

2024-02-04 Thread David Cosgrove
g_stream.getvalue()) # remove the timestamps [12:14:19] (maybe could turn > them off?) > > ... after closing SDF file I'm removing the handler > # remove our log handler > myLogger.handlers.clear() > > > On Thu, Feb 1, 2024 at 12:49 PM David Cosgrove > wrot

[Rdkit-discuss] Redirect error messages to a file in Python?

2024-02-01 Thread David Cosgrove
, DisableLog, EnableLog, LogMessage ./rdkit/RDLogger.py but the functions don't seem to be used within that file. Any pointers gratefully received. Dave -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk

Re: [Rdkit-discuss] Varying ring size substructure match.

2023-08-20 Thread David Cosgrove
__ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > ___ > Rdkit-discuss mailing list

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-26 Thread David Cosgrove
t regards, > > Jean-Marc > > -- > Jean-Marc Nuzillard > Directeur de Recherches au CNRS > > Institut de Chimie Moléculaire de Reims > CNRS UMR 7312 > Moulin de la Housse > CPCBAI, Bâtiment 18 > BP 1039 > 51687 REIMS Cedex 2 > France > > ORCID : 000

Re: [Rdkit-discuss] Molfile from smiles

2023-05-04 Thread David Cosgrove
ue) > > > How could I fix the molfile? > > Regards > Santiago > > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Re: [Rdkit-discuss] GIL Lock in BulkTanimotoSimilarity

2022-10-26 Thread David Cosgrove
; On Tue, Oct 25, 2022 at 8:57 PM Francois Berenger > wrote: > >> On 24/10/2022 19:47, David Cosgrove wrote: >> > For the record, I have attempted this, but got only a marginal >> > speed-up (130% of CPU used, with any number of threads above 2). The >> >

Re: [Rdkit-discuss] GIL Lock in BulkTanimotoSimilarity

2022-10-26 Thread David Cosgrove
if releasing the GIL would make it possible to do it in multithreaded mode with a single shared fingerprint set but the answer was that it made little improvement on a single-thread run. On Wed, 26 Oct 2022 at 02:32, Francois Berenger wrote: > On 24/10/2022 19:47, David Cosgrove wr

Re: [Rdkit-discuss] GIL Lock in BulkTanimotoSimilarity

2022-10-24 Thread David Cosgrove
is a small part of the overall time. It doesn't seem worth pursuing further. Dave On Sat, Oct 22, 2022 at 11:28 AM David Cosgrove wrote: > Hi Greg, > Thanks for the pointer. I’ll take a look. If it could go in the next patch > release that would be really useful. > Dave > > >

Re: [Rdkit-discuss] GIL Lock in BulkTanimotoSimilarity

2022-10-22 Thread David Cosgrove
reading on the C++ side by adding > an optional nThreads argument to the bulk similarity functions. (Though > this would have to wait for the next release since it’s a feature addition… > we can declare releasing the GIL as a bug fix) > > -greg > > > On Sat, 22 Oct 2022 at 09:48

[Rdkit-discuss] GIL Lock in BulkTanimotoSimilarity

2022-10-22 Thread David Cosgrove
the calculation, and recapture it afterwards? I understand things like numpy do this for some of their functions. I'm happy to attempt it myself if someone who knows about these things can advise that it could be done, it would help, and they could provide a few pointers. Thanks, Dave -- David

Re: [Rdkit-discuss] Draw.MolToFile catch programm termination

2022-09-05 Thread David Cosgrove
ogram. Attached is > the drawing of how we think the mol files should look. > > > > Best Rüdiger > > > > *Von:* David Cosgrove > *Gesendet:* Montag, 5. September 2022 12:04 > *An:* Rüdiger Lang > *Cc:* rdkit-discuss@lists.sourceforge.net > *Betreff:* Re: [Rd

Re: [Rdkit-discuss] Draw.MolToFile catch programm termination

2022-09-05 Thread David Cosgrove
I have filed a fix that will hopefully appear in the next patch release. In the meantime, I fear there is no workaround other than restarting the script after the offending molecule, which will be a nuisance to automate. Dave On Mon, Sep 5, 2022 at 11:04 AM David Cosgrove wrote: > >

Re: [Rdkit-discuss] Draw.MolToFile catch programm termination

2022-09-05 Thread David Cosgrove
attached the wrong mol-file. Sorry for that. But now two files where it > actually does not work. > > > > Best Rüdiger > > > > *Von:* David Cosgrove > *Gesendet:* Samstag, 3. September 2022 09:12 > *An:* Rüdiger Lang > *Cc:* rdkit-discuss@lists.sourceforge.net

Re: [Rdkit-discuss] Draw.MolToFile catch programm termination

2022-09-03 Thread David Cosgrove
t; > print('I never reach this except but the programm stopps') > > > > Many thanks! > > > > Rüdiger Lang > > > > > > > Freundliche Grüße / Kind regards > > Rüdiger Lang > Data Analyst > > *abcr GmbH* > Im Schlehert 10 > 76

Re: [Rdkit-discuss] Draw.MolToFile catch programm termination

2022-09-02 Thread David Cosgrove
Karlsruhe+%0D%0AGermany?entry=gmail=g> > 76187 Karlsruhe > <https://www.google.com/maps/search/Im+Schlehert+10+%0D%0A76187+Karlsruhe+%0D%0AGermany?entry=gmail=g> > Germany > <https://www.google.com/maps/search/Im+Schlehert+10+%0D%0A76187+Karlsruhe+%0D%0AGermany?entry=gmail=g>

Re: [Rdkit-discuss] Using DrawAttachmentLine for bidentate ligands

2022-08-14 Thread David Cosgrove
s://github.com/OpenChemistry/fragments/tree/main/ligands > > Thanks! > -Geoff > > > > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss &

Re: [Rdkit-discuss] Using DrawAttachmentLine for bidentate ligands

2022-08-11 Thread David Cosgrove
t; Thanks, > -Geoff > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics de

Re: [Rdkit-discuss] Color bonds with value

2022-07-06 Thread David Cosgrove
t; for this? >> >> >> >> Many thanks! >> >> Joey Storer >> >> Dow Inc. >> >> Core R >> >> General Business >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@l

Re: [Rdkit-discuss] Multi-line atom label

2022-05-15 Thread David Cosgrove
") > Chem.Draw.MolToFile(mol,"/Users/vass/Downloads/x.svg") > > Thanks, > Marton > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss &g

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-06 Thread David Cosgrove
adding suggestion works, so I set > d2d.drawOptions().padding = 0.15 and voilá: > > [image: image.png] > > Amazing. Thanks! > Giammy > > On Thu, 5 May 2022 at 10:32, David Cosgrove > wrote: > >> Hi Giammy, >> >> On reflection overnight, you might

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-05 Thread David Cosgrove
gestions on how to fix this? > > Thanks, > > Giammy > -- > *Gianmarco* > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > --

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-04 Thread David Cosgrove
gestions on how to fix this? > > Thanks, > > Giammy > -- > *Gianmarco* > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > --

Re: [Rdkit-discuss] Question matching substructures from SMARTS with explicit hydrogens

2022-03-07 Thread David Cosgrove
r is a >>>> para-chloro toluene (PCT). >>>> >>>> I am attempting to use the following SMARTS (S1) to match >>>> them: '[C,c]1(Cl)[C,c][C,c]*([N,n,H])*[C,c]([C,c,H])[C,c]([H])[C,c]1'. >>>> For some reason S1 only finds a match in 6CI. >>&

Re: [Rdkit-discuss] Question matching substructures from SMARTS with explicit hydrogens

2022-03-01 Thread David Cosgrove
gt; > Thanks! > Adam > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics d

Re: [Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread David Cosgrove
and it would be helpful if the layout engine could optimise the > layout to fit in that unconventional space. > Tim > > On Wed, Feb 9, 2022 at 11:40 AM David Cosgrove > wrote: > >> Hi Tim, >> Sorry, the font size setting both within the code and in the public &g

Re: [Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread David Cosgrove
t this? >>> Thanks >>> Tim >>> ___ >>> Rdkit-discuss mailing list >>> Rdkit-discuss@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >>> >> _

Re: [Rdkit-discuss] problem with latest bulds?

2022-01-26 Thread David Cosgrove
kit' (most likely due to a circular import) > (/data/github/rdkit/rdkit/rdkit/__init__.py) > > Are others seeing this too? > > Tim > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sou

Re: [Rdkit-discuss] RDKit_minimal.js running out of memory

2022-01-25 Thread David Cosgrove
development, so I'm not really sure what I'm doing > wrong. > > Best, > Adam > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > --

Re: [Rdkit-discuss] Taylor-Butina clustering

2021-07-21 Thread David Cosgrove
ions, but I'm really new to this topic. > Hope someone can help me, > kind regards. > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > --

Re: [Rdkit-discuss] Javascript MinimalLib

2021-07-21 Thread David Cosgrove
Brilliant, thanks. I will take note of how to do it myself in future . Best, Dave On Wed, 21 Jul 2021 at 12:32, Greg Landrum wrote: > Hi Dave, > > It's not in the JS interface yet, but I'll add it now. > > -greg > > > On Mon, Jul 19, 2021 at 4:57 PM David Co

[Rdkit-discuss] Javascript MinimalLib

2021-07-19 Thread David Cosgrove
to call them from JS. Thanks, Dave -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo

Re: [Rdkit-discuss] MinimalLib and Reactjs

2021-04-19 Thread David Cosgrove
have a WASM loader, and if I can work out how to use that directly, I'll post a further reply. Hopefully that all makes sense and might be helpful to other people. Best, Dave On Wed, Apr 14, 2021 at 5:10 PM David Cosgrove wrote: > Hi, > > I have compiled the latest RDKit (

[Rdkit-discuss] MinimalLib and Reactjs

2021-04-14 Thread David Cosgrove
anyone had success with this that they can share? Thanks, Dave -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https

Re: [Rdkit-discuss] atom index changes after embedding

2021-03-29 Thread David Cosgrove
214 6009 7356 > > > > Covestro Deutschland AG > > COVDEAG-Chief Commer-PUR-R > > B103, R164 > > 51365 Leverkusen, Germany > > pablo.ra...@covestro.com > > > > > ___ > Rdkit-discuss mailing list > R

Re: [Rdkit-discuss] How to preserve undefined stereochemistry?

2020-10-22 Thread David Cosgrove
>>>> >>>> <https://sourceforge.net/p/rdkit/mailman/rdkit-discuss/thread/C00BE94F-6F6F-466A-83D4-3045C9006026%40gmail.com/#msg34929570> >>>> >>>> https://sourceforge.net/p/rdkit/mailman/rdkit-discuss/thread/CAHOi4k3revAu-9qhFt0MpUpr0aADQ9d8bV2XT6FurTEKimCQn

Re: [Rdkit-discuss] Drawing mol to a coordinate box (x, y, width, height)?

2020-09-22 Thread David Cosgrove
ng that using matplot but the result isn't ideal. Thanks in > advance. > > Cheers, > > Imran > > -- > Imran Shah > imran.a.s...@gmail.com > > > > ___ > > Rdkit-discuss mailing list > > Rdkit-discuss@lists.s

Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread David Cosgrove
t; Rdkit-discuss@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.

Re: [Rdkit-discuss] c++ atomic lifetime

2020-08-27 Thread David Cosgrove
ine. What am I missing? > > Thanks > Jason > > > ___ > > Rdkit-discuss mailing list > > Rdkit-discuss@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > -- David Cosgrove Freelanc

Re: [Rdkit-discuss] RDKit installation problem

2020-08-01 Thread David Cosgrove
ro > Departamento de Ciencias Farmacéuticas > Facultad de Ciencias Químicas > Universidad Nacional de Córdoba > UNITEFA-CONICET > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge

Re: [Rdkit-discuss] draw molecule without rescaling or translating

2020-07-26 Thread David Cosgrove
__ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk __

Re: [Rdkit-discuss] Define identical atoms in SMARTS pattern

2020-07-24 Thread David Cosgrove
X=X, that finds > C(C)C, C(O)O, C(F)F, etc., but not C(C)O, etc.? > > Best regards, Jan > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >

Re: [Rdkit-discuss] Multiline legend in MolsToGridImage

2020-04-09 Thread David Cosgrove
>> Gustavo Seabra. >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > _______ > Rdkit-discu

Re: [Rdkit-discuss] RDKit in C++

2020-03-27 Thread David Cosgrove
make in the near future. Really > appreciate it! > > Best, > Leon > > > > > On Wed, Feb 26, 2020 at 11:17 AM David Cosgrove < > davidacosgrov...@gmail.com> wrote: > >> Hi Leon, >> There is indeed such a thing. It's not as complete as the Python one, as >&

Re: [Rdkit-discuss] Anaconda and RDkit

2020-03-05 Thread David Cosgrove
xperienced but I am trying to learn. > > Sorry for the trouble. > > Best regards > Francesco > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgr

Re: [Rdkit-discuss] RDKit in C++

2020-02-26 Thread David Cosgrove
issed important ones. Any suggestions are very welcome. Thanks! > > Best, > Leon > > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-

Re: [Rdkit-discuss] RDKit Cartridge mol_to_svg parameters

2020-02-13 Thread David Cosgrove
Yes, I'm working on putting that in at the same time as everything else. Dave On Thu, Feb 13, 2020 at 3:54 PM Greg Landrum wrote: > > > On Thu, Feb 13, 2020 at 10:57 AM David Cosgrove < > davidacosgrov...@gmail.com> wrote: > >> >> However, thanks to the generos

Re: [Rdkit-discuss] RDKit Cartridge mol_to_svg parameters

2020-02-13 Thread David Cosgrove
t of them > and some examples of this function? > > I tried stuff like below: > > mol_to_svg(mol, 'Test', 150, 100, '{"bondLineWidth": 1, "legendFontSize": > 0.5}') > > There is no error but the "JSON" options are not applied. The image always >

[Rdkit-discuss] Building on MacBook

2020-02-03 Thread David Cosgrove
Projects/RDKit/rdkit/rdkit/rdBase.so Reason: image not found which looks like it is almost working. Thanks, Dave -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk ___ Rdkit-discuss mailin

Re: [Rdkit-discuss] MolToSmiles preserve atom order

2019-11-18 Thread David Cosgrove
("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 Mon, Nov 18,

Re: [Rdkit-discuss] MolToSmiles preserve atom order

2019-11-18 Thread David Cosgrove
? > > Best, > > Rafał > > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry

Re: [Rdkit-discuss] distinguishing macrocyclic molecules

2019-10-09 Thread David Cosgrove
://sites.google.com/site/thomasevangelidishomepage/ >> >> >> >> _______ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > __

Re: [Rdkit-discuss] Catching errors in SMILES files

2019-06-04 Thread David Cosgrove
t('Record {} read ok.'.format(rec_num)) > if (rec_num == len(suppl2) - 1): > rec_num += 1 > print('Record {} not read.'.format(rec_num)) > > This should work until what seems to be an issue in the SmilesSupplier is > fixed. > > Cheers, > p. > > On 06/03/19 16:

[Rdkit-discuss] Catching errors in SMILES files

2019-06-03 Thread David Cosgrove
the file in a loop using next(suppl1) and catching the StopIteration exception, but I have the same issue. Is there a way to spot a last bad record in a file? Thanks, Dave -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk test1.smi

Re: [Rdkit-discuss] Read only first model of a pdb-file

2019-05-29 Thread David Cosgrove
ber the remark > number, nor the multi-conormer entry id off the top of my head.) > -- > Dimitri Maziuk > Programmer/sysadmin > BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.s

Re: [Rdkit-discuss] Bug with Calculation of aromatic rings?

2019-03-06 Thread David Cosgrove
 > <http://www.icoa.fr/> *Chemoinformatics PhD Student * > * Institute of Organic and Analytical Chemistry (ICOA UMR7311)* > Université d'Orléans - Pôle de Chimie Rue de Chartres - BP 6759 45067 > Orléans Cedex 2 - France  +33 (0)2 38 49 45 77 > <+33%202%2038%204

Re: [Rdkit-discuss] Butina clustering with additional output

2018-09-26 Thread David Cosgrove
da...@dalkescientific.com >> >> >> >> >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >

Re: [Rdkit-discuss] Butina clustering with additional output

2018-09-21 Thread David Cosgrove
e.net/lists/listinfo/rdkit-discuss >> > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Re: [Rdkit-discuss] another request for feedback on a new python API documentation format

2018-05-02 Thread David Cosgrove
g > fun? This isn't that. > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___

Re: [Rdkit-discuss] Any known papers on reverse engineering fingerprints into structures?

2018-04-23 Thread David Cosgrove
00200100 >> # >> 00400440002 >> # 00 >> # Full screen: 31134 >> # Relevant screen: 2216 >>

Re: [Rdkit-discuss] Any known papers on reverse engineering fingerprints into structures?

2018-04-20 Thread David Cosgrove
t;shen...@gmail.com> >> wrote: >> >>> Isn't it the case that more than one molecule can share an identical >>> fingerprint? (Depending on the specific fingerprint.) Think p-biphenyl, >>> extended to triphenyl, tetraphenyl, etc. Still, a GA or SA method could &

Re: [Rdkit-discuss] Any known papers on reverse engineering fingerprints into structures?

2018-04-20 Thread David Cosgrove
--- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net

Re: [Rdkit-discuss] GetBestRMS and the carboxylic acid

2018-04-18 Thread David Cosgrove
> VP Structural Analysis > C4X Discovery Ltd > > martin.wat...@c4xdiscovery.com > +44 (0)7753 434535 > +44 (0)161 235 5085 > > *www.c4xdiscovery.com <http://www.c4xdiscovery.com>* > > On 17 April 2018 at 19:40, David Cosgrove <davidacosgrov...@gmail.com&

Re: [Rdkit-discuss] Diversity picker

2018-01-04 Thread David Cosgrove
ngaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance comp

Re: [Rdkit-discuss] Python code to merge tuples from a SMARTS match

2017-11-07 Thread David Cosgrove
hdot >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> >> > > --

Re: [Rdkit-discuss] need SMARTS query with a specific exclusion

2017-09-24 Thread David Cosgrove
ector bindings > but may not be otherwise, especially if multiple exclusions are needed. > > Regards, > Chris Earnshaw > > > > On 24 Sep 2017 16:54, "David Cosgrove" <davidacosgrov...@gmail.com> wrote: > > Hi, > I think Chris' solution is a bit overly complic

Re: [Rdkit-discuss] need SMARTS query with a specific exclusion

2017-09-24 Thread David Cosgrove
ave tried using > >> recursive SMARTS, but I can't get the syntax to > >> work. > >> > >> Any ideas? Thank you. > >> > >> Regards, > >> Jim Metz > >> > >> > >> > >> > >> ----

Re: [Rdkit-discuss] need SMARTS query with a specific exclusion

2017-09-24 Thread David Cosgrove
ld's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > ___ > > Rdkit-discuss mailing list > > Rdkit-discuss@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > >

Re: [Rdkit-discuss] Clustering

2017-06-05 Thread David Cosgrove
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemi

Re: [Rdkit-discuss] Depicting reactions to the same quality as molecules

2017-05-24 Thread David Cosgrove
___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> >> > > > -- > Check

Re: [Rdkit-discuss] tautomers in rdkit

2017-04-18 Thread David Cosgrove
d to rdkit, but if someone that have >> the original PDF of this file format could place it >> online permanently, that would be wonderful. >> >> The official URL at tripos.com is dead since quite some time >> apparently. >> And that's bad because it's a quite popular fi

Re: [Rdkit-discuss] delete a substructure

2017-03-11 Thread David Cosgrove
, Peter S. Shenkin <shen...@gmail.com> wrote: > Sounds like Daylight's "depictmatch", unfortunately no longer available on > line > > -P. > > On Fri, Mar 10, 2017 at 1:28 PM, David Cosgrove < > davidacosgrov...@gmail.com> wrote: > > Hi, > In

[Rdkit-discuss] C++ MolPickler

2017-02-01 Thread David Cosgrove
in the same file. Cheers, Dave -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk -- Check out the vibrant tech community on one of the world's most engaging tech

Re: [Rdkit-discuss] PMI API

2017-01-08 Thread David Cosgrove
Hi Chris, I can help a bit with the first point - I am currently 'porting' the getting started in Python bit of the documentation to c++. There's a long way to go, but if you go to my fork of RDKit at https://github.com/DavidACosgrove and check out the GetStartedC++ branch, you can at least use

Re: [Rdkit-discuss] MolToSmiles

2016-12-18 Thread David Cosgrove
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

Re: [Rdkit-discuss] Extracting SMILES from text

2016-12-05 Thread David Cosgrove
Hi Alexis, While you're wrestling with the difference between () and CC(C)C you could also consider that . in a SMILES is valid, and denotes a mixture, for example CCO.O.O (for vodka, maybe). You might get those in FDA documents that discuss formulations, for example. In a well scanned and

Re: [Rdkit-discuss] GenerateDepictionMatching[23]DStructure (a bit off-topic)

2016-11-18 Thread David Cosgrove
As Greg says, this is a large area and somewhat of a diversion from my original intention. All I was asking for was a set of test cases so I can ensure that my port of the original Python code in AllChem.py to C++ behaves correctly. That seems like a sensible first step before embarking on

[Rdkit-discuss] Different default behaviour for Kekulize in Python and C++

2016-11-02 Thread David Cosgrove
Hi All, As I've been transliterating the GettingStartedInPython to GettingStartedInC++, I've noticed that you get different default behaviour from Kekulize in the two languages: m = Chem.MolFromSmiles('c1c1') print( 'Order : {}'.format( m.GetBondWithIdx(0).GetBondType() ) ) print( 'Aromatic

[Rdkit-discuss] Getting started with C++

2016-09-24 Thread David Cosgrove
Hi All, I'm contemplating starting a chapter in the documentation called 'Getting Started with the RDKit in C++' which would mirror the information given in the Python chapter but with examples in C++ for those of us diehards who like to program in a compiled language. As I recall, the learning

Re: [Rdkit-discuss] AddHs()

2016-09-10 Thread David Cosgrove
Hi Rocco et al., I too found this a very clear explanation of the different classes of hydrogen so many thanks for taking the time. Where would a chiral H fit in? The sort of H from Cl[C@H](F)Br? That one needs to stay even if you collapse all explicit H atoms to implicit. On the subject of the

Re: [Rdkit-discuss] rdMolDraw2D drawing code

2016-09-05 Thread David Cosgrove
HI Dmitri, Sorry for the delay replying. I assume that by 'add padding' you mean that the code that generates the 2D drawing coordinates should take account of the size of the labels and would, from your example, maybe open out the C9-O23-C14 bond a bit so that O21 and O24 are further apart? If

Re: [Rdkit-discuss] Some feedback from the Sheffield Cheminformatics Conference

2016-07-07 Thread David Cosgrove
I think I can beat that. When I was working on the 2D drawing code with Greg a couple of years ago, he sent me an email at about 6 on Christmas morning! Needless to say, he didn't get a reply until a few days later as I fear I am not so dedicated. Cheers, Dave On Thursday, 7 July 2016, Markus

Re: [Rdkit-discuss] Getting to grips with Open3DAlign

2016-06-22 Thread David Cosgrove
Hi Sereina, I beg to differ on the advisability of minimisation, even after using the parameters you suggest to generate the conformation. I've recently been using the CCDC's excellent Python API to analyse the results of the generated conformations. This lets you very quickly assess whether any

[Rdkit-discuss] Counting H Atoms

2016-06-21 Thread David Cosgrove
Hi All, I'm a bit confused about counting hydrogen atoms. It's a perennial problem with cheminformatics toolkits in my experience, but this seems particularly perverse. If I run the code: from rdkit import Chem from rdkit.Chem import AllChem mol = Chem.MolFromSmiles( 'CCO' ) mol = Chem.AddHs(

Re: [Rdkit-discuss] getting substructure for Morgan fingerprint bit

2016-03-05 Thread David Cosgrove
He might want the hydrogen counts specified to block unwanted substitutions? Dave > On 6 Mar 2016, at 03:38, Peter S. Shenkin wrote: > > Just curious here > > Since every SMILES is a valid SMARTS, > How do you want the SMARTS to differ from the SMARTS the SMILES

Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-10 Thread David Cosgrove
Hi Andrew, As chiralities go, this one has turned out to be quite valuable! https://en.wikipedia.org/wiki/Esomeprazole Dave On Mon, Feb 8, 2016 at 3:05 PM, Andrew Dalke wrote: > Hi! > > Could someone explain to this non-chemist what the chirality means in > the

Re: [Rdkit-discuss] how to replace a bond and preserve chirality

2016-02-04 Thread David Cosgrove
HI Andrew, I don't have a solution for RDKit, because I don't know if you can do this sort of thing. But when I've tackled this in OEChem, I've changed the atomic number of the substituent atom to something else (I always use Xe, because I know that will never be anything other than a marker

[Rdkit-discuss] Latest version

2015-12-10 Thread David Cosgrove
Hi All, I'm sorry to trouble you all with this one, as I feel I should be able to do better. I'm trying to install the latest version, 2015.09.1, but I can't find it on sourceforge. The latest one I can find there is 2015.03.1. I've managed to get the ubuntu installation installed via apt-get,

Re: [Rdkit-discuss] Latest version

2015-12-10 Thread David Cosgrove
'? Thanks, Dave On Thu, Dec 10, 2015 at 10:21 AM, Gianluca Sforna <gia...@gmail.com> wrote: > On Thu, Dec 10, 2015 at 11:12 AM, David Cosgrove > <davidacosgrov...@gmail.com> wrote: > > I've > > managed to get the ubuntu installation installed via apt-get, and my >

Re: [Rdkit-discuss] Python GetShortestPath()?

2015-04-22 Thread David Cosgrove
Just for information, if you want the full matrix of shortest path distances for a molecule, try the Floyd-Warshall algorithm: http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm. It's O(n^3), and about 10 lines of code. For molecules, you initialise the input matrix so that dist[i][j]

Re: [Rdkit-discuss] After successfull installation I face still errors with importing in python.

2014-07-30 Thread David Cosgrove
Hi Jessica, There's no denying that linux is a steep learning curve, although I expect that I would face similar problems were I to start working in earnest on windows. The problem here, I would expect, is that in a new shell your environment variables are not set. You should add the lines

Re: [Rdkit-discuss] MaxMin Picker and Python

2014-07-17 Thread David Cosgrove
If you don't mind writing some extra code, we've had good success with a Monte Carlo implementation of a maximin diversity picker called BigPicker, described in Blomberg et al, JCAMD, 23, 513-525 (2009). With this implementation, you only need to keep the subset distance matrix in memory. At each

Re: [Rdkit-discuss] SmilesToMol runtime error

2012-08-03 Thread DAvid Cosgrove
Hi, It’s a minor point in the discussion, maybe, but Meyers’ ‘More Effective C++’ recommends always catching exceptions by reference. It’s quicker than catching by value because it avoids copy construction, and, more importantly, it avoids the problem of class slicing if a derived class