Re: [Rdkit-discuss] Polar surface areas

2016-08-17 Thread Adrian Jasiński
Hi Josh

You have TPSA (Topological Polar Surface Area) in Rdkit Descriptors

http://www.rdkit.org/Python_Docs/rdkit.Chem.Descriptors-module.html

Check the list of all descriptors

http://www.rdkit.org/docs/GettingStartedInPython.html#list-of-available-descriptors


regards
Adrian Jasiński

2016-08-17 16:17 GMT+02:00 Campbell J.E. :

> Hi RDKitters,
>
>
>
> I’d like to be able to calculate polar surface areas on some molecules
> using RDKit as a torsion changes. I’ve dug into the code and found the
> MolSurf.py and some of the functions but as I understand it these are
> mostly for a 2Dish representation of the molecule. So what’s the best way
> to go about this? I can supply 3D coordinates for the conformations and
> partial charges. Is there also a way to increase the accuracy of the
> surface area calculated?
>
>
>
> Cheers,
>
>
>
> Josh Campbell
>
>
>
>
>
> 
> --
>
> ___
> 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] PgSQL / cartridge installation problem

2016-07-28 Thread Adrian Jasiński
I'm using Ubuntu 16.04 LTS,

I successfully installed latest rdkit version 2016_03_03 from source,
but when I tried to install Cartridge I found difficulties.
Theres no good instruction in RDKit documentation how to install it.
Only info is in README file but it is not valid.
Possibly there should be some notes added to
http://www.rdkit.org/docs/Install.html or in Cartridge tab:
http://www.rdkit.org/docs/Cartridge.html

First theres no file:

pgsql_install.sh in:

\Code\PgSQL\rdkit\pgsql_install.sh (It should be accroding README file in
\Code\PgSQL\rdkit\README)


Second when I tried run "make" command I got an error:


gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong
-Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie
-fno-omit-frame-pointer -fpic -I/usr/local/include
-I/home/adrian/mm/apps/rdkit/current/Code -DRDKITVER='"007300"'
-mpopcnt -I. -I./ -I/usr/include/postgresql/9.5/server
-I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2
-D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6 -fPIC -c
-o mol_op.o mol_op.c
mol_op.c: In function ‘mol_substruct_count’:
mol_op.c:137:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   bool uniquify = PG_GETARG_BOOL(2);
   ^
mol_op.c: In function ‘mol_formula’:
mol_op.c:203:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   bool separateIsotopes = PG_GETARG_BOOL(1);
   ^
mol_op.c: In function ‘mol_inchi’:
mol_op.c:222:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   char *res = pnstrdup(str, strlen(str));
   ^
mol_op.c: In function ‘mol_inchikey’:
mol_op.c:238:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   char *res = pnstrdup(str, strlen(str));
   ^
mol_op.c: In function ‘mol_murckoscaffold’:
mol_op.c:249:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   CROMol scaffold = MolMurckoScaffold(mol);
   ^
mol_op.c:251:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   Mol *res = deconstructROMol(scaffold);
   ^
In file included from mol_op.c:34:0:
mol_op.c: In function ‘fmcs_mol2s_transition’:
/usr/include/postgresql/9.5/server/fmgr.h:224:29: warning:
initialization makes pointer from integer without a cast
[-Wint-conversion]
 #define PG_GETARG_DATUM(n)  (fcinfo->arg[n])
 ^
mol_op.c:334:18: note: in expansion of macro ‘PG_GETARG_DATUM’
 CROMol mol = PG_GETARG_DATUM(1);
  ^
In file included from /usr/include/postgresql/9.5/server/postgres.h:48:0,
 from rdkit.h:40,
 from mol_op.c:33:
mol_op.c:339:19: error: format not a string literal and no format
arguments [-Werror=format-security]
 elog(WARNING, t);
   ^
/usr/include/postgresql/9.5/server/utils/elog.h:212:23: note: in
definition of macro ‘elog’
   elog_finish(elevel, __VA_ARGS__); \
   ^
mol_op.c:344:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
 char *smiles = makeMolText(mol, &len, false);
 ^
In file included from mol_op.c:34:0:
/usr/include/postgresql/9.5/server/fmgr.h:224:29: warning:
initialization makes pointer from integer without a cast
[-Wint-conversion]
 #define PG_GETARG_DATUM(n)  (fcinfo->arg[n])
 ^
mol_op.c:363:18: note: in expansion of macro ‘PG_GETARG_DATUM’
 CROMol mol = PG_GETARG_DATUM(1);
  ^
In file included from /usr/include/postgresql/9.5/server/postgres.h:48:0,
 from rdkit.h:40,
 from mol_op.c:33:
mol_op.c:368:19: error: format not a string literal and no format
arguments [-Werror=format-security]
 elog(WARNING, t);
   ^
/usr/include/postgresql/9.5/server/utils/elog.h:212:23: note: in
definition of macro ‘elog’
   elog_finish(elevel, __VA_ARGS__); \
   ^
mol_op.c:373:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
 char *smiles = makeMolText(mol, &len, false);
 ^
mol_op.c: In function ‘fmcs_mols’:
mol_op.c:411:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   int32 ts_size = VARHDRSZ + strlen(str);
   ^
In file included from mol_op.c:34:0:
mol_op.c: In function ‘fmcs_mol_transition’:
/usr/include/postgresql/9.5/server/fmgr.h:224:29: warning:
initialization makes pointer from integer without a cast
[-Wint-conversion]
 #define PG_GETARG_DATUM(n)  (fcinfo->arg[n])
 ^
mol_op.c:432:18: note: in expansion of macro ‘PG_GETARG_DATUM’
 CROMol mol = PG_GETARG_DATUM(1);
  ^
In file included from rdkit.h:40:0,
 from mol

[Rdkit-discuss] next RDKit UGM?

2016-01-15 Thread Adrian Jasiński
Are there any plans for next RDKit UGM in 2016?
I planning my conferences calendar for this year, for this reason it will
be good to know.

regards
Adrian
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Latest version

2015-12-10 Thread Adrian Jasiński
The release and binary files are on the github release page:
https://github.com/rdkit/rdkit/releases/tag/Release_2015_09_2

regards
Adrian

2015-12-10 11:12 GMT+01:00 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, and my python interpreter can find it. However, I can't find the
> include files or object libraries for C++ development, which is what I'm
> after.
>
> Can someone please point me in the right direction?  Be as rude as you
> like in the process, as I feel I must be being very dim!
>
> Thanks,
>
> Dave
>
>
>
> --
>
> ___
> 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


Re: [Rdkit-discuss] Ridiculously easy problem - capture RDKit's error messages

2015-01-23 Thread Adrian Jasiński
see:
https://docs.python.org/2/tutorial/errors.html

import rdkit
from rdkit import Chem
try:
Chem.MolFromSmiles('XXX')
except Exception as msg:
(do something here e.g. pring msg)

pozdrawiam
Adrian

2015-01-23 14:58 GMT+01:00 JP :

>
> Yo RDKitters,
>
> I am stuck on something so basic, its embarrassing.  But for the life of
> me I cannot figure it out on my own.  This is probably more of a python
> question than an RDKit one.
>
> I want to capture the RDKit warning/error message from python.  e.g.
>
> >>> import rdkit
> >>> from rdkit import Chem
> >>> Chem.MolFromSmiles('XXX')
> [14:51:32] SMILES Parse Error: syntax error for input: XXX
>
> I want to capture that error message (which in this case isn't very
> informative, but if you read in a mol2 you can get something like
> [14:25:46] 3ZGZ.A: warning - O.co2 with non C.2 or S.o2 neighbor. Which I
> am also interested in).  The big picture is that I built a web up where you
> upload an sdf, mol, mol2 or smi file - and I want to show RDKit's error
> message if there something funny in the query file.
>
> I have tried the obvious (I think):
>
> #!/usr/bin/env python
> import sys
> import rdkit
> from rdkit import Chem
>
> f = open("err.log", "w")
> original_stderr = sys.stderr
> sys.stderr = f
> Chem.MolFromSmiles('XXX')
> sys.stderr = original_stderr
> f.close()
>
> This still shows the error message in the terminal and not in the file.  I
> tried the same for stdout, still no cigar.
>
> Any ideas ?
>
> THANKS!
> JP
>
>
> --
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] logD

2014-08-22 Thread Adrian Jasiński
Hi,

Is there a way to calculate *distribution-coefficient* *(logD)* for a
compound?
I'm interested in calculation at PH 7.4 for some compounds.

I haven't found it in the list of descriptors:
http://www.rdkit.org/docs/GettingStartedInPython.html#list-of-available-descriptors

If not it will be nice to have such a possibility.

Regars
Adrian
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] valence problem

2014-07-10 Thread Adrian Jasiński
Hi all
I have a problem with generating molecule from smiles.

from rdkit import Chem
template = Chem.MolFromSmiles('F[P-](F)(F)(F)(F)F.CN(C)C(F)=[N+](C)C')

I got an error:
 Explicit valence for atom # 1 P, 7, is greater than permitted

But the SMILES for this structure should be valid.
I checked many web services and the structure is always the same
the CAS number for this structure is 164298-23-1

Can I skip checking the valence during generating mol from smiles?

regards
Adrian
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] 2D Drawing in C++

2014-07-02 Thread Adrian Jasiński
If I can start a list of wishes for new function it will be nice to add a
possibility for drawing the series of molecules with the same "core"
in the same orientation (based on some alignment or something like that).

pozdrawiam
Adrian


2014-07-02 14:04 GMT+02:00 Greg Landrum :

> Ah, what timing.
>
> I have just started thinking about updating the C++ drawing code (which I
> agree is extremely basic) to improve the quality and make it more generally
> useful. I agree that the abstract base class idea makes a lot of sense.
> This is, in essence, what the Python code does already.
>
> There's definitely interest from my side. I think it would help a lot.
>
> If there's a way to do so, I would happy to help out as you proceed. I
> certainly would be more than willing to add "refinements" like dealing with
> chiral centers.
>
> -greg
>
>
>
>
> On Wednesday, July 2, 2014, David Cosgrove 
> wrote:
>
>>
>> Hi All,
>>
>> I am currently writing some code for which I needed a Qt widget with a 2D
>> RDKit rendering that I could interact with.  This needed
>> $RDBASE/GraphMol/MolDrawing/MolDrawing.h, but I found it very difficult to
>> find the drawing coordinates for all atoms in the RDKit drawing model and
>> convert them to screen coordinates so I could add annotation to the
>> drawing, find which atom users had picked, etc.  So I have created new
>> drawing classes using a design borrowed from the original OpenEye OEDepict
>> toolkit written, I believe, by Roger Sayle.  This uses an abstract base
>> class that handles all the drawing in terms of pure virtual functions for
>> drawing lines, writing text etc.  The user derives a concrete class that
>> implements these functions for his/her drawing library of choice.
>>
>> Currently I have something that's adequate for my purposes, but if
>> there's enough interest from people on the list, I can tidy it up, provide
>> some example code and submit it for inclusion. In the short term it would
>> be an addition to the existing system so a non-breaking change, but in the
>> longer term it could possibly be a route to unifying the python and C++ 2D
>> drawing systems which seem at present to be quite separate.
>>
>> I mention this at this stage because it would be a non-trivial amount of
>> work on my part to do this.  To start with, I don't need to worry about
>> drawing chiral centres in my current project, so I haven't done anything
>> about that (MolDrawing.h doesn't either, for that matter!). The example
>> codes would have to be written to do something useful that showed all the
>> features, there might be a need for documentation, etc.  Not insignificant
>> is that I would have to bash this square peg through the round hole which
>> is AstraZeneca's publication approval system that won't have seen anything
>> like it before.  There don't seem to be many of us C++ programmers posting
>> to the list, so I'm really looking to gauge interest. I'm happy to put the
>> work in to make this a useful submission to the project, but only if other
>> people are likely to use it.
>>
>> Please let me know, either to this list or privately to
>> david.cosgr...@astrazeneca.com.
>>
>> Thanks,
>> Dave
>>
>>
>
> --
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Chemical formula

2014-06-13 Thread Adrian Jasiński
http://www.rdkit.org/Python_Docs/rdkit.Chem.rdMolDescriptors-module.html#CalcMolFormula

from rdkit.Chem.rdMolDescriptors import CalcMolFormula
formula = CalcMolFormula(Chem.MolFromSmiles("CCCOC"))

pozdrawiam
Adrian


2014-06-13 10:20 GMT+02:00 Alexey Chernobrovkin :

> Hi all,
>
> Sorry for stupid question… But what is the simplest way to get chemical
> formula of a molecule using rdkit?
>
> Cheers,
> Alex
>
> --
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SMARTS behaviour

2014-03-27 Thread Adrian Jasiński
you can allways visualise yours SMARTS by using http://www.smartsview.de/

pozdrawiam
Adrian


2014-03-27 17:44 GMT+01:00 Jameed Hussain :

>  Try this:
>
> [*!H0;!$(*~[#0])]
>
>
>
> I don't think you can do what you want without a recursive SMARTS. It's
> well worth doing the Daylight exercises to get your head around recursive
> SMARTS - they are really useful.
>
>
>
> Cheers
>
> Jameed
>
>
>
> *From:* Nicholas Firth [mailto:nicholas.fi...@icr.ac.uk]
> *Sent:* 27 March 2014 15:23
> *To:* rdkit-discuss@lists.sourceforge.net Discuss
> *Subject:* [Rdkit-discuss] SMARTS behaviour
>
>
>
> Hi RDKitters,
>
>
>
> This isn't strictly an RDKit based issue, but I guess someone here will be
> able to help me. I'm trying to identify the index of atoms in a molecule
> which have one or more hydrogen bonded to them but are not bonded to a
> dummy atom ([*]).
>
>
>
> >>> mol = Chem.MolFromSmiles('[*]CCC[*]')
>
> >>> patt = Chem.MolFromSmarts('[*H1,H2,H3,H4]!~[#0]')
>
> >>> print mol.GetSubstructMatches(patt)
>
> ()
>
>
>
> I'd expect this to return (1). But it would appear that I'm in the wrong,
> as Pipeline Pilot give the same result. Is there a SMARTS query that will
> give me the matches that I want or do I have to go back to iterating over
> atoms?
>
>
>
> Many thanks in advance.
>
>
> Best,
>
> Nick
>
>
>
> *Nicholas C. Firth* | PhD Student | Cancer Therapeutics
>
> The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton |
> Surrey | SM2 5NG
>
> T 020 8722 4033 | E nicholas.fi...@icr.ac.uk | W www.icr.ac.uk | Twitter
> @ICRnews 
>
> *Facebook* www.facebook.com/theinstituteofcancerresearch
>
> *Making the discoveries that defeat cancer*
>
>
>
>
>
> The Institute of Cancer Research: Royal Cancer Hospital, a charitable
> Company Limited by Guarantee, Registered in England under Company No.
> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the addressee only. If
> the message is received by anyone other than the addressee, please return
> the message to the sender by replying to it and then delete the message
> from your computer and network.
>
> --
>
> This e-mail was sent by GlaxoSmithKline Services Unlimited
> (registered in England and Wales No. 1047315), which is a
> member of the GlaxoSmithKline group of companies. The
> registered address of GlaxoSmithKline Services Unlimited
> is 980 Great West Road, Brentford, Middlesex TW8 9GS.
>
>
> --
>
> ___
> 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


Re: [Rdkit-discuss] Insert mol objects directly into postgres rdkit cartridge column?

2014-02-26 Thread Adrian Jasiński
you can try use razi:

http://razi.readthedocs.org/en/latest/database_creation_tutorial.html

pozdrawiam
Adrian


2014-02-26 18:34 GMT+01:00 Greg Landrum :

> Hi Hari,
>
> You can use "mol_from_pkl()". Here's a quick demo:
> In [20]: m = Chem.MolFromSmiles('c1cnccc1')
>
> In [21]: pkl = buffer(m.ToBinary())
>
> In [22]: curs.execute('select mol_from_pkl(%s)',(pkl,))
>
> In [23]: curs.fetchone()
> Out[23]: ('c1ccncc1',)
>
> Is that enough to get you started?
> -greg
>
>
>
> On Tue, Feb 25, 2014 at 8:28 PM, hari jayaram  wrote:
>
>> Hi ,
>> I am a newbie to postgres and the rdkit postgres database cartridge.
>>
>> I have gotten the cartridge installed and can query sub-structure
>> similarity and do other things as documented in the cartridge documentation
>> page.
>>
>> To create a molecule from the cartridge the documentation
>> recommends something like:
>>
>>
>> >>> curs.execute('select molregno,mol_send(m) from rdk.mols where m@
>> >%s',('c12c1nncc2',))
>> >>> row = curs.fetchone()
>> >>> row
>> (9830, )
>>
>> Then the pickled output of mol_send will be used to create a new molecule
>>
>> >>> from rdkit import Chem
>> >>> m = Chem.Mol(str(row[1]))
>> >>> Chem.MolToSmiles(m,True)
>> 'CC(C)Sc1ccc(CC2CCN(C3CCN(C(=O)c4cnnc5c54)CC3)CC2)cc1'
>>
>>
>> My question is : how about the other way .Is the only way to use the
>> smiles and do an sql insert with the smiles and the mol_from_smiles
>> function as in :
>>
>>  insert into compounds (smiles,rdkit_mol,internal,external) VALUES
>> ('C',mol_from_smiles('C);'ID-111','EI-222');
>>
>> Is there a way to insert the python rdkit mol object into the database
>> rdkit "mol" column directly.
>>
>> This is in some ways connected to a question I just asked ( django
>> related) on stack 
>> overflow.
>>
>> Thanks a tonne for your help in advance
>> Hari
>>
>>
>>
>>
>> --
>> Flow-based real-time traffic analytics software. Cisco certified tool.
>> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>> Customize your own dashboards, set traffic alerts and generate reports.
>> Network behavioral analysis & security monitoring. All-in-one tool.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
>
> --
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] generate 2D figure

2014-02-20 Thread Adrian Jasiński
m = Chem.MolFromSmiles('ccc[nH]c', sanitize=False)

I think that in this example there is a problem with your SMILES.
Why you use lower case?
In SMILES format it's a aromatic molecule but you don't have the beginning
and ending of aromatic bond noted by number.
If you have aromatic molecule you should write it like that:

>>>> m = Chem.MolFromSmiles('c1cc[nH]c1')

if it is not aromatic than use upper case:
>>>> m = Chem.MolFromSmiles('CCC[NH]C')
and than try:
>>>> AllChem.Compute2DCoords(m)

for second example:
>>>> m = Chem.MolFromSmiles('C(=O)OCCO')
>>>> AllChem.Compute2DCoords(m)



2014-02-19 21:46 GMT+01:00 Yingfeng Wang :

> Here are more details.
>
> If I use
>
> m = Chem.MolFromSmiles('ccc[nH]c', sanitize=False)
> AllChem.Compute2DCoords(m)
>
> It works.
>
> But I get trouble with
> >>> m = Chem.MolFromSmiles('C(=O)OCCO', sanitize=False)
> >>> AllChem.Compute2DCoords(m)
>
> I got
>
> 
> Pre-condition Violation
> getNumImplicitHs() called without preceding call to calcImplicitValence()
> Violation occurred on line 170 in file
> /home/yf1/software/RDKit/install_version/latest/Code/GraphMol/Atom.cpp
> Failed Expression: d_implicitValence>-1
> 
>
>
> Traceback (most recent call last):
>   File "", line 1, in 
> RuntimeError: Pre-condition Violation
>
>
>
> On Wed, Feb 19, 2014 at 3:27 PM, Yingfeng Wang  wrote:
>
>> Adrian,
>>
>> I meet a weird case.
>>
>> >>> import matplotlib.offsetbox
>> >>> from rdkit import Chem
>> >>> from rdkit.Chem import AllChem
>> >>> from rdkit.Chem import Draw
>> >>> m = Chem.MolFromSmiles('ccc[nH]c')
>>
>> I got
>> non-ring atom 0 marked aromatic
>> >>> AllChem.Compute2DCoords(m)
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> Boost.Python.ArgumentError: Python argument types in
>> rdkit.Chem.rdDepictor.Compute2DCoords(NoneType)
>> did not match C++ signature:
>> Compute2DCoords(RDKit::ROMol {lvalue} mol, bool canonOrient=True,
>> bool clearConfs=True, boost::python::dict {lvalue} coordMap={}, unsigned
>> int nFlipsPerSample=0, unsigned int nSample=0, int sampleSeed=0, bool
>> permuteDeg4Nodes=False, double bondLength=-1.0)
>>
>>
>> Actually, "ccc[nH]c" is a fragment. Could you please help me to know
>> whether there is a work around to this case?
>>
>> Thanks.
>>
>> Yingfeng
>>
>>
>>
>>
>> On Mon, Feb 17, 2014 at 2:58 PM, Yingfeng Wang wrote:
>>
>>> Adrian,
>>>
>>> Thanks, it works.
>>>
>>> Yingfeng
>>>
>>>
>>> On Mon, Feb 17, 2014 at 12:50 PM, Adrian Jasiński <
>>> jasinski.adr...@gmail.com> wrote:
>>>
>>>> If you read all from tutorial you will find a example:
>>>>
>>>> >>> suppl = Chem.SDMolSupplier('data/cdk2.sdf')>>> ms = [x for x in suppl 
>>>> >>> if x is not None]>>> for m in ms: tmp=AllChem.Compute2DCoords(m)>>> 
>>>> >>> from rdkit.Chem import Draw>>> 
>>>> >>> Draw.MolToFile(ms[0],'images/cdk2_mol1.png')>>> 
>>>> >>> Draw.MolToFile(ms[1],'images/cdk2_mol2.png')
>>>>
>>>>
>>>> for this example with you pasted you can just write mol to file:
>>>>
>>>>
>>>> >>> from rdkit.Chem import AllChem
>>>>
>>>>
>>>>
>>>>
>>>> >>> from rdkit import Chem
>>>> >>> m = Chem.MolFromSmiles('c1nccc2n1ccc2')
>>>>
>>>> >>> AllChem.Compute2DCoords(m)
>>>>
>>>> Draw.MolToFile(m,'example.png')
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> pozdrawiam
>>>> Adrian Jasiński
>>>>
>>>>
>>>> 2014-02-17 18:34 GMT+01:00 Yingfeng Wang :
>>>>
>>>>>  I want to draw a 2D figure of a compound. And I follow the example
>>>>> given at the following link,
>>>>>
>>>>> http://www.rdkit.org/docs/GettingStartedInPython.html
>>>>>
>>>>> My code is given as follows,
>>>>>
>>>>> >>>

Re: [Rdkit-discuss] generate 2D figure

2014-02-17 Thread Adrian Jasiński
If you read all from tutorial you will find a example:

>>> suppl = Chem.SDMolSupplier('data/cdk2.sdf')>>> ms = [x for x in suppl if x 
>>> is not None]>>> for m in ms: tmp=AllChem.Compute2DCoords(m)>>> from 
>>> rdkit.Chem import Draw>>> Draw.MolToFile(ms[0],'images/cdk2_mol1.png')>>> 
>>> Draw.MolToFile(ms[1],'images/cdk2_mol2.png')


for this example with you pasted you can just write mol to file:

>>> from rdkit.Chem import AllChem
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('c1nccc2n1ccc2')

>>> AllChem.Compute2DCoords(m)

Draw.MolToFile(m,'example.png')





pozdrawiam
Adrian Jasiński


2014-02-17 18:34 GMT+01:00 Yingfeng Wang :

> I want to draw a 2D figure of a compound. And I follow the example given
> at the following link,
>
> http://www.rdkit.org/docs/GettingStartedInPython.html
>
> My code is given as follows,
>
> >>> from rdkit.Chem import AllChem
> >>> from rdkit import Chem
> >>> m = Chem.MolFromSmiles('c1nccc2n1ccc2')
> >>> AllChem.Compute2DCoords(m)
> 0
> >>> template = Chem.MolFromSmiles('c1nccc2n1ccc2')
> >>> AllChem.Compute2DCoords(template)
> 0
> >>> AllChem.GenerateDepictionMatching2DStructure(m,template)
> >>>
>
>
> However, I got nothing. I am wondering what the correct way is to generate
> the 2D figure of "c1nccc2n1ccc2". Thanks.
>
> Yingfeng
>
>
> --
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SDMolSupplier doesn't support file handlers?

2014-01-31 Thread Adrian Jasiński
Example from tutorial:

>>> import gzip>>> inf = gzip.open('data/actives_5ht3.sdf.gz')>>> gzsuppl = 
>>> Chem.ForwardSDMolSupplier(inf)>>> ms = [x for x in gzsuppl if x is not 
>>> None]>>> len(ms)180



pozdrawiam
Adrian Jasiński


2014-01-31 Michał Nowotka :

> Hi,
>
> I need to process large, compressed SDF file. I was planning to use
> SDMolSupplier but there is a problem:
>
> 1. I can't just pass a file name, as this is compressed file and if I
> understand, SDMolSupplier doesn't support compressed files.
> 2. I can't read a file to string and then call setData() method of
> SDMolSupplier, because size of uncompressed string will be larger than
> available memory.
>
> The solution would be to obtain file handler (f = gzip.open(...)) but
> the problem is that there is no way (at least I don't know any) to
> pass it to SDMolSupplier.
>
> Any ideas?
>
> Kind regards,
> Michał Nowotka
>
>
> --
> WatchGuard Dimension instantly turns raw network data into actionable
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] rdkit mol objects from sql

2013-10-23 Thread Adrian Jasiński
One of the solutions is razi but it's for sqlalchemy

https://razi.readthedocs.org/en/latest/database_creation_tutorial.html

pozdrawiam
Adrian Jasiński


2013/10/23 George Papadatos 

> Yes it does; many thanks!
> I've just found the notebook I mentioned:
> http://nbviewer.ipython.org/4316426/
> (Scroll to bottom)
> I prefer Greg's first solution though, as it avoids the conversion from
> smiles completely.
>
> Best,
>
> George
>
> Sent from my gPad
>
> On 23 Oct 2013, at 20:39, JP  wrote:
>
> Does the following help you george?
> http://comments.gmane.org/gmane.science.chemistry.rdkit.user/860
>
>
>
> On 23 October 2013 17:11, George Papadatos  wrote:
>
>> Hi RDKitters,
>> I must have seen this in an ipython notebook but can't find it right now:
>> If I have a table of rdkit mols generated by the cartridge, is there a
>> way to retrieve them using a psycopg2 connection within python - ideally
>> inside a pandas dataframe?
>>
>> I've got this snippet:
>> import pandas as pd
>> import psycopg2
>> conn = psycopg2.connect("port=5432 user=chembl dbname=chembl_17")
>> data = pd.read_sql(sql, conn)
>>
>> ...but I'm missing the step where I retrieve rdkit mol objects somehow
>> instead of smiles.
>>
>> Many thanks in advance,
>> George
>>
>>
>>
>> --
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
>> from
>> the latest Intel processors and coprocessors. See abstracts and register >
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] IUPAC nomenclature

2013-06-11 Thread Adrian Jasiński
Is there a way to converting IUPAC nomenclature into SMILES, InChI, or
Molfile formats?
I didn't found any clues in RDKit Documentation.

it would be nice if you can add such functionality.
Fast way for that can be using OPSIN library:

https://bitbucket.org/dan2097/opsin/

http://opsin.ch.cam.ac.uk/

I found that something like this is added to Rubidium, some
chemical-informatics tool written in Ruby
http://depth-first.com/articles/2007/10/19/easily-convert-iupac-nomenclature-to-smiles-inchi-or-molfile-with-rubidium/

regards
Adrian Jasinski
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] IUPAC nomenclature

2013-06-10 Thread Adrian Jasiński
Is there a way to converting IUPAC nomenclature into SMILES, InChI, or
Molfile formats?
I didn't found any clues in RDKit Documentation.

it would be nice if you can add such functionality.
Fast way for that can be using OPSIN library:

https://bitbucket.org/dan2097/opsin/

http://opsin.ch.cam.ac.uk/

I found that something like this is added to Rubidium, some
chemical-informatics tool written in Ruby
http://depth-first.com/articles/2007/10/19/easily-convert-iupac-nomenclature-to-smiles-inchi-or-molfile-with-rubidium/

regards
Adrian Jasiński
--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] image font size

2012-07-11 Thread Adrian Jasiński
Hi all,

Greg thanks for new release.
By the way I have the question:
How can I change font size on image?

When I create small images the font is too big and on some big size
images it is too small.

Regards
Adrian

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Announcement: 1st RDKit User Group Meeting scheduled

2012-07-06 Thread Adrian Jasiński
I have the question connected with the topic,
Is there any temporary plan of the meeting or topics which will be
discussed during this event?
If yes where I can find it?
If no will it be announced and when?

I suggest to publish such a list of topics and to vote for most
interesting of them.

2012/7/6 Greg Landrum :
> On Fri, Jul 6, 2012 at 11:06 AM, JP  wrote:
>> I just noticed that this is a "user" meeting and not a "dev" one - so
>> perhaps such a topic is out of scope...
>>
>
> eh, that depends. C++ users of the code are also users. I'm more
> concerned about having a session that only 2 people are interested in.
> To accommodate that we would have to do breakout sessions, and we
> hadn't planned to do such a thing.
>
> I will see if I can come up with a sensible demo that shows how to
> create a new python extension module using RDKit functionality. This
> should at least make some stuff easier for others in the future.
>
> -greg
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] problem with overlap in drawing.

2012-07-02 Thread Adrian Jasiński
Thanks for that, I hope it will help. I will wait for next release and
check other structures drawing.
Unfortunately I can't publish all structures with errors (for security
reasons), but I will try next version and I let you know if I will
find any similar errors.

2012/7/2 Greg Landrum :
> An update on this thread:
>
> On Tue, Jun 19, 2012 at 9:19 AM, Adrian Jasiński
>  wrote:
>>
>> There is some example code:
>>
>> from rdkit import Chem
>> from rdkit.Chem import Draw
>> mol = Chem.MolFromSmiles('CC(=O)Nc1c1C(=O)C11C1C1')
>> Draw.MolToFile(mol,'test.png')
>>
>
> I made some change to the depictor this morning that handle this case
> as well as a few other problematic cases. These will be in the next
> release
>
> There are definitely still some problems in the depictor, but it's
> better now than it was. Adrian: thanks for reporting this failure.
>
> -greg

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] problem with overlap in drawing.

2012-06-26 Thread Adrian Jasiński
I have many others examples where I have found overlapping. Even rings
overlap in some of them.
It will be nice if it will be fixed for next realize.

Best Regards
Adrian

2012/6/20 Greg Landrum :
> Dear Adrian,
>
> On Tue, Jun 19, 2012 at 9:19 AM, Adrian Jasiński
>  wrote:
>>
>> I have some problem with drawing. When I draw molecules using RDkit
>> sometimes I have some structure overlap.
>> But when I draw it using for example marvin it's look fine.
>>
>> There is some example code:
>>
>> from rdkit import Chem
>> from rdkit.Chem import Draw
>> mol = Chem.MolFromSmiles('CC(=O)Nc1c1C(=O)C11C1C1')
>> Draw.MolToFile(mol,'test.png')
>>
>> In attachment I added example image.
>
> Thanks for reporting the problem. That's definitely a bug in the depiction 
> code.
>
>>
>> I'm using Ubuntu 12.04 x64.
>>
>> Is there any solution?
>
> There is not at the moment an easy one. I will take a look at your
> specific molecule and see if I can fix the problem for the next
> release.
>
> Best Regards,
> -greg

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] problem with overlap in drawing.

2012-06-19 Thread Adrian Jasiński
Hi All

I have some problem with drawing. When I draw molecules using RDkit
sometimes I have some structure overlap.
But when I draw it using for example marvin it's look fine.

There is some example code:

from rdkit import Chem
from rdkit.Chem import Draw
mol = Chem.MolFromSmiles('CC(=O)Nc1c1C(=O)C11C1C1')
Draw.MolToFile(mol,'test.png')

In attachment I added example image.

I'm using Ubuntu 12.04 x64.

Is there any solution?
<>--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss