Re: [Cdk-user] XMLIsotope class file missing

2014-11-28 Thread John M
Hello team,
I have CDK checkout of version 1.4.19 for JChemPaint. But it seems
XMLIsotope class file is missing. Is it that I am not using the
correct CDK version for JChemPaint ?  Please help me with this.Thank
you.

Regards,karuk


Hi Karuk,

The JChemPaint master branch is using the CDK 1.5.8.

Regards,
John W May
john.wilkinson...@gmail.com
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] cdk-jar including java sources

2014-11-28 Thread John M
Just to follow up on this, I might do include such a jar in the next
release. We currently only create an *aggregate* for the JavaDoc but this
is also possible for the source -
http://maven.apache.org/plugins/maven-source-plugin/aggregate-mojo.html.

Regards,
John W May
john.wilkinson...@gmail.com
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Stereochemistry during 2D generation of SMILES structure

2015-02-04 Thread John M
Patch is now done https://github.com/cdk/cdk/pull/115.

Regards,
John W May
john.wilkinson...@gmail.com

On 17 January 2015 at 10:14, Oscar Mora oscarmorape...@gmail.com wrote:

 Thanks for your message. The workaround works nice.

 Oscar

 2015-01-16 14:52 GMT+01:00 John M john.wilkinson...@gmail.com:

 Unfortunately it's a combination of the molfile having implicit
 stereochemistry (i.e. tools have to guess from the depiction) and the CDK
 layout. I can fix both but as a simple work around go through the bonds and
 those that are double, not in a ring, or have stereo (check
 IStereoElements) should have the stereoType set to E_OR_Z... can't remember
 the exact flag.

 Will fix though for next release.

 J

 Regards,
 John W May
 john.wilkinson...@gmail.com

 On 16 January 2015 at 10:05, Oscar Mora oscarmorape...@gmail.com wrote:

 Hi,

 I have the following question about processing SMILES format structures
 + 2D Generation + serialization in Mol format. I am using CDK 1.5.8.

 My goal is to process an structure in SMILES format, generate 2D
 coordinates and save it as in Mol format. The problem where I am stuck is
 that the input SMILES has the no stereochemistry defined, but the final mol
 output _has_ the stereochemestry defined.

 Following I have prepared a simple example to describe my problem:

 The input structure is the following one:

 ON=CC1=CC=C(O)C=C1

 The structure is read and parsed using the following code (snippet):

 [...]
 IAtomContainer iAtomContainer = null;
 final SmilesParser smilesParser = new
 SmilesParser(DefaultChemObjectBuilder.getInstance());
 iAtomContainer = smilesParser.parseSmiles(molecule);

 [...]

 then the 2D coordinates are generated.

 [...]
sdg.setMolecule(iAtomContainer, true);
sdg.generateCoordinates();
iAtomContainerWCoordinates = sdg.getMolecule();
 [...]

 and finally the 'IAtomContainer' object is serialized as 'mol' file,
 producing the following output:

   CDK 0116150922

  10 10  0  0  0  0  0  0  0  0999 V2000
 3.91323.73940. O   0  0  0  0  0  0  0  0  0  0  0  0
 2.61122.99470. N   0  0  0  0  0  0  0  0  0  0  0  0
 2.60511.49470. C   0  0  0  0  0  0  0  0  0  0  0  0
 1.30300.75000. C   0  0  0  0  0  0  0  0  0  0  0  0
 1.3030   -0.75000. C   0  0  0  0  0  0  0  0  0  0  0  0
 0.0280   -1.50000. C   0  0  0  0  0  0  0  0  0  0  0  0
-1.3220   -0.75000. C   0  0  0  0  0  0  0  0  0  0  0  0
-2.6148   -1.51070. O   0  0  0  0  0  0  0  0  0  0  0  0
-1.32200.75000. C   0  0  0  0  0  0  0  0  0  0  0  0
 0.02801.50000. C   0  0  0  0  0  0  0  0  0  0  0  0
   1  2  1  0  0  0  0
   2  3  2  0  0  0  0
   3  4  1  0  0  0  0
   4  5  2  0  0  0  0
   5  6  1  0  0  0  0
   6  7  2  0  0  0  0
   7  8  1  0  0  0  0
   7  9  1  0  0  0  0
   9 10  2  0  0  0  0
   4 10  1  0  0  0  0
 M  END

 If you render the structure before (SMILES) and after (MOL) the process,
 it is possible to watch how initially the double bond between N and C has
 not the stereo defined, but at the end of the process is arbitrarily
 defined (E). I have also attached two snapshots two further describe this
 (SMILES_before.png) and (MOL_after.png).

 Why is this happening ? Is there any way to control, and keep the flag
 of stereochemistry not defined during the transformation from SMILES to
 MOL? (I would like that the two depictions produce the same image)

 Thanks in advance

 Oscar


 --
 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
 ___
 Cdk-user mailing list
 Cdk-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/cdk-user




--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] [CDK] Urgent issue : Adding/Removing Explicit Hydrogen atoms

2015-01-29 Thread John M
Hi Yannick,

IIRC 1.5.6 and earlier had a bug where added terminal hydrogens had a null
impl H count. This is fixed in newer versions but to fix here you can loop
through and set any null impl H to 0. This isn't really correct but should
be okay if you stick to molfile/SMILES.

As I said already,* the CDK does not have SMIRKS transformations* and so I
can't help with any problems of the transformations.

J

Regards,
John W May
john.wilkinson...@gmail.com

On 29 January 2015 at 00:39, Yannick .Djoumbou y.djoum...@gmail.com wrote:

 Hi John,

 Thank you for you reply. The input molecule is in the file called
 test.sdf

 I have used the StructureDiagramGenerator and could indeed produce
 metabolites. However, I still notice some strange things:
 1- I cannot convert the resulting metabolites into SMILES although I could
 write them in a SDF file.
 2- I cannot remove the hydrogen atoms from the the resulting metabolites:
  ERRORS: java.lang.IllegalArgumentException: a non-pseudo atom
 had an unset hydrogen count



 1) here is a snippet of the code I wrote:

 StructureDiagramGenerator sdg =  new
 StructureDiagramGenerator();


 AtomContainerManipulator.convertImplicitToExplicitHydrogens(molecule); //
 where molecule is an AtomContainer object for the original input (without
 explicit hydrogens).

 sdg.setMolecule(molecule);
 sdg.generateCoordinates();
 IAtomContainer mol_with_hydrogen = sdg.getMolecule();

 System.out.println(WITH HYDROGENS:  +
 SmartsHelper.moleculeToSMILES(mol_with_hydrogen));

 // metabolites is a IAtomContainerSet with metabolites resulting from
 the biotrasnformation

 for (int j = 0; j  metabolites.getAtomContainerCount(); j++){
 System.out.println(METABOLITE:  +
 metabolites.getAtomContainer(j).toString());
 System.out.println(SMILES WITH HYDROGEN ATOMS:  +
 SmartsHelper.moleculeToSMILES(metabolites.getAtomContainer(j)));

 }

 I get the results shown in the attached file cdk_results.txt. As you can
 see, the conversion to SMILES does not return anything. I can however write
 the results in SDF format using SDFWriter as you can see in the attached
 file call test_metabolites. In this file we have 6 molecules. This arises
 from the fact that for a C atom attached to 2 different explicit H atoms
 for example, each H atom is replaced by an hydroxyl group. Thus, two
 molecules  are produced, because of the difference of the added O-atom
 coordinates. In fact, there should be 3 molecules when we remove the
 explicit H atoms, ideally.

 Anyway, I would like to have SMILES of the metabolites and also remove the
 hydrogen atoms without errors. After trials and errors, it seems that the
 IAtomContainer returned after transformation might cause a problem.  But I
 do not know why. May be you could analyze and let me know.

 I tried this:


 I displayed one of the results in test_metabolites.sdf and copied it as
 SMILES String, which I loaded in the snippet below:

 
 IAtomContainer ac =
 SmartsHelper.getMoleculeFromSmiles([H]OC1([H])SC2=C([H])C([H])=C([H])C([H])=C2C(=C([H])C([H])(P([H])[H])C(=S)N(C([H])([H])[H])C(F)(F)F)C2=C([H])C([H])=C([H])C([H])=C12);

 AtomContainerManipulator.suppressHydrogens(ac);
 System.out.println(SMILES WITHOUT HYDROGEN ATOMS:  +
 SmartsHelper.moleculeToSMILES(ac));

 -

 This returns:

 SMILES WITHOUT HYDROGEN ATOMS:
 OC1SC2=CC=CC=C2C(=CC(P)C(=S)N(C)C(F)(F)F)C3=CC=CC=C13


 So, somehow, when I have the smiles string, I can easily remove hydrogen
 atoms without errors. However, using the first snippet, I could not remove
 the hydrogen atoms.

 Could you examine this and let me know where the problem might come from
 and how to fix it?

 Regards,

 Yannick


 On Tue, Jan 27, 2015 at 3:32 PM, John M john.wilkinson...@gmail.com
 wrote:

 Hi Yannick,

 Check out the StrucutreDiagramGenerator API.


 http://cdk.github.io/cdk/1.5/docs/api/index.html?org/openscience/cdk/layout/StructureDiagramGenerator.html

 StructureDiagramGenerator sdg = new StructureDiagramGenerator();
 sdg.setUseTemplates(false); // only 1-2 substr templates by default lib
 turn it off for speed... identity templates are left enabled
 sdg.setMolecule(molecule, false); // clone or not
 sdg.generateCoordinates();

 J



 Regards,
 John W May
 john.wilkinson...@gmail.com

 On 27 January 2015 at 20:29, Yannick .Djoumbou y.djoum...@gmail.com
 wrote:

 Hi John,

 Thanks for replying.Please look at my comments below.

 Kind regards,

 Yannick

 On Tue, Jan 27, 2015 at 3:12 AM, John M john.wilkinson...@gmail.com
 wrote:


 On 27 January 2015 at 09:32, Yannick .Djoumbou y.djoum...@gmail.com
 wrote:

 I get the same molecule in the smiles format. Have you tried
 concerting that into sdf? Does it generate a compound with H atoms and
 their coordinates? It looks like AtomContainer resulting from 
 AtomContainerManipulator.convertImplicitToExplicitHydrogens(m)
 does not have

Re: [Cdk-user] Getting Screen Coordinates for each Atom

2015-01-24 Thread John M
Hi Zach,

*Renderer.toScreenCoordinates should do what you need
https://github.com/cdk/cdk/blob/master/display/renderbasic/src/main/java/org/openscience/cdk/renderer/AbstractRenderer.java#L180-L184

If not I'll look into adding this, but essentially you should just need to
consider the scale parameter + margins if there are any (also perhaps the
zoom). I should also note that the y-axis in cdk is reversed from AWT.

Thanks
J

Regards,
John W May
john.wilkinson...@gmail.com

On 22 January 2015 at 23:09, Zachary Charlop-Powers 
zchar...@mail.rockefeller.edu wrote:

  Hello CDK Users/Developers,

  I’ve recently been using CDK a bit and want to thank you for your hard
 work.

  I am trying to use CDK to generate some custom visualizations and I am
 wondering if there is a way to obtain the on-screen coordinates of each
 atom from the AtomContainerRenderer. It looks like there was once a
 function, getScreenCoordinates that would do this, but I don’t see it
 anymore.   Although I am starting to understand how visualizations are
 generated, its still a bit opaque to me.   However, for a given bounding
 box, scale, and atom container it should be possible to obtain the
 coordinate where the atom will be drawn. I would appreciate any pointers on
 how to find do this.


  Also, if anyone is interested I have put up a few blogposts on my foray
 into using CDK from Clojure to make pictures:
 http://zachcp.org/blog/2015/clojure-cdk-peptides/
 http://zachcp.org/blog/2015/basic-cdk-rendering/


  Thanks,
 zach cp

   Zach Charlop-Powers
 Post-Doctoral Fellow
 Laboratory of Genetically Encoded Small Molecules
 Rockefeller University

  zchar...@rockefeller.edu
 zachcp.org




 --
 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
 ___
 Cdk-user mailing list
 Cdk-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/cdk-user


--
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___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] convert ecfp fingerprint to fragments

2015-03-09 Thread John M
Hi Martin,

Try here - http://www.jcheminf.com/content/5/1/26

J
​
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] First property missing from SD file

2015-03-03 Thread John M
Hi Egon,

In 1.5.x you don't need to remove the name for the SMILES parser it stops
at termination characters - note SMILES with tabs is common :-). Is there
any ability in the format matcher to use extensions? For example
'.smi,.iso,.csmi'.

J
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Fwd: Fwd: CDKPsearch speed

2015-04-29 Thread John M
Also useful for others..

-- Forwarded message --
From: John M john.wilkinson...@gmail.com
Date: 29 April 2015 at 10:10
Subject: Re: [Cdk-user] Fwd: CDKPsearch speed
To: Rajarshi Guha rajarshi.g...@gmail.com


Great to hear - ​lots more to come of course.

Some points for an extra performance boost

1. Use the Silent objects as much as possible, it doesn't look like you're
using the listeners of the Default classes.
2. Aromaticity state is fixed once initialised and can be created outside
the loop and reused across multiple threads.
3. MDLV2000Reader can now be used as a lazy iterator akin to line reading
with BufferedReader. Note the 0,0,0,0 is important since each read will
know how many atoms as bonds there are we don't want to allocate then
reallocate the arrays.

MDLV2000Reader mdlr = new MDLV2000Reader(file);
IAtomContainer container;
while ((container = mdlr.read(new AtomContainer(0,0,0,0)) != null) {
 // do stuff
}

Also switching out the SMARTSQueryTool to the newer SmartsPattern in the
pcore matcher should also give a speed boost, the later will only run more
expensive ring size when the pattern needs it
https://github.com/cdk/cdk/blob/master/tool/smarts/src/main/java/org/openscience/cdk/smiles/smarts/SmartsPattern.java#L105-L108.
Will make that change tonight.

J
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] XlogP descriptor query

2015-05-11 Thread John M
Regards,
John W May
john.wilkinson...@gmail.com

On 11 May 2015 at 10:03, John M john.wilkinson...@gmail.com wrote:

 Hi Rahul,

 Just to check for the CDKUI, do you mean CDK Descriptor Calculator GUI,
 Padel, Knime? Which version of CDK are you using. There were some bug fixes
 between 1.4 and 1.5 and I believe some fixes to XLogP and the CDKUI may
 either be using a different version to your library calls or is setting up
 the molecule different..

 https://github.com/cdk/cdk/commit/13c5dc2f369399e67ca53424470bfea9f1cc4dd8
 https://github.com/cdk/cdk/commit/1a3f3d39ce25d9342ee8624f9f2890c57313ebfd

 J
 ​

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Fwd: CDKPsearch speed

2015-05-08 Thread John M
Just to clarify to the rest of the list on this, the pattern would be

[$(N1(a)CCNCC1)]

or being more specific and faster - restrict attachments to the piperizine
 ring.

[0Nv3D3+0$(*(a)1[CD2v4][CD2v4][ND2v3][CD2v4][CD2v4]1)]

Rereading now I read $pipN=N(c)(C)(C) as having an N=N but I guess it's an
assignment.

$pipN - N(c)(C)(C)

It's relatively simple to implement such definitions with regex but not
sure if anyone's seen this via Daylight?

John
​
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] XlogP descriptor query

2015-05-12 Thread John M
Hi Rahul,

Please post questions to list rather than directly.

CDK 1.5.x uses the AtomContainer class. There is also the AtomContainerSet
for collections of molecules but TBH you're better off using
SetIAtomContainer for most uses.

J
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Fwd: XlogP descriptor query

2015-05-12 Thread John M
You're call aromaticity on a compound and then discarding it and a
different point of the code. You should load your compounds into memory as
the table model.

mol = (IAtomContainer)mdlreader.next();
// aromaticity perception goes here
dr = (DoubleResult)weight.calculate(mol).getValue();

J
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Fwd: XlogP descriptor query

2015-05-12 Thread John M
​Ah right, yes Rahul the latest version for CDK is 1.5.10 (use Maven
central).

J
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Generating smiles / query smarts string for QueryAtomContainer

2015-07-01 Thread John M
This functionality is not currently available but I think AMBIT might have
something?

John

Regards,
John W May
john.wilkinson...@gmail.com

On 1 July 2015 at 06:28, T. V. Siva Kumar tvsivaku...@gmail.com wrote:

 Deal All,
 Is there a way to get the string representation of QueryAtomContainer,
 similar to SmilesGenerator?

 Thank you in advance.


 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Cdk-user mailing list
 Cdk-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/cdk-user


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] puzzles about how to compare two molecules to check whether they are the same in cdk

2015-07-06 Thread John M
Hi,

The CDK has always been intended as a toolbox (Lego like) rather than an
application. There are a couple of reasons for this but primarily there
isn't always a single or best way to accomplish a particular task. If you
would like such functionality I believe workflow tools (Knime-CDK) offer a
good compromise.

You mention compare two molecule(s), do you really mean compare (this is
pretty hard) or do you just mean tell if two molecules are equal given some
constraints. There are a few ways you could to do this, which is best
depends on the dataset of the data and what you consider equal (e.g. are
two conformers equal?).
  a) Generate canonical form (SMILES,InChI). Sort. Merge.




Regards,
John W May
john.wilkinson...@gmail.com

On 4 July 2015 at 22:05, Zheng Shi zs...@ualberta.ca wrote:

 Hi,

 I just wonder whether there are any functions in cdk that could be used to
 compare two molecule. Suppose I have two sdf files, I want to check whether
 one molecule in the first file is the same as the other molecule in the
 second file. Are there any functions in cdk that can achieve this? Or other
 chemical library can do? Thanks.


 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Cdk-user mailing list
 Cdk-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/cdk-user


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] puzzles about how to compare two molecules to check whether they are the same in cdk

2015-07-07 Thread John M
 So is there a reasonable way to do that? can we just generate canonical
form for molecules (like SMILES, then compare the SMILES)? Is it reasonable
for this? Or other methods? Thanks.

Yep Unique SMILES (canon,no stereo), Absolute SMILES (canon,with stereo) or
InChI should do what you need.

J

Regards,
John W May
john.wilkinson...@gmail.com

On 6 July 2015 at 22:16, Zheng Shi zs...@ualberta.ca wrote:

 The compare means to tell if two molecules are equal. Suppose I have a
 molecule B, which is generated by molecule A during a reaction: A - B, and
 I get a molecule C, which is also generated by molecule A during a
 reaction: A-C. I want to tell whether B and C are the same. Usually we can
 visualize the structure of the two structures to see. But if the number of
 molecules is too big, for example, two sdf files contain some molecules,
 then it's not convenient to visualize manually. So is there a reasonable
 way to do that? can we just generate canonical form for molecules (like
 SMILES, then compare the SMILES)? Is it reasonable for this? Or other
 methods? Thanks.

 On Mon, Jul 6, 2015 at 3:17 AM, John M john.wilkinson...@gmail.com
 wrote:

 Hit send too soon... ​

  b) Generate hash codes (CDK/InChIKey)
  c) Graph-Isomorphism check.

 Normally the best approach is (a) but this might not be the
 equality/comparison you want?

 John


 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Cdk-user mailing list
 Cdk-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/cdk-user



--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] [cdk:bugs] Re: #1368 Error identifying aromatic bonds in fused rings

2015-08-07 Thread John M
I'm still unsure on this but I believe it is correct. Consider biphenyl - a
bond between aromatic atoms is not always aromatic. We could perhaps say
then a bond between aromatic atoms that is in a ring is aromatic but then
consider biphenylene?

In your example it is the outer envelope ring that is aromatic and that
fused bond is always single. Another example is azulene. I'm send also to
the mailing list as this probably needs some discussion.

John
​
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] IChemObjectListener

2015-08-06 Thread John M
On 6 August 2015 at 17:36, Edmund Duesbury lip1...@sheffield.ac.uk wrote:

 it's an iterator having an addition/removal somewhere


Not a thread collision. Do you have your calculateImplicitHydrogens method.
Also note implicit H on a query atom is currently superfluous unless you
use it your self.

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] [cdk:bugs] Re: #1368 Error identifying aromatic bonds in fused rings

2015-08-07 Thread John M
Just to put everyone on the same page the issue is when to mark a bond
between two aromatic atoms as aromatic? Consider the following where the
fused bond is always single and not in an aromatic ring (only the outer
ring is 4n+2).
[image: Inline images 1][image: Inline images 2]
[image: Inline images 3]

Regards,
John W May
john.wilkinson...@gmail.com

On 7 August 2015 at 10:01, John M john.wilkinson...@gmail.com wrote:

 I'm still unsure on this but I believe it is correct. Consider biphenyl -
 a bond between aromatic atoms is not always aromatic. We could perhaps say
 then a bond between aromatic atoms that is in a ring is aromatic but then
 consider biphenylene?

 In your example it is the outer envelope ring that is aromatic and that
 fused bond is always single. Another example is azulene. I'm send also to
 the mailing list as this probably needs some discussion.

 John
 ​

--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] IChemObjectListener

2015-08-06 Thread John M
 Though the code you've quoted is the part that's causing the bug.

Can you provide the full stack place please.
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] problems with calculating partial charge with cdk

2015-07-13 Thread John M
Sorry meant to be on-list. Have you got the contents of examples.sdf,
specifically the one that causes the problem?

Not all atoms are represented by MMFF94 (of note is boron - OpenEye have
added support) - if the molecule has an atom not typed (by MMFF94) the
method will fail. However, there are known problems with the current MMFF
in CDK, in particular atom typing is bad. I've reimplemented the atom
types using SMARTS and tested on the CCL validation
http://www.ccl.net/cca/data/MMFF94/ but have not integrated these in to
the partial charge descriptor yet. It is on my list of things to fix.

Regards,
John W May
john.wilkinson...@gmail.com

On 13 July 2015 at 22:28, John M john.wilkinson...@gmail.com wrote:

 Do you have a molecule it fails for?

 John

 Regards,
 John W May
 john.wilkinson...@gmail.com

 On 13 July 2015 at 21:21, Zheng Shi zs...@ualberta.ca wrote:

 Hi,

 I'm calculating partial charge with cdk using the code below. But for
 some molecule, it throws some exceptions. I don't know what goes wrong. Can
 anyone help? A example molecule is attached. Thanks.
 String path = example.sdf;
 IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance();
 IteratingSDFReader sdfr = new IteratingSDFReader(new FileReader(path),
 bldr);
 while (sdfr.hasNext())
 {
 IAtomContainer mol= sdfr.next();
  PartialTChargeMMFF94Descriptor ptc= new
 PartialTChargeMMFF94Descriptor();
 PiElectronegativityDescriptor pen=new  PiElectronegativityDescriptor();
 SigmaElectronegativityDescriptor sen=new
 SigmaElectronegativityDescriptor();
  DescriptorValue pt=ptc.calculate(a, mol);
 IDescriptorResult  v_1=pt.getValue();
 DescriptorValue pe=pen.calculate(a, mol);
 IDescriptorResult  v_2=pe.getValue();
 DescriptorValue se=sen.calculate(a, mol);

 IDescriptorResult  v_3=se.getValue();
 }



 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Cdk-user mailing list
 Cdk-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/cdk-user



--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] CDK Depict

2015-10-24 Thread John M
Hi All,

I've wanted a write depict service for a while (note we already have
https://apps.ideaconsult.net/ambit2/depict which I now see is updated to
the new renderers).  More so since the Daylight one is now dead.

Anyways, just deployed one to OpenShift running the latest CDK SnapShot
with some improvements to layout:
http://cdkdepict-openchem.rhcloud.com/depict.html

Are there any objections to distributing source/war via github
('/cdk/depict') as an app people can deploy locally?

Note - Using the free level of OpenShift so it's a bit underpowered (the
default CHEMBL one comes back instantly on local host :().

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] CDK Depict

2015-10-25 Thread John M
Pushed - https://github.com/cdk/depict

Regards,
John W May
john.wilkinson...@gmail.com

On 25 October 2015 at 16:04, Egon Willighagen 
wrote:

> On Sun, Oct 25, 2015 at 5:02 PM, John May 
> wrote:
> > GitHub can attach binaries to releases, we do it already:
> > https://github.com/cdk/cdk/releases/tag/cdk-1.5.11. Given the whole
> > SourceForge Gimp fiasco I’m wary of using it.
>
> Oh, nice! I seem to have missed/overlooked that... yeah, well, go for it!
>
> Egon
>
> --
> E.L. Willighagen
> Department of Bioinformatics - BiGCaT
> Maastricht University (http://www.bigcat.unimaas.nl/)
> Homepage: http://egonw.github.com/
> LinkedIn: http://se.linkedin.com/in/egonw
> Blog: http://chem-bla-ics.blogspot.com/
> PubList: http://www.citeulike.org/user/egonw/tag/papers
> ORCID: -0001-7542-0286
> ImpactStory: https://impactstory.org/EgonWillighagen
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] no aromaticity detected for compound O=s1cncc1

2015-11-10 Thread John M
Okay cool, yeah you can't avoid aromaticity with SMARTS :-). Yep Daylight
method is correct in this case. Still need to back port Ambit SMIRKs at
some point.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 10 November 2015 at 15:17, Martin Gütlein <guetl...@posteo.de> wrote:

> Hi John,
>
> thanks for the patch.
>
> > I should also disclaim that I don't think the concept is in general
> useful, may I ask why you need it?
>
> You mean the daylight aromaticity concept?
> We are migrating a pathway prediction system from chemaxon to cdk +
> ambit-smarts. Chemaxon had apparently a similar aromaticity concept as
> daylight, and the reaction rules have been defined accordingly. Some cannot
> be applied when using the standard cdk aromaticity.
>
> Regards,
> Martin
>
>
>
>
>
>
> Am 10.11.2015 um 16:12 schrieb John M:
>
> Forwarding to list.
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 10 November 2015 at 15:04, John M <john.wilkinson...@gmail.com> wrote:
>
>> Patch: https://github.com/cdk/cdk/pull/172
>>
>> There is no default, you need to decide what's best. I'll admit the
>> naming 'cdkAromaticSet()' makes it sound useful for aromaticity but it
>> was basically just a restricted set of cycles used in the old aromaticity
>> model.
>>
>> I tend to used *Cycles.all()* or *Cycles.or(Cycles.all(),
>> Cycles.edgeShort())* since the first one will fail for ring systems
>> like Fullerene C60. Some might think SSSR is sensible but then in Fullerene
>> C60, you'll have one ring in fullerene C60 which isn't aromatic. Another
>> common approach is to restrict the size of the cycle (ala Open Babel) but
>> it's easy to quickly find examples with large aromatic rings.
>>
>> I should also disclaim that I don't think the concept is in general
>> useful, may I ask why you need it?
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 10 November 2015 at 14:54, Martin Gütlein < <guetl...@posteo.de>
>> guetl...@posteo.de> wrote:
>>
>>> Hi John,
>>>
>>> thanks for your response, so you will commit a fix for that? That would
>>> be great, I would merge that fix into our cdk 1.5.11 build...
>>>
>>> > Also you shouldn't use cdkAromaticSet() cycles...
>>> So whats the default, .all() ?
>>>
>>> Kind regards,
>>> Martin
>>>
>>>
>>> Am 10.11.2015 um 15:45 schrieb John M:
>>>
>>> Hi Martin,
>>>
>>> The daylight model should... but I some point I added a valence
>>> constraint (
>>> https://github.com/cdk/cdk/blob/master/base/standard/src/main/java/org/openscience/cdk/aromaticity/DaylightModel.java#L277).
>>> Simple fix so will allow 4 and 6 for S and Se.
>>>
>>> Also you shouldn't use cdkAromaticSet() cycles... that's there for
>>> legacy reasons and doesn't handle porphyrin correctly (for example).
>>>
>>> John
>>>
>>> Regards,
>>> John W May
>>> john.wilkinson...@gmail.com
>>>
>>> On 10 November 2015 at 08:33, Martin Gütlein < <guetl...@posteo.de>
>>> guetl...@posteo.de> wrote:
>>>
>>>> Hi,
>>>>
>>>> is there an aromaticity model in CDK that works for this structure:
>>>> O=s1cncc1 ?
>>>>
>>>> This is what I tried:
>>>>  String smiles = "O=s1cncc1";
>>>>  IAtomContainer mol = new
>>>> SmilesParser(SilentChemObjectBuilder.getInstance()).parseSmiles(smiles);
>>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
>>>>  CycleFinder cycles = Cycles.cdkAromaticSet();
>>>>  ElectronDonation model = ElectronDonation.cdk(); //.daylight()
>>>>  Aromaticity aromaticity = new Aromaticity(model, cycles);
>>>>  System.out.println("is-aromatic: " + aromaticity.apply(mol));
>>>>
>>>> Kind regards,
>>>> Martin
>>>>
>>>>
>>>>
>>>> --
>>>> ___
>>>> Cdk-user mailing list
>>>> Cdk-user@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>>
>>>
>>>
>>>
>>
>
>
> --
>
>
>
> ___
> Cdk-user mailing 
> listCdk-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
> --
> Dr. Martin Gütlein
> Phone:+49 (0)6131 39 23336 (office)+49 (0)177 623 9499 (mobile)
> Email:guetl...@uni-mainz.de
>
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] retain unfilled valences

2015-11-10 Thread John M
Simple, don't change the molecule :-). You only need atom types here to add
hydrogens and you don't need to add hydrogens they're there already when
read from SMILES.

String smiles = "C[N]C(=O)C(=O)C=O";
 IAtomContainer mol = new
SmilesParser(SilentChemObjectBuilder.getInstance()).parseSmiles(smiles);
AtomContainerManipulator.convertImplicitToExplicitHydrogens(mol);
 System.out.println(SmilesGenerator.generic().create(mol));
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Molecular Weight

2015-11-03 Thread John M
Hi All,

Looking around the manipulators is it correct in saying we don't currently
have a method to get correct (based on my understanding) molecular weight?

My understanding of MW is, if the isotope isn't defined (e.g. null in our
case) use the natural mass, however if it is explicitly defined then use
that exact mass. Essentially

getNautralExactMass("[13CH2]CO") > getNautralExactMass("CCO")


The two closest methods seem to be getNaturalExactMass but it will always
use the natural mass, hence

getNautralExactMass("[13CH2]CO") == getNautralExactMass("CCO")
>

Is that correct?

Cheers,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Molecular Weight

2015-11-03 Thread John M
On 3 November 2015 at 12:53, John M <john.wilkinson...@gmail.com> wrote:

> two closest methods


Sorry just to clarify there is one implement on the
AtomContainerManipulator and one on the MolecularFormulaManipulator.

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Fingerprints in 1.4 und 1.5

2015-11-04 Thread John M
Hi Till,

Have you found one?

Nothing immediately jumps out from recent history -
https://github.com/cdk/cdk/blob/master/base/standard/src/main/java/org/openscience/cdk/fingerprint/Fingerprinter.java
Further history I see count fingerprints introduced but that shouldn't
change the bits -
https://github.com/cdk/cdk/commits/1a30dfbbd6b114f0f9e9f54c526ddcd6c92cb804/src/main/org/openscience/cdk/fingerprint/Fingerprinter.java

However if you're relying on the bits matching exactly based on a previous
calculation I would recalculate to be sure.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 4 November 2015 at 13:09, Egon Willighagen 
wrote:

> Dear Till,
>
> neither. The default (oldest) CDK fingerprint is like the Daylight
> fingerprint (using the same approach), but is not meant to be
> identical.
>
> Grtz,
>
> Egon
>
> On Wed, Nov 4, 2015 at 2:05 PM, Till Schäfer
>  wrote:
> > Hi,
> > i would like to know if the daylight fingerprint should be identical for
> the latest CDK 1.4 and the latest CDK 1.5. Are there any changes, that
> cause another ordering of the features, or some feature to be detected
> differently?
> >
> > Regards,
> > Till
> >
> > --
> > Dipl.-Inf. Till Schäfer
> > TU Dortmund University
> > Chair 11 - Algorithm Engineering
> > Otto-Hahn-Str. 14 / Room 237
> > 44227 Dortmund, Germany
> >
> > e-mail: till.schae...@cs.tu-dortmund.de
> > phone: +49(231)755-7706
> > fax: +49(231)755-7740
> > web: http://ls11-www.cs.uni-dortmund.de/staff/schaefer
> > pgp:
> https://keyserver2.pgp.com/vkd/SubmitSearch.event?&=0xD84DED79
> >
> >
> --
> > ___
> > Cdk-user mailing list
> > Cdk-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
>
> --
> E.L. Willighagen
> Department of Bioinformatics - BiGCaT
> Maastricht University (http://www.bigcat.unimaas.nl/)
> Homepage: http://egonw.github.com/
> LinkedIn: http://se.linkedin.com/in/egonw
> Blog: http://chem-bla-ics.blogspot.com/
> PubList: http://www.citeulike.org/user/egonw/tag/papers
> ORCID: -0001-7542-0286
> ImpactStory: https://impactstory.org/EgonWillighagen
>
>
> --
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] puzzles about how to compare two molecules to check whether they are the same in cdk

2015-07-08 Thread John M
Just a note on this - in CDK 1.5 the Pattern class is preferred as the
universal isomorphism tester is actually doing MCS (much harder).

Pattern ptrn = Pattern.findIdentical(butane);
for (Mol m : mols)
   ptrn.matches(m);

In general though this is the slowest way to do it (n^2) vs (n log n) with
InChI/SMILES.


Regards,
John W May
john.wilkinson...@gmail.com

On 8 July 2015 at 00:03, Egon Willighagen egon.willigha...@gmail.com
wrote:

 Dear Zheng Shi,

 I think what you are looking for is isomorphism checking. If the
 chemical graph of two structures is the same, they are called
 isomorphic. The following Groovy code shows a very basic example:

 butane = MoleculeFactory.makeAlkane(4);
 isomorphismTester = new UniversalIsomorphismTester()
 println Is isomorphic:  +
   isomorphismTester.isIsomorph(
 butane, butane
   )

 But that can also indeed be done with canonical SMILES or InChI, as
 indicated by John.

 Egon

 On Mon, Jul 6, 2015 at 11:16 PM, Zheng Shi zs...@ualberta.ca wrote:
  The compare means to tell if two molecules are equal. Suppose I have a
  molecule B, which is generated by molecule A during a reaction: A - B,
 and
  I get a molecule C, which is also generated by molecule A during a
 reaction:
  A-C. I want to tell whether B and C are the same. Usually we can
 visualize
  the structure of the two structures to see. But if the number of
 molecules
  is too big, for example, two sdf files contain some molecules, then it's
 not
  convenient to visualize manually. So is there a reasonable way to do
 that?
  can we just generate canonical form for molecules (like SMILES, then
 compare
  the SMILES)? Is it reasonable for this? Or other methods? Thanks.
 
  On Mon, Jul 6, 2015 at 3:17 AM, John M john.wilkinson...@gmail.com
 wrote:
 
  Hit send too soon...
 
   b) Generate hash codes (CDK/InChIKey)
   c) Graph-Isomorphism check.
 
  Normally the best approach is (a) but this might not be the
  equality/comparison you want?
 
  John
 
 
 
 --
  Don't Limit Your Business. Reach for the Cloud.
  GigeNET's Cloud Solutions provide you with the tools and support that
  you need to offload your IT needs and focus on growing your business.
  Configured For All Businesses. Start Your Cloud Today.
  https://www.gigenetcloud.com/
  ___
  Cdk-user mailing list
  Cdk-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/cdk-user
 
 
 
 
 --
  Don't Limit Your Business. Reach for the Cloud.
  GigeNET's Cloud Solutions provide you with the tools and support that
  you need to offload your IT needs and focus on growing your business.
  Configured For All Businesses. Start Your Cloud Today.
  https://www.gigenetcloud.com/
  ___
  Cdk-user mailing list
  Cdk-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/cdk-user
 



 --
 E.L. Willighagen
 Department of Bioinformatics - BiGCaT
 Maastricht University (http://www.bigcat.unimaas.nl/)
 Homepage: http://egonw.github.com/
 LinkedIn: http://se.linkedin.com/in/egonw
 Blog: http://chem-bla-ics.blogspot.com/
 PubList: http://www.citeulike.org/user/egonw/tag/papers
 ORCID: -0001-7542-0286
 ImpactStory: https://impactstory.org/EgonWillighagen

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] puzzles about how to compare two molecules to check whether they are the same in cdk

2015-07-08 Thread John M
Hi John,

If the reader produces and IQueryAtomContainer IQueryAtoms/IQueryBonds then
it's simply a matter of passing it into the Pattern class (of UIT). This
will do a test of the query against real molecules - if you want to check
if one query equals another that's more tricky (I think RDKit has this
ability).

Pattern ptrn = Pattern.findIdentical(mdlQuery); // of
Pattern.findSubstructure(mdlQuery).
for (Mol m : mols)
   ptrn.matches(m);

Unfortunately it doesn't look like either V2000/V3000 load this information
and is only available via SMARTS. It should be too hard to add basic
support (atom lists etc) but I know V3000 gets crazy with sphere/distance
exclusions etc.
--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] inchi conversion changes compound

2015-09-02 Thread John M
Just to add on - if you really want to use InChI (don't) then you could
store the AuxInfo but the CDK doesn't have a conversion method that accepts
it when turning it back into an AtomContainer.

I also notice you're using unique SMILES (default by old APIs), you
probably want isomeric that a non-canonical but store stereochemistry.

IAtomContainer mol = SmilesGenerator.isomeric().create(container);

John

Regards,
John W May
john.wilkinson...@gmail.com

On 2 September 2015 at 19:54, John M <john.wilkinson...@gmail.com> wrote:

> Hi Martin,
>
> The InChI is an identifier and not a structure representation it should
> never be used as such. For maximum preservation you should store compounds
> as Kekulé SMILES or Molfile. You can store additional data such as
> coordinates supplementary to the SMILES.
>
> You might find a recent presentation by Noel (O Babel) and Rajarshi (CDK)
> useful:
>
> http://baoilleach.blogspot.co.uk/2015/08/the-whole-of-cheminformatics-best.html
>
> John
>
>
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] inchi conversion changes compound

2015-09-03 Thread John M
Cool - the absolute actually calls out to InChI which is a bit of pain.
Patch it future will update to be all Java though.

J

Regards,
John W May
john.wilkinson...@gmail.com

On 3 September 2015 at 11:42, Martin Gütlein <guetl...@posteo.de> wrote:

> Sorry my fault. The SmilesGenerator removed the stereochemistry. Just
> noticed that I have to use .absolute() instead of .unique()
>
>
> Am 03.09.2015 um 12:36 schrieb Martin Gütlein:
>
> Hi John,
>
> Awesome, thanks. SuppressHydrogens works good, but it suppresses Hs with
> stereochem-information as well. Can this be avoided?
>
> > although possible you should perhaps store and index (unique check) you
> structures separately.
>
> Thats what we try to not do, if possible.
>
> Martin
>
>
> Am 03.09.2015 um 11:32 schrieb John M:
>
> Hi Martin,
>
> By design CDK separates out standardisation (H rep, tautomers,
> protonation) from canonicalisation (ordering). You've found the method to
> "sprout" hydrogens but you actually want the opposite -
> suppressHydrogens(mol)
> <http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/tools/manipulator/AtomContainerManipulator.html#suppressHydrogens%28org.openscience.cdk.interfaces.IAtomContainer%29>
> .
>
> I think you might be conflating two things, although possible you should
> perhaps store and index (unique check) you structures separately. For your
> example you could assign a unique tautomer but you'll be back at square one
> with your first example.
>
> O=C[CH]1Cc2[nH]cnc2CC1 -> 1,3 proton shift -> C(=O)[CH]1Cc2c(CC1)[nH]cn2
> CC(=O)N -> 1,3 proton shift -> CC(O)=N
>
> Thanks,
>
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 3 September 2015 at 09:27, Martin Gütlein <guetl...@uni-mainz.de>
> wrote:
>
>> One more thing:
>> I noticed that unique SMILES differentiate explicit and implicit
>> Hydrogens, e.g. "[H]Cl" is different form "Cl". This can be solved by
>> running AtomContainerManipulator.convertImplicitToExplicitHydrogens(mol).
>> However, I do not like having my all Hs defined explicitly. Is there an
>> option in the CDK to convert explict Hs back to implicit, leaving only
>> thoses Hs as explict that are relevant?
>>
>> Martin
>>
>>
>> Am 03.09.2015 um 09:48 schrieb Martin Gütlein:
>>
>> Hi John,
>>
>> thanks for your reply, I tried to use unique (kekulized) SMILES instead
>> of InChIs.
>> Whats good is that the structure for (most) compounds is stored correctly
>> (i.e., I can create an IAtomContainer that is apparently equal).
>>
>> However, I found an example were the unique SMILES of two identical
>> structures is different (see below).
>>
>> Kind regards,
>> Martin
>>
>>
>> for (String smi : new String[] { "O=C[CH]1Cc2[nH]cnc2CC1",
>> "C(=O)[CH]1Cc2c(CC1)[nH]cn2" })
>> {
>> IAtomContainer mol = new
>> SmilesParser(SilentChemObjectBuilder.getInstance()).parseSmiles(smi);
>> System.out.println(SmilesGenerator.unique().create(mol));
>> }
>>
>>
>>
>>
>>
>>
>> Am 02.09.2015 um 20:58 schrieb John M:
>>
>> Just to add on - if you really want to use InChI (don't) then you could
>> store the AuxInfo but the CDK doesn't have a conversion method that accepts
>> it when turning it back into an AtomContainer.
>>
>> I also notice you're using unique SMILES (default by old APIs), you
>> probably want isomeric that a non-canonical but store stereochemistry.
>>
>> IAtomContainer mol = SmilesGenerator.isomeric().create(container);
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 2 September 2015 at 19:54, John M < <john.wilkinson...@gmail.com>
>> john.wilkinson...@gmail.com> wrote:
>>
>>> Hi Martin,
>>>
>>> The InChI is an identifier and not a structure representation it should
>>> never be used as such. For maximum preservation you should store compounds
>>> as Kekulé SMILES or Molfile. You can store additional data such as
>>> coordinates supplementary to the SMILES.
>>>
>>> You might find a recent presentation by Noel (O Babel) and Rajarshi
>>> (CDK) useful:
>>>
>>> <http://baoilleach.blogspot.co.uk/2015/08/the-whole-of-cheminformatics-best.html>
>>> http://baoilleach.blogspot.co.uk/2015/08/the-whole-of-cheminformatics-best.html
>>>
>>> John
>>>
>

Re: [Cdk-user] Molecule Validation

2015-09-21 Thread John M
Hi,

One approach would be to try and assign atom types and check for null.. or
it might even throw an exception.

AtomContainerManipulator.perceiveAndConfigureAtomTypes(mol); // or
something similar

The atom types are finite opposed to empirical rules so might be too strict
depending on your use case.

Regards,
John W May
john.wilkinson...@gmail.com

On 21 September 2015 at 10:20, Schmid Emanuel (ID SIS) <
emanuel.sch...@id.ethz.ch> wrote:

> Hi
>
>
>
> Is there a way to detect implausibility of molecules in general but in
> particular about valence errors:
>
>
>
> E.g. the SMILES string "[CH4]=O" can of course be parsed to a formally
> correct molecule, but it obviously has a valence error on the C atom.
>
> First, I thought the *org.openscience.cdk.validate.ValidatorEngine* is
> the instrument of choice, but either I'm using it wrongly or it is not in
> the least concerned about such a molecule.
>
> But after all, for "[O-3]" it works as expected, I'm getting a Warning
> "Atom O has charge -3" from the BasicValidator.
>
>
>
> I'm running this kind of code:
>
>
>
> *import* org.openscience.cdk.exception.InvalidSmilesException;
>
> *import* org.openscience.cdk.interfaces.IAtomContainer;
>
> *import* org.openscience.cdk.silent.SilentChemObjectBuilder;
>
> *import* org.openscience.cdk.smiles.SmilesParser;
>
> *import* org.openscience.cdk.validate.BasicValidator;
>
> *import* org.openscience.cdk.validate.ValidationReport;
>
> *import* org.openscience.cdk.validate.ValidationTest;
>
> *import* org.openscience.cdk.validate.ValidatorEngine;
>
>
>
> *public* *class* Snippet {
>
>
>
> *private* *static* *boolean* validate(IAtomContainer molecule) {
>
> ValidatorEngine validatorEngine = *new* ValidatorEngine();
>
> validatorEngine.addValidator(*new* BasicValidator());
>
> ValidationReport report =
> validatorEngine.validateMolecule(molecule);
>
> *for* (ValidationTest error : report.getErrors()){
>
> System.*err*.println(error.getDetails());
>
> }
>
> *for* (ValidationTest cdkerror : report.getCDKErrors()){
>
> System.*err*.println(cdkerror.getDetails());
>
> }
>
> *for* (ValidationTest warning : report.getWarnings()){
>
> System.*err*.println(warning.getDetails());
>
> }
>
> *return* report.getCount() == report.getOKCount();
>
> }
>
> *public* *static* *void* main(String[] args) *throws*
> InvalidSmilesException {
>
> SmilesParser sp  = *new* SmilesParser(SilentChemObjectBuilder.
> *getInstance*());
>
> System.*out*.println("[O-3] is valid: "+*validate*(sp.parseSmiles(
> "[O-3]")));
>
> System.*out*.println("[CH4]=O is valid: "+*validate*
> (sp.parseSmiles("[CH4]=O")));
>
> }
>
> }
>
>
>
> and I'm getting this kind of output:
>
>
>
> Atom O has charge -3
>
> [O-3] is valid: false
>
> [CH4]=O is valid: true
>
>
>
>
>
> Can you give me guidance?
>
>
>
> Many thanks and greetings,
>
> Emanuel
>
>
> --
>
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Preserving public API

2015-12-31 Thread John M
Hi all,

Wanted a quick poll of thoughts on API changes. CDK does/has gone with the
linux kernal style versioning (which they actually dropped in 2003) on odd
numbers for unstable (dev version) and even numbers for stable (e.g.
1.4.x=stable,1.5.x=unstable).

I've been making an effort in 1.5.x to keep the API as stable as possible
and pushing towards a more continuous release cycle. Having been on the
receiving end of changes (such as the removal of IMolecule) I know it's no
fun to try and keep up.

Given previous design decisions, foresight, or dependency management API
changes are sometimes needed. If possible we make a change that is backward
compatible, for example, the default constructor of SMILESGenerator still
works and mimics 1.4.x but is probably not what you want (canon
no-stereochemistry). Other times a change will need to be destructive in
which case I would prefer a new class/API written and the old one
deprecated (but still make it available).

Is the approach of adding new API and deprecate the old sound acceptable?
Or are public API changes acceptable?

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] canonical chiral smiles with free electron pair

2015-11-26 Thread John M
>
> I have to imagine the electron pair between the "@" and the "]", right?


Yep that's correct.

It's technically an extension but is widely supported at least by CDK, Open
Babel, ChemAxon, ChemDraw, OpenEye, CACTVS. It looks RDKit doesn't support
it, not Indigo (at least in the version I have deployed).

[image: Inline images 1]
--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] canonical chiral smiles with free electron pair

2015-11-26 Thread John M
Hmm, actually from that screenshot it looks like Indigo supports @@ but not
@...

CCC[S@](C)=O
CCC[S@@](C)=O

Regards,
John W May
john.wilkinson...@gmail.com

On 26 November 2015 at 18:14, John M <john.wilkinson...@gmail.com> wrote:

> I have to imagine the electron pair between the "@" and the "]", right?
>
>
> Yep that's correct.
>
> It's technically an extension but is widely supported at least by CDK,
> Open Babel, ChemAxon, ChemDraw, OpenEye, CACTVS. It looks RDKit doesn't
> support it, not Indigo (at least in the version I have deployed).
>
> [image: Inline images 1]
>
--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] CDK Release 1.5.12

2015-11-28 Thread John M
Hi all,

CDK 1.5.12 is now available -
https://github.com/cdk/cdk/wiki/1.5.12-Release-Notes.

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] absolute smiles error?

2015-11-20 Thread John M
Nice molecules BTW - have added them to my depiction benchmark.
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] canonical chiral smiles with free electron pair

2015-11-24 Thread John M
Hi,

I'm not entirely sure what the question was but -

The lone-pair is treated like an implicit hydrogen and is placed where the
central atom is. In the internal representation this means one of the
neighbours will also be the central atom.

For example in (your email client might cut the tail off with this inline
image):
[image: Inline images 1]

We have
central atom: 7
neighbours: {6, 7, 8, 9 } // note 7 appears in the neighbour list
winding: clockwise

The winding is looking from 6 towards {7,8,9}.

Try these in http://cdkdepict-openchem.rhcloud.com/depict.html:

Cc1cnc(C[S@@](=O)c2[nH]c3ccc(cc3n2)OC)c(C)c1OC
> Cc1cnc(C[S@](=O)c2[nH]c3ccc(cc3n2)OC)c(C)c1OC

Cc1cnc(C[C@@H](O)c2[nH]c3ccc(cc3n2)OC)c(C)c1OC
> Cc1cnc(C[C@H](O)c2[nH]c3ccc(cc3n2)OC)c(C)c1OC


PS, you don't need this for your code if you ditch the CDK aromaticity:

// prepare atom types
> try {
>
> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
> } catch (CDKException e) {
> e.printStackTrace();
> }
>
> // add implicit hydrogens
> try {
>
> CDKHydrogenAdder.getInstance(mol.getBuilder()).addImplicitHydrogens(mol);
> } catch (CDKException e) {
> e.printStackTrace();
> }


Then you can use this -

new Aromaticity(ElectronDonation.daylight(), Cycles.or(Cycles.all(),
> Cycles.edgeShort()));


Regards,
John W May
john.wilkinson...@gmail.com

On 24 November 2015 at 08:34, Lina Humbeck 
wrote:

> Hi all,
>
>
> we used the attached java code utilizing CDK 1.5. to create a canonical
> chiral smiles from the input which was the attached Esomeprazol.sdf. The
> result is:
> Cc1cnc(C[S@@](=O)c2[nH]c3ccc(cc3n2)OC)c(C)c1OC
> To determine an explicit chirality from the smiles you need the four
> different substituents of the sulfur atom. Therefore, we miss the
> explicit representation of the free electron pair of sulfur. I have no
> representation of electron pairs in smiles in mind. Is there a rule
> where the free electron pair implicitly is placed? Such as for example:
> The free electron pair is always implicitly placed as first or last
> substituent of the chiral atom?
>
> Best regards,
>
> Lina
>
>
> --
> Dipl.-Pharm.
> Lina Humbeck
>
> TU Dortmund University
> Faculty of Chemistry and Chemical Biology
> Otto-Hahn-Str. 6
> D-44227 Dortmund
>
> Phone: +49 231-755 47 13
> lina.humb...@tu-dortmund.de
> www.ccb.tu-dortmund.de
>
>
> --
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Structure 2D Layout: generateExperimentalCoordinates

2016-06-05 Thread John M
Hi All,

Just making some more patches to the 2D layout, and I am tempted to
deprecate the method: 'generateExperimentalCoordinates'.

Essentially this method first deletes hydrogens, lays out the rest of the
structure then adds them back in with a specialised HydrogenPlacer. Anyone
know the history of this? The other method 'generateCoordinates' handles
hydrogens just fine and if we wanted to special case this, I'd do it for
all terminal atoms, not just hydrogens. I can see there my a minor
performance boost, but that's probably negated by copies/deletions (N^2)
being done.

Does anyone use this method (generateExperimentalCoordinates) over the
other one (generateCoordinates), and if so why?

Regards,
John W May
john.wilkinson...@gmail.com
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - changing Visibility properties

2016-06-06 Thread John M
It's somewhat of a moving target. The JavaDoc is the best place to look:
http://cdk.github.io/cdk/1.5/docs/api/index.html. Many of newer methods
have small examples of how to use them (e.g. VentoFoggia
<http://cdk.github.io/cdk/1.5/docs/api/index.html?org/openscience/cdk/isomorphism/VentoFoggia.html>
).

We're always happy with doc contributions.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 6 June 2016 at 07:05, Nikita Kozhukhov <nikita_kozhuk...@epam.com> wrote:

> Hi John,
>
>
> Thank you for the quick response, it has solved my problem.
>
>
> CDK is a really great tool, but I was having hard time trying to find
> working examples and relevant documentation.
>
> It would be great if someone could update github readme​
> <https://github.com/cdk/cdk> as it contains outdated examples and
> tutorials.
>
>
> Yours sincerely,
>
> Nikita
> --
> *От:* John M <john.wilkinson...@gmail.com>
> *Отправлено:* 3 июня 2016 г. 20:29
> *Кому:* Nikita Kozhukhov
> *Тема:* Re: [Cdk-user] DepictionGenerator - changing Visibility properties
>
> Hi Nikita,
>
> This is a common requirement and has a specialised method.
>
> DepictionGenerator dg = new DepictionGenerator();
>> dg = dg.withTerminalCarbons();
>
>
> As a side note you can still set params explicitly as you would with old
> RenderModel:
>
>
>> DepictionGenerator dg = new DepictionGenerator();
>> dg = dg.withParam(Visibility..., etc..);
>
>
> Hope that helps,
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 3 June 2016 at 17:43, Nikita Kozhukhov <nikita_kozhuk...@epam.com>
> wrote:
>
>> Hi,
>>
>>
>> Could someone provide an example of changing default properties of
>> DepictionGenerator, please? Is it really possible in 1.5.13 version of cdk?
>>
>>
>> Here is a a description of the problem I'm trying to solve.
>>
>> I created an atom container from SMILES string "[H][C@]1(C[C@]2([H])CC[C@
>> ]([H])(C1)N2C)OC(c1c1)c1c1"​.
>>
>>
>> Then I created an instance of DepictionGenerator:
>> DepictionGenerator generator = new DepictionGenerator(font);
>>
>> And finally created "depiction":
>> Depiction depiction = generator.depict(atomContainer);
>>
>> With this approach after serialization to .png or .svg, I see molecule
>> without CH3 group, which is, I guess, due to default setting
>> of SymbolVisibility.iupacRecommendationsWithoutTerminalCarbon().
>> I'd like to use SymbolVisibility.iupacRecommendations(), but it is not
>> currently possible with DepictionGenerator because of the reasons described
>> in this thread:
>> https://sourceforge.net/p/cdk/mailman/message/34796852/
>>
>> I found a workaround by using AtomContainerRenderer, but in this case I
>> don't know how to autoscale the resulting image.
>>
>> Yours sincerely,
>> Nikita
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> What NetFlow Analyzer can do for you? Monitors network bandwidth and
>> traffic
>> patterns at an interface-level. Reveals which users, apps, and protocols
>> are
>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>> J-Flow, sFlow and other flows. Make informed decisions using capacity
>> planning reports.
>> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>>
>
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Reading Mol2 format

2016-06-22 Thread John M
Or actually if the hydrogens are explicit in the input they are preserved.
Looking this up briefly looks to be the case.

Regards,
John W May
john.wilkinson...@gmail.com

On 22 June 2016 at 10:52, John M <john.wilkinson...@gmail.com> wrote:

> Hmm,
>
> That shouldn't be the case - if you use the ImplicitHydrogenAdder, this
> would only be if you then 'convertImplicitToExplicit'.
>
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 22 June 2016 at 10:41, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> The bit I didn't like was when I added the implicit hydrogens and then
>> exported to smiles then the smiles contains all those hydrogens (as
>> Explicit/Expanded/Sprouted in your terminology). So to me it looks like it
>> added explicit hydrogens.
>>
>> Tim
>>
>> On 22/06/2016 10:08, John M wrote:
>>
>> Sorry could be my bad wording, there are really three 'levels' of
>> hydrogens representation. This isn't that confusing but the terminology is
>> often misnamed in toolkits/formats. Even there where i said explicit I
>> should have said labelled or something similar:
>>
>> Implicit/Undefined -> defined by valence rules -> CCO
>> Labelled/Contracted/Suppressed -> explicitly stated in format ->
>> [CH3][CH2][OH]
>> Explicit/Expanded/Sprouted -> explicit nodes ->
>> C][H])([H])([H])C([H])([H])O[H]
>>
>> When CDK says 'ImplicitHydrogenAdder' it's not adding implicit hydrogens
>> per say but rather taken a molecule with some unknown hydrogen counts
>> (implicit) it sets the value of these explicitly. They are still contracted
>> on the parent atoms. You can take always expand these and make them
>> explicit nodes in the graph if so desired
>> (AtomContainerManipulator.convertImplicitHydrogensToExplicit) or something
>> similar. The reverse is 'suppressExplicitHydrogens', also for legacy reason
>> 'removeExplicitHydrogens' but doesn't actually remove them so the
>> 'suppress' name is preffered.
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 22 June 2016 at 09:55, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>>
>>> John
>>>
>>> Thanks for that. Adding implicit hydrogens does indeed resolve the
>>> problem.
>>> But does this mean that for formats like this you MUST add IMPLICIT
>>> hydrogens everywhere (there's no way for them to be explicit)? That's ugly!
>>>
>>> Tim
>>>
>>> On 21/06/2016 19:04, John M wrote:
>>>
>>> SMILES, InChI, Molfile have explicit valence models and thus their
>>> hydrogens are set automatically on read. For other formats you need to add
>>> them. The CDK doesn't do this by valence counting but rather through more
>>> expensive atom typing. Very clunky:
>>>
>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
>>> CDKHydrogenAdder.getInstance(mol.getBuilder()).addImplicitHydrogens(mol);
>>>
>>> If someone can point at the Tripos Mol2 valence model, am happy to add
>>> it. Should be easy right as they encode the atom types in the format?
>>>
>>> John
>>>
>>> Regards,
>>> John W May
>>> john.wilkinson...@gmail.com
>>>
>>> On 21 June 2016 at 17:22, Tim Dudgeon < <tdudgeon...@gmail.com>
>>> tdudgeon...@gmail.com> wrote:
>>>
>>>> I'm having difficulty reading Mol2 format files. Code is:
>>>>
>>>> def is = new FileInputStream("../../data/testfiles/ligand.mol2")
>>>> def reader = new Mol2Reader(is)
>>>> def file = reader.read(new ChemFile())
>>>> def mol = ChemFileManipulator.getAllAtomContainers(file).get(0)
>>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol)
>>>> def out = new ByteArrayOutputStream()
>>>> def writer = new SMILESWriter(out)
>>>> writer.writeAtomContainer(mol)
>>>> println new String(out.toByteArray())
>>>>
>>>> The file appears to be a valid mol2 format file, but when I try to
>>>> write it out as smiles it blows up with:
>>>>
>>>> java.lang.NullPointerException: One or more atoms had an undefined
>>>> number of implicit hydrogens
>>>> at
>>>> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
>>>> at org.openscience.cdk.smiles.CDKToBeam.toBeamAtom(CDKToBeam.java:195)
>>>> at org.openscience.cdk.smiles.CDKToBeam.toBea

Re: [Cdk-user] Reading Mol2 format

2016-06-22 Thread John M
Hmm,

That shouldn't be the case - if you use the ImplicitHydrogenAdder, this
would only be if you then 'convertImplicitToExplicit'.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 22 June 2016 at 10:41, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> The bit I didn't like was when I added the implicit hydrogens and then
> exported to smiles then the smiles contains all those hydrogens (as
> Explicit/Expanded/Sprouted in your terminology). So to me it looks like it
> added explicit hydrogens.
>
> Tim
>
> On 22/06/2016 10:08, John M wrote:
>
> Sorry could be my bad wording, there are really three 'levels' of
> hydrogens representation. This isn't that confusing but the terminology is
> often misnamed in toolkits/formats. Even there where i said explicit I
> should have said labelled or something similar:
>
> Implicit/Undefined -> defined by valence rules -> CCO
> Labelled/Contracted/Suppressed -> explicitly stated in format ->
> [CH3][CH2][OH]
> Explicit/Expanded/Sprouted -> explicit nodes ->
> C][H])([H])([H])C([H])([H])O[H]
>
> When CDK says 'ImplicitHydrogenAdder' it's not adding implicit hydrogens
> per say but rather taken a molecule with some unknown hydrogen counts
> (implicit) it sets the value of these explicitly. They are still contracted
> on the parent atoms. You can take always expand these and make them
> explicit nodes in the graph if so desired
> (AtomContainerManipulator.convertImplicitHydrogensToExplicit) or something
> similar. The reverse is 'suppressExplicitHydrogens', also for legacy reason
> 'removeExplicitHydrogens' but doesn't actually remove them so the
> 'suppress' name is preffered.
>
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 22 June 2016 at 09:55, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> John
>>
>> Thanks for that. Adding implicit hydrogens does indeed resolve the
>> problem.
>> But does this mean that for formats like this you MUST add IMPLICIT
>> hydrogens everywhere (there's no way for them to be explicit)? That's ugly!
>>
>> Tim
>>
>> On 21/06/2016 19:04, John M wrote:
>>
>> SMILES, InChI, Molfile have explicit valence models and thus their
>> hydrogens are set automatically on read. For other formats you need to add
>> them. The CDK doesn't do this by valence counting but rather through more
>> expensive atom typing. Very clunky:
>>
>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
>> CDKHydrogenAdder.getInstance(mol.getBuilder()).addImplicitHydrogens(mol);
>>
>> If someone can point at the Tripos Mol2 valence model, am happy to add
>> it. Should be easy right as they encode the atom types in the format?
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 21 June 2016 at 17:22, Tim Dudgeon < <tdudgeon...@gmail.com>
>> tdudgeon...@gmail.com> wrote:
>>
>>> I'm having difficulty reading Mol2 format files. Code is:
>>>
>>> def is = new FileInputStream("../../data/testfiles/ligand.mol2")
>>> def reader = new Mol2Reader(is)
>>> def file = reader.read(new ChemFile())
>>> def mol = ChemFileManipulator.getAllAtomContainers(file).get(0)
>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol)
>>> def out = new ByteArrayOutputStream()
>>> def writer = new SMILESWriter(out)
>>> writer.writeAtomContainer(mol)
>>> println new String(out.toByteArray())
>>>
>>> The file appears to be a valid mol2 format file, but when I try to write
>>> it out as smiles it blows up with:
>>>
>>> java.lang.NullPointerException: One or more atoms had an undefined
>>> number of implicit hydrogens
>>> at
>>> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
>>> at org.openscience.cdk.smiles.CDKToBeam.toBeamAtom(CDKToBeam.java:195)
>>> at org.openscience.cdk.smiles.CDKToBeam.toBeamGraph(CDKToBeam.java:145)
>>> at
>>> org.openscience.cdk.smiles.SmilesGenerator.create(SmilesGenerator.java:369)
>>> at
>>> org.openscience.cdk.smiles.SmilesGenerator.create(SmilesGenerator.java:325)
>>> at
>>> org.openscience.cdk.io.SMILESWriter.writeAtomContainer(SMILESWriter.java:179)
>>>
>>> What am I missing?
>>>
>>> Tim
>>>
>>>
>>> --
>>> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
>>> Francisco, CA to explore cutting-edge tech and listen to 

Re: [Cdk-user] Reading Mol2 format

2016-06-22 Thread John M
Sorry could be my bad wording, there are really three 'levels' of hydrogens
representation. This isn't that confusing but the terminology is often
misnamed in toolkits/formats. Even there where i said explicit I should
have said labelled or something similar:

Implicit/Undefined -> defined by valence rules -> CCO
Labelled/Contracted/Suppressed -> explicitly stated in format ->
[CH3][CH2][OH]
Explicit/Expanded/Sprouted -> explicit nodes ->
C][H])([H])([H])C([H])([H])O[H]

When CDK says 'ImplicitHydrogenAdder' it's not adding implicit hydrogens
per say but rather taken a molecule with some unknown hydrogen counts
(implicit) it sets the value of these explicitly. They are still contracted
on the parent atoms. You can take always expand these and make them
explicit nodes in the graph if so desired
(AtomContainerManipulator.convertImplicitHydrogensToExplicit) or something
similar. The reverse is 'suppressExplicitHydrogens', also for legacy reason
'removeExplicitHydrogens' but doesn't actually remove them so the
'suppress' name is preffered.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 22 June 2016 at 09:55, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> John
>
> Thanks for that. Adding implicit hydrogens does indeed resolve the problem.
> But does this mean that for formats like this you MUST add IMPLICIT
> hydrogens everywhere (there's no way for them to be explicit)? That's ugly!
>
> Tim
>
> On 21/06/2016 19:04, John M wrote:
>
> SMILES, InChI, Molfile have explicit valence models and thus their
> hydrogens are set automatically on read. For other formats you need to add
> them. The CDK doesn't do this by valence counting but rather through more
> expensive atom typing. Very clunky:
>
> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
> CDKHydrogenAdder.getInstance(mol.getBuilder()).addImplicitHydrogens(mol);
>
> If someone can point at the Tripos Mol2 valence model, am happy to add it.
> Should be easy right as they encode the atom types in the format?
>
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 21 June 2016 at 17:22, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> I'm having difficulty reading Mol2 format files. Code is:
>>
>> def is = new FileInputStream("../../data/testfiles/ligand.mol2")
>> def reader = new Mol2Reader(is)
>> def file = reader.read(new ChemFile())
>> def mol = ChemFileManipulator.getAllAtomContainers(file).get(0)
>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol)
>> def out = new ByteArrayOutputStream()
>> def writer = new SMILESWriter(out)
>> writer.writeAtomContainer(mol)
>> println new String(out.toByteArray())
>>
>> The file appears to be a valid mol2 format file, but when I try to write
>> it out as smiles it blows up with:
>>
>> java.lang.NullPointerException: One or more atoms had an undefined number
>> of implicit hydrogens
>> at
>> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
>> at org.openscience.cdk.smiles.CDKToBeam.toBeamAtom(CDKToBeam.java:195)
>> at org.openscience.cdk.smiles.CDKToBeam.toBeamGraph(CDKToBeam.java:145)
>> at
>> org.openscience.cdk.smiles.SmilesGenerator.create(SmilesGenerator.java:369)
>> at
>> org.openscience.cdk.smiles.SmilesGenerator.create(SmilesGenerator.java:325)
>> at
>> org.openscience.cdk.io.SMILESWriter.writeAtomContainer(SMILESWriter.java:179)
>>
>> What am I missing?
>>
>> Tim
>>
>>
>> --
>> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>> present their vision of the future. This family event has something for
>> everyone, including kids. Get more information and register today.
>> http://sdm.link/attshape
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>>
>
>
> --
> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register 
> today.http://sdm.link/attshape
>
>
>
> ___
> Cdk-user mailing 
> listCdk-user@lists.sourceforge.nethttps://lists.sour

Re: [Cdk-user] Reading Mol2 format

2016-06-22 Thread John M
Well you can just zero all the counts,

for (IAtom atom : mol.atoms())
  atom.setImplicitHydrogenCount(0);

but you can still store contracted forms in mol2 so it's not a general
solution,

John

Regards,
John W May
john.wilkinson...@gmail.com

On 22 June 2016 at 11:20, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> Yes, that's right. They are there in the mol2 file.
>
> Strange that you need to "add" them again!
>
> Tim
>
> On 22/06/2016 11:10, John M wrote:
>
> Or actually if the hydrogens are explicit in the input they are preserved.
> Looking this up briefly looks to be the case.
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 22 June 2016 at 10:52, John M <john.wilkinson...@gmail.com> wrote:
>
>> Hmm,
>>
>> That shouldn't be the case - if you use the ImplicitHydrogenAdder, this
>> would only be if you then 'convertImplicitToExplicit'.
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 22 June 2016 at 10:41, Tim Dudgeon < <tdudgeon...@gmail.com>
>> tdudgeon...@gmail.com> wrote:
>>
>>> The bit I didn't like was when I added the implicit hydrogens and then
>>> exported to smiles then the smiles contains all those hydrogens (as
>>> Explicit/Expanded/Sprouted in your terminology). So to me it looks like it
>>> added explicit hydrogens.
>>>
>>> Tim
>>>
>>> On 22/06/2016 10:08, John M wrote:
>>>
>>> Sorry could be my bad wording, there are really three 'levels' of
>>> hydrogens representation. This isn't that confusing but the terminology is
>>> often misnamed in toolkits/formats. Even there where i said explicit I
>>> should have said labelled or something similar:
>>>
>>> Implicit/Undefined -> defined by valence rules -> CCO
>>> Labelled/Contracted/Suppressed -> explicitly stated in format ->
>>> [CH3][CH2][OH]
>>> Explicit/Expanded/Sprouted -> explicit nodes ->
>>> C][H])([H])([H])C([H])([H])O[H]
>>>
>>> When CDK says 'ImplicitHydrogenAdder' it's not adding implicit hydrogens
>>> per say but rather taken a molecule with some unknown hydrogen counts
>>> (implicit) it sets the value of these explicitly. They are still contracted
>>> on the parent atoms. You can take always expand these and make them
>>> explicit nodes in the graph if so desired
>>> (AtomContainerManipulator.convertImplicitHydrogensToExplicit) or something
>>> similar. The reverse is 'suppressExplicitHydrogens', also for legacy reason
>>> 'removeExplicitHydrogens' but doesn't actually remove them so the
>>> 'suppress' name is preffered.
>>>
>>> John
>>>
>>> Regards,
>>> John W May
>>> john.wilkinson...@gmail.com
>>>
>>> On 22 June 2016 at 09:55, Tim Dudgeon < <tdudgeon...@gmail.com>
>>> tdudgeon...@gmail.com> wrote:
>>>
>>>> John
>>>>
>>>> Thanks for that. Adding implicit hydrogens does indeed resolve the
>>>> problem.
>>>> But does this mean that for formats like this you MUST add IMPLICIT
>>>> hydrogens everywhere (there's no way for them to be explicit)? That's ugly!
>>>>
>>>> Tim
>>>>
>>>> On 21/06/2016 19:04, John M wrote:
>>>>
>>>> SMILES, InChI, Molfile have explicit valence models and thus their
>>>> hydrogens are set automatically on read. For other formats you need to add
>>>> them. The CDK doesn't do this by valence counting but rather through more
>>>> expensive atom typing. Very clunky:
>>>>
>>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
>>>> CDKHydrogenAdder.getInstance(mol.getBuilder()).addImplicitHydrogens(mol);
>>>>
>>>> If someone can point at the Tripos Mol2 valence model, am happy to add
>>>> it. Should be easy right as they encode the atom types in the format?
>>>>
>>>> John
>>>>
>>>> Regards,
>>>> John W May
>>>> <john.wilkinson...@gmail.com>john.wilkinson...@gmail.com
>>>>
>>>> On 21 June 2016 at 17:22, Tim Dudgeon < <tdudgeon...@gmail.com>
>>>> tdudgeon...@gmail.com> wrote:
>>>>
>>>>> I'm having difficulty reading Mol2 format files. Code is:
>>>>>
>>>>> def is = new FileInputStream("../../data/testfiles/ligand.mol2")
>>>>> def reader = new Mol2Reader(is)
>&g

Re: [Cdk-user] Reading Mol2 format

2016-06-22 Thread John M
>
> That doesn't help. They are not implicit hydrogens, they are real
> (explicit) ones.
> So presumably they would need to be deleted and then implicit ones adding
> back?


?

See back a couple of mails: suppressHydrogens
<http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/tools/manipulator/AtomContainerManipulator.html#suppressHydrogens(org.openscience.cdk.interfaces.IAtomContainer)>
.

J

Regards,
John W May
john.wilkinson...@gmail.com

On 22 June 2016 at 12:07, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> That doesn't help. They are not implicit hydrogens, they are real
> (explicit) ones.
> So presumably they would need to be deleted and then implicit ones adding
> back?
>
> Tim
>
> On 22/06/2016 11:42, John M wrote:
>
> Well you can just zero all the counts,
>
> for (IAtom atom : mol.atoms())
>   atom.setImplicitHydrogenCount(0);
>
> but you can still store contracted forms in mol2 so it's not a general
> solution,
>
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 22 June 2016 at 11:20, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> Yes, that's right. They are there in the mol2 file.
>>
>> Strange that you need to "add" them again!
>>
>> Tim
>>
>> On 22/06/2016 11:10, John M wrote:
>>
>> Or actually if the hydrogens are explicit in the input they are
>> preserved. Looking this up briefly looks to be the case.
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 22 June 2016 at 10:52, John M < <john.wilkinson...@gmail.com>
>> john.wilkinson...@gmail.com> wrote:
>>
>>> Hmm,
>>>
>>> That shouldn't be the case - if you use the ImplicitHydrogenAdder, this
>>> would only be if you then 'convertImplicitToExplicit'.
>>>
>>> John
>>>
>>> Regards,
>>> John W May
>>> john.wilkinson...@gmail.com
>>>
>>> On 22 June 2016 at 10:41, Tim Dudgeon < <tdudgeon...@gmail.com>
>>> tdudgeon...@gmail.com> wrote:
>>>
>>>> The bit I didn't like was when I added the implicit hydrogens and then
>>>> exported to smiles then the smiles contains all those hydrogens (as
>>>> Explicit/Expanded/Sprouted in your terminology). So to me it looks like it
>>>> added explicit hydrogens.
>>>>
>>>> Tim
>>>>
>>>> On 22/06/2016 10:08, John M wrote:
>>>>
>>>> Sorry could be my bad wording, there are really three 'levels' of
>>>> hydrogens representation. This isn't that confusing but the terminology is
>>>> often misnamed in toolkits/formats. Even there where i said explicit I
>>>> should have said labelled or something similar:
>>>>
>>>> Implicit/Undefined -> defined by valence rules -> CCO
>>>> Labelled/Contracted/Suppressed -> explicitly stated in format ->
>>>> [CH3][CH2][OH]
>>>> Explicit/Expanded/Sprouted -> explicit nodes ->
>>>> C][H])([H])([H])C([H])([H])O[H]
>>>>
>>>> When CDK says 'ImplicitHydrogenAdder' it's not adding implicit
>>>> hydrogens per say but rather taken a molecule with some unknown hydrogen
>>>> counts (implicit) it sets the value of these explicitly. They are still
>>>> contracted on the parent atoms. You can take always expand these and make
>>>> them explicit nodes in the graph if so desired
>>>> (AtomContainerManipulator.convertImplicitHydrogensToExplicit) or something
>>>> similar. The reverse is 'suppressExplicitHydrogens', also for legacy reason
>>>> 'removeExplicitHydrogens' but doesn't actually remove them so the
>>>> 'suppress' name is preffered.
>>>>
>>>> John
>>>>
>>>> Regards,
>>>> John W May
>>>> <john.wilkinson...@gmail.com>john.wilkinson...@gmail.com
>>>>
>>>> On 22 June 2016 at 09:55, Tim Dudgeon < <tdudgeon...@gmail.com>
>>>> tdudgeon...@gmail.com> wrote:
>>>>
>>>>> John
>>>>>
>>>>> Thanks for that. Adding implicit hydrogens does indeed resolve the
>>>>> problem.
>>>>> But does this mean that for formats like this you MUST add IMPLICIT
>>>>> hydrogens everywhere (there's no way for them to be explicit)? That's 
>>>>> ugly!
>>>>>
>>>>> Tim
>>>>>
>>>>> On 21/06/2016 19:04, John M wrote:
>>>>>
>>>

Re: [Cdk-user] PDB reading (repost)

2016-06-21 Thread John M
Don't really use that functionality but...

1. Aren't there no bonds in a PDBFile so getting separate fragments isn't
clear cut? If you have a sample file would help.

2. For the residue information you can cast the atoms to PDBAtom and access
info from there.

Regards,
John W May
john.wilkinson...@gmail.com

On 21 June 2016 at 17:25, Tim Dudgeon  wrote:

> I asked this question a while ago about reading PDB files but didn't get
> any response.
>
> https://sourceforge.net/p/cdk/mailman/message/35110892/
>
> Hoping someone might know the answer?
>
> Tim
>
>
>
>
>
> --
> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] SDFile Renderer

2016-01-16 Thread John M
On 16 January 2016 at 19:14, John M <john.wilkinson...@gmail.com> wrote:

> didn't set properties


even

John
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Fwd: Clarification about LargestChainDescriptor behavior

2016-02-12 Thread John M
Hi Gio,

Next release is 1.5.13. Probably do it soon, not a huge number of changes
but I know a few patches people are waiting (this now being added as one of
them).

Please can you also confirm me that the purpose
> of the LargestChainDescriptor is to provide the longest path that contains
> non-aromatic, non-ring atoms?


Yes... but it now no longer checks aromaticity. Since an atom is only
aromatic if it's in a ring we just need to check the non-ring atoms.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 12 February 2016 at 19:20, Giovanni Cincilla <gcinci...@gmail.com> wrote:

> Very good guys! You are great. So I suppose the bug-free version will be
> available in the next CDK release, isn't it? Can you please me specify
> which version it will be?
> Please can you also confirm me that the purpose
> of the LargestChainDescriptor is to provide the longest path that contains
> non-aromatic, non-ring atoms? In other words: should the parameter
> *checkRingSystem* always be set = true in this description. I'm asking
> you this because it seems that in the current KNIME-CDK version this is
> currently not the case.
> Thank you in advance for your feedback!
> Gio
>
> On Thu, Feb 11, 2016 at 7:10 PM, Rajarshi Guha <rajarshi.g...@gmail.com>
> wrote:
>
>> well the first looks at all atoms, the other only considers carbon chains.
>>
>> I'd say keep them both in for now (though the first could be parametrized
>> on element, in which case we'd only need one)
>>
>> On Thu, Feb 11, 2016 at 1:06 PM, John M <john.wilkinson...@gmail.com>
>> wrote:
>>
>>> Hmm.. should we deprecate one of LargestChainDescriptor
>>> or LongestAliphaticChainDescriptor? Same purpose as far as I can set.
>>>
>>> John
>>>
>>> Regards,
>>> John W May
>>> john.wilkinson...@gmail.com
>>>
>>> On 11 February 2016 at 17:58, Rajarshi Guha <rajarshi.g...@gmail.com>
>>> wrote:
>>>
>>>> Yes, 5 should be the value for this
>>>>
>>>> On Thu, Feb 11, 2016 at 12:57 PM, John M <john.wilkinson...@gmail.com>
>>>> wrote:
>>>>
>>>>> Cheers for patch Rajarshi, added some clean up the code:
>>>>> https://github.com/cdk/cdk/pull/195 but get a test failure on,
>>>>> "CC=CC(C)=O" expected longest path is 6 but I get 5?
>>>>>
>>>>> 5 looks correct to me?
>>>>>
>>>>> John
>>>>>
>>>>> Regards,
>>>>> John W May
>>>>> john.wilkinson...@gmail.com
>>>>>
>>>>> On 11 February 2016 at 17:03, Rajarshi Guha <rajarshi.g...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> you can ignore the patch since I've just made a pull request with
>>>>>> this fix
>>>>>>
>>>>>> On Thu, Feb 11, 2016 at 10:47 AM, Rajarshi Guha <
>>>>>> rajarshi.g...@gmail.com> wrote:
>>>>>>
>>>>>>> Yes, it does appear to be a bug.
>>>>>>>
>>>>>>> Inspeting the code the LargestChainDescriptor is looking for the
>>>>>>> longest path that contains non-aromatic, non-ring atoms.
>>>>>>>
>>>>>>>  For Row0, there are only two non-ring, non-aromatic atoms and so
>>>>>>> there are two possible chains with a single atom, hence each chain has 
>>>>>>> the
>>>>>>> value of 0.
>>>>>>>
>>>>>>> For Row2, the longest chain according to the definition is the C#N
>>>>>>> substructure, hence the value should be 2
>>>>>>>
>>>>>>> For Row5 and Row6, the values should also be 2.
>>>>>>>
>>>>>>> I've attached a patch against master that fixes this (I wasn't sure
>>>>>>> how to make a pull request from a local branch)
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Feb 11, 2016 at 7:50 AM, Giovanni Cincilla <
>>>>>>> gcinci...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Thank you for your quick reply.
>>>>>>>> Examples are provided in the original KNIME forum thread (
>>>>>>>> https://tech.knime.org/forum/cdk/cdk-largest-chain-descriptor-inconsistencies#comment-41502),
>>>>>>>> anyway I can report those here:
>>>>>>>>
>>>>>

Re: [Cdk-user] ICountFingerprint usage question

2016-02-03 Thread John M
Unfortunately I don't think it's possible at the moment. The current
fingerprint API has

*Map<String,Int> getRawFingerprint
<http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/fingerprint/CircularFingerprinter.html#getRawFingerprint(org.openscience.cdk.interfaces.IAtomContainer)>*

Which some what fits with the lingos/path/smarts based fingerprints that
have string ready to hand (path is actually bad using strings) but not for
circular. Could do some sort of coding e.g. 'Idx:5,Rad:3' means atom at
index 5 encoded with radius 3. I've been thinking a better way to
associated hashed with substructures is by using the bond set.

*Map<Set,Int> features;*

Another alternative is to use the signature fingerprint, that will
definitely provide the associations and should perform similarly to the
circular.

J

Regards,
John W May
john.wilkinson...@gmail.com

On 3 February 2016 at 10:43, Nina Jeliazkova <jeliazkova.n...@gmail.com>
wrote:

> Hi John,
>
> Thanks!
>
> While on this, I am currently looking on how to extract the substructure
> patterns corresponding to the circular fingerprints hashes. Any chance if
> you already have thoughts on this ?   Supporting this on the interface
> level would be nice as well .  (I have a different use case and not
> particularly interested in the index building capabilities at the moment ).
>
> Best regards,
> Nina
>
>
>
>
>
> On 3 February 2016 at 12:17, John M <john.wilkinson...@gmail.com> wrote:
>
>> Hi Nina,
>>
>> I think it's this:
>>
>>
>>>
>>>
>>>
>>>
>>> *ICountFingerprint fp;int numBins = fp.numOfPopulatedbins();for (int i =
>>> 0; i < numBins; i++) {  int hash = fp.getHash(i);  int freq =
>>> fp.getCount(i);}*
>>
>>
>> https://gist.github.com/johnmay/1cc17ff6280f308e015b
>>
>> On a side note this will likely change in the near future. I've ben
>> drafting/prototyping a new fingerprint API (nfp akin to nio in java) that
>> will hide some of this munging and make the abstractions better and more
>> efficient. You can see some early draft of my thoughts but nothing formal
>> yet: https://github.com/cdk/cdk/wiki/New-Fingerprint
>>
>> John
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 3 February 2016 at 06:39, Nina Jeliazkova <jeliazkova.n...@gmail.com>
>> wrote:
>>
>>> Hello All,
>>>
>>> I am wondering what is the intended usage of the ICountFingerprint
>>> interface, and more specifically, how does one iterates over the available
>>> hashes using this interface.
>>>
>>> The obvious way of using the size() and for loop is impractical in cases
>>> as CircularFingerprint, where the size is declared = 4294967296l .  On the
>>> other hand the CircularFingerprint internal structure has all the
>>> information available in a more convenient way, but it is not accessible
>>> outside of the class.
>>>
>>> Any ideas? I am willing to provide a patch exposing the info in more
>>> convenient (sparse) way than ICountFingerprint, but not sure how it fits
>>> the CDK interfaces.
>>>
>>> Best regards,
>>> Nina
>>>
>>>
>>> --
>>> 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=/4140
>>> ___
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>>>
>>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered generator?

2016-01-26 Thread John M
There are about three different generators which have separate parameters -
the depiction generator is intended to hide this, here the withParam is
really an expert mode... I should give a better error message though. The
depiction generator uses the StandardGenerator and and BasicSceneGenerator
so you can only use parameters from their.

Regards,
John W May
john.wilkinson...@gmail.com

On 26 January 2016 at 14:36, Tim Dudgeon  wrote:

> When I try to use the low level DepictionGenerator.withParam(Class, U)
> method to set a parameter depiction blows up.
> e.g. I try:
>
> withParam(BasicAtomGenerator.ShowExplicitHydrogens.class, true)
>
> and then try to depict I get:
>
> java.lang.IllegalAccessError: You requested the active parameter of type
> org.openscience.cdk.renderer.generators.BasicAtomGenerator$ShowExplicitHydrogens,
> but it has not been registered yet. Did you make sure the
> IGeneratorParameter is registered, by registring the appropriate
> IGenerator? Alternatively, you can use getDefault() to query the default
> value for any parameter on the classpath.
>
> at
> org.openscience.cdk.renderer.RendererModel.getParameter(RendererModel.java:209)
> at
> org.openscience.cdk.renderer.RendererModel.set(RendererModel.java:249)
> at
> org.openscience.cdk.depict.DepictionGenerator.getModel(DepictionGenerator.java:284)
> at
> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:348)
> at
> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:296)
>
>
> How is it supposed to register these?
>
> Tim
>
>
>
>
>
> --
> 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=/4140
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Hydrogen display with DepictionGenerator

2016-01-26 Thread John M
You can't exactly replicate that because I really think the 'none' hydrogen
display is completely wrong as it changes the valence of atoms. However you
can choose which atoms have their symbol displayed and by definition
hydrogens which allows you to have the 'all', 'heteroterm', and 'hetero'.

It's best explained here:
https://github.com/cdk/cdk/wiki/Standard-Generator#symbol-visibility

Note the depiction generator has a short cut for the common case:
*withTerminalCarbons
*
()

John
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered generator?

2016-01-26 Thread John M
Yep - I'll add a better error message to reflect this.

Regards,
John W May
john.wilkinson...@gmail.com

On 26 January 2016 at 16:03, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> So this means that options like this can't be used with DepictionGenerator?
>
>
> On 26/01/2016 14:53, John M wrote:
>
> There are about three different generators which have separate parameters
> - the depiction generator is intended to hide this, here the withParam is
> really an expert mode... I should give a better error message though. The
> depiction generator uses the StandardGenerator and and BasicSceneGenerator
> so you can only use parameters from their.
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 26 January 2016 at 14:36, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> When I try to use the low level DepictionGenerator.withParam(Class, U)
>> method to set a parameter depiction blows up.
>> e.g. I try:
>>
>> withParam(BasicAtomGenerator.ShowExplicitHydrogens.class, true)
>>
>> and then try to depict I get:
>>
>> java.lang.IllegalAccessError: You requested the active parameter of type
>> org.openscience.cdk.renderer.generators.BasicAtomGenerator$ShowExplicitHydrogens,
>> but it has not been registered yet. Did you make sure the
>> IGeneratorParameter is registered, by registring the appropriate
>> IGenerator? Alternatively, you can use getDefault() to query the default
>> value for any parameter on the classpath.
>>
>> at
>> org.openscience.cdk.renderer.RendererModel.getParameter(RendererModel.java:209)
>> at
>> org.openscience.cdk.renderer.RendererModel.set(RendererModel.java:249)
>> at
>> org.openscience.cdk.depict.DepictionGenerator.getModel(DepictionGenerator.java:284)
>> at
>> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:348)
>> at
>> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:296)
>>
>>
>> How is it supposed to register these?
>>
>> Tim
>>
>>
>>
>>
>>
>> --
>> 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=/4140
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>>
>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Hydrogen display with DepictionGenerator

2016-01-26 Thread John M
>
> The hydrogens are implicitly there, just not displayed, so no valences are
> being changed.


Had an interesting debate about this in the office over coffee with no
resolution. Really if you don't show them they are depicting different
structures IMO... '[N]1C=CC=C1' vs 'N1C=CC=C1' but that's up for debate.

So it looks like its not possible to display a terminal atom (C, N ...)
> without the hydrogens being displayed?


Nope sorry, but you can remove them if you really want (setImplicitHydrogen)

Regards,
John W May
john.wilkinson...@gmail.com

On 26 January 2016 at 15:06, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

>
>
> On 26/01/2016 14:57, John M wrote:
>
> You can't exactly replicate that because I really think the 'none'
> hydrogen display is completely wrong as it changes the valence of atoms.
>
> Not sure what you mean here. This is only for display. The hydrogens are
> implicitly there, just not displayed, so no valences are being changed.
> I suppose the common case for this is when displaying a query structure
> (e.g. for SSS) when the only hydrogens you want to see are the ones
> explicitly defined as part of the query.
>
>
> However you can choose which atoms have their symbol displayed and by
> definition hydrogens which allows you to have the 'all', 'heteroterm', and
> 'hetero'.
>
> It's best explained here:
> https://github.com/cdk/cdk/wiki/Standard-Generator#symbol-visibility
>
> Note the depiction generator has a short cut for the common case: 
> *withTerminalCarbons
> <http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/depict/DepictionGenerator.html#withTerminalCarbons%28%29>*
> ()
>
>
> So it looks like its not possible to display a terminal atom (C, N ...)
> without the hydrogens being displayed?
>
> Tim
>
>
> John
>
>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered generator?

2016-01-26 Thread John M
Sorry bit confused here.. hydrogens are always shown especially with
explicit.

J

http://cdkdepict-openchem.rhcloud.com/depict/bow/svg?smi=%5BN%5D1C%3DCC%3DC1.%5BNH%5D1C%3DCC%3DC1.%5BH%5DN1C%3DCC%3DC1=1.3=none

Regards,
John W May
john.wilkinson...@gmail.com

On 26 January 2016 at 17:29, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> Any chance to change this?
> Displaying explicit H is pretty important when dealing with query
> structures.
> Not sure if there are other "critical" "advanced" parameters.
>
> Tim
>
>
> On 26/01/2016 16:17, John M wrote:
>
> Yep - I'll add a better error message to reflect this.
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 26 January 2016 at 16:03, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> So this means that options like this can't be used with
>> DepictionGenerator?
>>
>>
>> On 26/01/2016 14:53, John M wrote:
>>
>> There are about three different generators which have separate parameters
>> - the depiction generator is intended to hide this, here the withParam is
>> really an expert mode... I should give a better error message though. The
>> depiction generator uses the StandardGenerator and and BasicSceneGenerator
>> so you can only use parameters from their.
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 26 January 2016 at 14:36, Tim Dudgeon < <tdudgeon...@gmail.com>
>> tdudgeon...@gmail.com> wrote:
>>
>>> When I try to use the low level DepictionGenerator.withParam(Class,
>>> U) method to set a parameter depiction blows up.
>>> e.g. I try:
>>>
>>> withParam(BasicAtomGenerator.ShowExplicitHydrogens.class, true)
>>>
>>> and then try to depict I get:
>>>
>>> java.lang.IllegalAccessError: You requested the active parameter of type
>>> org.openscience.cdk.renderer.generators.BasicAtomGenerator$ShowExplicitHydrogens,
>>> but it has not been registered yet. Did you make sure the
>>> IGeneratorParameter is registered, by registring the appropriate
>>> IGenerator? Alternatively, you can use getDefault() to query the default
>>> value for any parameter on the classpath.
>>>
>>> at
>>> org.openscience.cdk.renderer.RendererModel.getParameter(RendererModel.java:209)
>>> at
>>> org.openscience.cdk.renderer.RendererModel.set(RendererModel.java:249)
>>> at
>>> org.openscience.cdk.depict.DepictionGenerator.getModel(DepictionGenerator.java:284)
>>> at
>>> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:348)
>>> at
>>> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:296)
>>>
>>>
>>> How is it supposed to register these?
>>>
>>> Tim
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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=/4140
>>> ___
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>>>
>>
>>
>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] inconsistency in ready molfiles

2016-01-20 Thread John M
Hi Tim,

V3000 reader doesn't accept ChemFiles, if you want to be squeaky clean try '
reader.accepts(IChemFile.class)':
https://github.com/cdk/cdk/blob/39e87cafae1f044c16dd101e7a8bd7e1ccb00fa3/storage/io/src/main/java/org/openscience/cdk/io/MDLV3000Reader.java#L130-L139


Although it could read ChemFiles the first thing you do is unpack the
ChemFile into a list of AtomContainers and so it's just bloat here. With
the V2000 you can read sequentially if you have an SDfile:

List mols;
> IAtomContainer mol;
> while ((mol = reader.read(new AtomContainer()) != null) {
>   mols.add(mol);
> }
>

Don't think that work with V3000 though but think it's the better option.

Ultimately it's silly that V2000 and V3000 are considered different but
haven't had time to put them in a single 'MolfileReader' yet.

Regards,
John W May
john.wilkinson...@gmail.com

On 19 January 2016 at 17:07, Tim Dudgeon  wrote:

> Hi All,
>
> I encountered an inconsistency when reading MDL molfiles.
> What works for the MDLV2000Reader blows up for the MDLV3000Reader with an
> NPE.
> This is illustrated in this GIST:
> https://gist.github.com/tdudgeon/08a858da05c958527242
>
> Note: if I use the reader to read a single molecule using:
> IAtomContainer mol = reader.read(new AtomContainer())
> it works OK, which would be OK in this particular case, but I suppose the
> behaviours should be consistent.
>
> Tim
>
>
>
> --
> 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=/4140
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered generator?

2016-01-27 Thread John M
I believe so, if you gave it methane as '[H]C([H])([H])[H]' it would only
show C (or maybe CH4).

J

Regards,
John W May
john.wilkinson...@gmail.com

On 26 January 2016 at 20:50, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> OK, so making more sense to me now.
> But what does this option do:
>
> http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/renderer/generators/BasicAtomGenerator.ShowExplicitHydrogens.html
>
> Is it just a way to turn off display off explicit H with the default being
> to display them?
>
> Tim
>
>
>
>
> On 26/01/2016 18:58, John M wrote:
>
> Sorry bit confused here.. hydrogens are always shown especially with
> explicit.
>
> J
>
>
> http://cdkdepict-openchem.rhcloud.com/depict/bow/svg?smi=%5BN%5D1C%3DCC%3DC1.%5BNH%5D1C%3DCC%3DC1.%5BH%5DN1C%3DCC%3DC1=1.3=none
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 26 January 2016 at 17:29, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> Any chance to change this?
>> Displaying explicit H is pretty important when dealing with query
>> structures.
>> Not sure if there are other "critical" "advanced" parameters.
>>
>> Tim
>>
>>
>> On 26/01/2016 16:17, John M wrote:
>>
>> Yep - I'll add a better error message to reflect this.
>>
>> Regards,
>> John W May
>> john.wilkinson...@gmail.com
>>
>> On 26 January 2016 at 16:03, Tim Dudgeon < <tdudgeon...@gmail.com>
>> tdudgeon...@gmail.com> wrote:
>>
>>> So this means that options like this can't be used with
>>> DepictionGenerator?
>>>
>>>
>>> On 26/01/2016 14:53, John M wrote:
>>>
>>> There are about three different generators which have separate
>>> parameters - the depiction generator is intended to hide this, here the
>>> withParam is really an expert mode... I should give a better error message
>>> though. The depiction generator uses the StandardGenerator and and
>>> BasicSceneGenerator so you can only use parameters from their.
>>>
>>> Regards,
>>> John W May
>>> john.wilkinson...@gmail.com
>>>
>>> On 26 January 2016 at 14:36, Tim Dudgeon < <tdudgeon...@gmail.com>
>>> tdudgeon...@gmail.com> wrote:
>>>
>>>> When I try to use the low level DepictionGenerator.withParam(Class,
>>>> U) method to set a parameter depiction blows up.
>>>> e.g. I try:
>>>>
>>>> withParam(BasicAtomGenerator.ShowExplicitHydrogens.class, true)
>>>>
>>>> and then try to depict I get:
>>>>
>>>> java.lang.IllegalAccessError: You requested the active parameter of
>>>> type
>>>> org.openscience.cdk.renderer.generators.BasicAtomGenerator$ShowExplicitHydrogens,
>>>> but it has not been registered yet. Did you make sure the
>>>> IGeneratorParameter is registered, by registring the appropriate
>>>> IGenerator? Alternatively, you can use getDefault() to query the default
>>>> value for any parameter on the classpath.
>>>>
>>>> at
>>>> org.openscience.cdk.renderer.RendererModel.getParameter(RendererModel.java:209)
>>>> at
>>>> org.openscience.cdk.renderer.RendererModel.set(RendererModel.java:249)
>>>> at
>>>> org.openscience.cdk.depict.DepictionGenerator.getModel(DepictionGenerator.java:284)
>>>> at
>>>> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:348)
>>>> at
>>>> org.openscience.cdk.depict.DepictionGenerator.depict(DepictionGenerator.java:296)
>>>>
>>>>
>>>> How is it supposed to register these?
>>>>
>>>> Tim
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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=/4140
>>>> ___
>>>> Cdk-user mailing list
>>>> Cdk-user@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
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=/4140___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Clarification about LargestChainDescriptor behavior

2016-02-18 Thread John M
It's a simple change but it makes sense to me a chain is length>1

John

Regards,
John W May
john.wilkinson...@gmail.com

On 18 February 2016 at 14:52, Giovanni Cincilla  wrote:

> Hi guys,
> I just had the possibility to test the corrected version. In general the
> inconsistencies were solved, but I still have doubt.
> Molecules from Row2 to Row8 now have all the correct values for
> LargestChainDescriptor. Anyway I think that Row0 and Row1 molecules should
> have (given its definition) a LargestChainDescriptor = 1 because they do
> have one atom in a non cyclic system. In my opinion LargestChainDescriptor
> should distinguish between these cases and those where no atoms are present
> in non cyclic system. While with the current implementation seems it is not
> possible to have a LargestChainDescriptor = 1.
>
> I my mind:
>
>1. "Cc1nn(c(N)c1)-c2nc3c(s2)3" should have a
>LargestChainDescriptor = 1
>2. "s1c2c(2)nc1-n3cccn3" should have a LargestChainDescriptor = 0
>
>
> What do you think about this? Do I am missing something?
> Thanks in advance for your help and support.
> Gio
>
> On Thu, Feb 11, 2016 at 4:47 PM, Rajarshi Guha 
> wrote:
>
>> Yes, it does appear to be a bug.
>>
>> Inspeting the code the LargestChainDescriptor is looking for the longest
>> path that contains non-aromatic, non-ring atoms.
>>
>>  For Row0, there are only two non-ring, non-aromatic atoms and so there
>> are two possible chains with a single atom, hence each chain has the value
>> of 0.
>>
>> For Row2, the longest chain according to the definition is the C#N
>> substructure, hence the value should be 2
>>
>> For Row5 and Row6, the values should also be 2.
>>
>> I've attached a patch against master that fixes this (I wasn't sure how
>> to make a pull request from a local branch)
>>
>>
>> On Thu, Feb 11, 2016 at 7:50 AM, Giovanni Cincilla 
>> wrote:
>>
>>> Thank you for your quick reply.
>>> Examples are provided in the original KNIME forum thread (
>>> https://tech.knime.org/forum/cdk/cdk-largest-chain-descriptor-inconsistencies#comment-41502),
>>> anyway I can report those here:
>>>
>>> 2. In some cases terminal atoms seems not to be counted as part of the
>>> largest chain LC (LC Row0 = 0; LC Row2 = 1), while in other cases they are
>>> (LC Row5 = 2; LC Row6 =2).
>>> 3. In some cases iso terminal groups are countes as 2 (Row4) while in
>>> other cases are counted as 3 (Row8).
>>>
>>> *Molecules:*
>>> "Row0","Cc1nn(c(c1)N)c1nc2c(s1)2"
>>> "Row1","Clc1cnn(c(=O)c1Cl)Cc1[nH]c(=O)c2c(n1)c1c1o2"
>>> "Row2","Nc1c(cn[nH]1)C#N"
>>> "Row3","Fc1ccc(cc1)C(=O)c1ccc(cc1)Oc1ncc(cn1)Br"
>>> "Row4","[O-][n+]1ccc(cc1)[N+](=O)[O-]"
>>> "Row5","OCc1c1CN"
>>> "Row6","COc1ccc(cc1)c1noc(c1)Cn1nc(C)c(c(c1=O)C#N)C"
>>> "Row7","Cc1nc(SCc2nc3ccsc3c(=O)[nH]2)c2c(n1)scc2c1cccs1"
>>> "Row8","CC(=O)c1(c1)Nc1nc(nc2c12)c1cccnc1"
>>>
>>> I hope the examples are quite clear.
>>>
>>> On Thu, Feb 11, 2016 at 1:18 PM, Rajarshi Guha 
>>> wrote:
>>>
 Could you provide an example where issues 2 & 3 show up?

 The descriptor is meant to compute the length of the longest aliphatic
 chain in a molecule

 On Thu, Feb 11, 2016 at 4:29 AM, Giovanni Cincilla  wrote:

> Dear all,
> I use CDK mainly through KNIME and I found some supposed
> inconsistencies using the LargestChainDescriptor. I originally posted my
> doubt in KNIME-CDK forum where I also provided examples:
>
>
> https://tech.knime.org/forum/cdk/cdk-largest-chain-descriptor-inconsistencies#comment-41502
>
> I'm not sure about the purpose of such descriptor. Essentially my
> doubts are the following:
>
>1. The LargestChainDescriptor count atoms that belong to aliphatic
>rings. Is that correct or it is a bug? The word "chain" in my opinion 
> can
>seems opposed to the word "ring".
>2. In some cases terminal atoms seems not to be counted as part of
>the largest chain, while in other cases they are.
>3. In some cases iso terminal groups are counted as 2 while in
>other cases are counted as 3
>4. Atoms between rings in some case to be correctly counted, while
>in other cases they are not
>
> Please, can anybody provide some clarification about these issues?
> Thanks,
> Gio
>
>
> --
> 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=272487151=/4140
> ___
> Cdk-user mailing 

Re: [Cdk-user] Clarification about LargestChainDescriptor behavior

2016-02-18 Thread John M
Hopefully soon, I'm in the process of moving house this/next month but one
that's settled I'll make it ASAP.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 18 February 2016 at 16:40, Giovanni Cincilla  wrote:

> Guys,
> Thanks for your quick answers. More than quick they were in "real-time"!
> Amazing   ;-)
> OK, so if we base on the Javadocs definition where "a chain exists only
> if there are two or more atoms" then the current implementation is correct.
> This is great as you solved all the inconsistencies I pointed out. Congrats!
> Please, I would have one last question: do you have idea about when the
> new official version (1.5.13) will be released?
>
>
> On Thu, Feb 18, 2016 at 4:00 PM, Rajarshi Guha 
> wrote:
>
>> From the Javadocs, it says
>>
>> "Note that a chain exists if there are two or more atoms. Thus single
>> atom molecules will return 0"
>>
>> So based on the definition, both your examples should have the value 0.
>>
>> I don't know if this is a descriptor implemented based on an official
>> reference/description or whether this was custom designed by the author.
>>
>> In my mind, a chain should require >= 2 atoms and so the current values
>> are correct.
>>
>> But happy to see what others think
>>
>> On Thu, Feb 18, 2016 at 9:52 AM, Giovanni Cincilla 
>> wrote:
>>
>>> Hi guys,
>>> I just had the possibility to test the corrected version. In general the
>>> inconsistencies were solved, but I still have doubt.
>>> Molecules from Row2 to Row8 now have all the correct values for
>>> LargestChainDescriptor. Anyway I think that Row0 and Row1 molecules should
>>> have (given its definition) a LargestChainDescriptor = 1 because they do
>>> have one atom in a non cyclic system. In my opinion LargestChainDescriptor
>>> should distinguish between these cases and those where no atoms are present
>>> in non cyclic system. While with the current implementation seems it is not
>>> possible to have a LargestChainDescriptor = 1.
>>>
>>> I my mind:
>>>
>>>1. "Cc1nn(c(N)c1)-c2nc3c(s2)3" should have a
>>>LargestChainDescriptor = 1
>>>2. "s1c2c(2)nc1-n3cccn3" should have a LargestChainDescriptor = 0
>>>
>>>
>>> What do you think about this? Do I am missing something?
>>> Thanks in advance for your help and support.
>>> Gio
>>>
>>> On Thu, Feb 11, 2016 at 4:47 PM, Rajarshi Guha 
>>> wrote:
>>>
 Yes, it does appear to be a bug.

 Inspeting the code the LargestChainDescriptor is looking for the
 longest path that contains non-aromatic, non-ring atoms.

  For Row0, there are only two non-ring, non-aromatic atoms and so there
 are two possible chains with a single atom, hence each chain has the value
 of 0.

 For Row2, the longest chain according to the definition is the C#N
 substructure, hence the value should be 2

 For Row5 and Row6, the values should also be 2.

 I've attached a patch against master that fixes this (I wasn't sure how
 to make a pull request from a local branch)


 On Thu, Feb 11, 2016 at 7:50 AM, Giovanni Cincilla  wrote:

> Thank you for your quick reply.
> Examples are provided in the original KNIME forum thread (
> https://tech.knime.org/forum/cdk/cdk-largest-chain-descriptor-inconsistencies#comment-41502),
> anyway I can report those here:
>
> 2. In some cases terminal atoms seems not to be counted as part of
> the largest chain LC (LC Row0 = 0; LC Row2 = 1), while in other cases they
> are (LC Row5 = 2; LC Row6 =2).
> 3. In some cases iso terminal groups are countes as 2 (Row4) while in
> other cases are counted as 3 (Row8).
>
> *Molecules:*
> "Row0","Cc1nn(c(c1)N)c1nc2c(s1)2"
> "Row1","Clc1cnn(c(=O)c1Cl)Cc1[nH]c(=O)c2c(n1)c1c1o2"
> "Row2","Nc1c(cn[nH]1)C#N"
> "Row3","Fc1ccc(cc1)C(=O)c1ccc(cc1)Oc1ncc(cn1)Br"
> "Row4","[O-][n+]1ccc(cc1)[N+](=O)[O-]"
> "Row5","OCc1c1CN"
> "Row6","COc1ccc(cc1)c1noc(c1)Cn1nc(C)c(c(c1=O)C#N)C"
> "Row7","Cc1nc(SCc2nc3ccsc3c(=O)[nH]2)c2c(n1)scc2c1cccs1"
> "Row8","CC(=O)c1(c1)Nc1nc(nc2c12)c1cccnc1"
>
> I hope the examples are quite clear.
>
> On Thu, Feb 11, 2016 at 1:18 PM, Rajarshi Guha <
> rajarshi.g...@gmail.com> wrote:
>
>> Could you provide an example where issues 2 & 3 show up?
>>
>> The descriptor is meant to compute the length of the longest
>> aliphatic chain in a molecule
>>
>> On Thu, Feb 11, 2016 at 4:29 AM, Giovanni Cincilla <
>> gcinci...@gmail.com> wrote:
>>
>>> Dear all,
>>> I use CDK mainly through KNIME and I found some supposed
>>> inconsistencies using the LargestChainDescriptor. I originally posted my
>>> doubt in KNIME-CDK forum where I also provided examples:
>>>
>>>
>>> 

Re: [Cdk-user] Clarification about LargestChainDescriptor behavior

2016-02-11 Thread John M
Cheers for patch Rajarshi, added some clean up the code:
https://github.com/cdk/cdk/pull/195 but get a test failure on, "CC=CC(C)=O"
expected longest path is 6 but I get 5?

5 looks correct to me?

John

Regards,
John W May
john.wilkinson...@gmail.com

On 11 February 2016 at 17:03, Rajarshi Guha  wrote:

> you can ignore the patch since I've just made a pull request with this fix
>
> On Thu, Feb 11, 2016 at 10:47 AM, Rajarshi Guha 
> wrote:
>
>> Yes, it does appear to be a bug.
>>
>> Inspeting the code the LargestChainDescriptor is looking for the longest
>> path that contains non-aromatic, non-ring atoms.
>>
>>  For Row0, there are only two non-ring, non-aromatic atoms and so there
>> are two possible chains with a single atom, hence each chain has the value
>> of 0.
>>
>> For Row2, the longest chain according to the definition is the C#N
>> substructure, hence the value should be 2
>>
>> For Row5 and Row6, the values should also be 2.
>>
>> I've attached a patch against master that fixes this (I wasn't sure how
>> to make a pull request from a local branch)
>>
>>
>> On Thu, Feb 11, 2016 at 7:50 AM, Giovanni Cincilla 
>> wrote:
>>
>>> Thank you for your quick reply.
>>> Examples are provided in the original KNIME forum thread (
>>> https://tech.knime.org/forum/cdk/cdk-largest-chain-descriptor-inconsistencies#comment-41502),
>>> anyway I can report those here:
>>>
>>> 2. In some cases terminal atoms seems not to be counted as part of the
>>> largest chain LC (LC Row0 = 0; LC Row2 = 1), while in other cases they are
>>> (LC Row5 = 2; LC Row6 =2).
>>> 3. In some cases iso terminal groups are countes as 2 (Row4) while in
>>> other cases are counted as 3 (Row8).
>>>
>>> *Molecules:*
>>> "Row0","Cc1nn(c(c1)N)c1nc2c(s1)2"
>>> "Row1","Clc1cnn(c(=O)c1Cl)Cc1[nH]c(=O)c2c(n1)c1c1o2"
>>> "Row2","Nc1c(cn[nH]1)C#N"
>>> "Row3","Fc1ccc(cc1)C(=O)c1ccc(cc1)Oc1ncc(cn1)Br"
>>> "Row4","[O-][n+]1ccc(cc1)[N+](=O)[O-]"
>>> "Row5","OCc1c1CN"
>>> "Row6","COc1ccc(cc1)c1noc(c1)Cn1nc(C)c(c(c1=O)C#N)C"
>>> "Row7","Cc1nc(SCc2nc3ccsc3c(=O)[nH]2)c2c(n1)scc2c1cccs1"
>>> "Row8","CC(=O)c1(c1)Nc1nc(nc2c12)c1cccnc1"
>>>
>>> I hope the examples are quite clear.
>>>
>>> On Thu, Feb 11, 2016 at 1:18 PM, Rajarshi Guha 
>>> wrote:
>>>
 Could you provide an example where issues 2 & 3 show up?

 The descriptor is meant to compute the length of the longest aliphatic
 chain in a molecule

 On Thu, Feb 11, 2016 at 4:29 AM, Giovanni Cincilla  wrote:

> Dear all,
> I use CDK mainly through KNIME and I found some supposed
> inconsistencies using the LargestChainDescriptor. I originally posted my
> doubt in KNIME-CDK forum where I also provided examples:
>
>
> https://tech.knime.org/forum/cdk/cdk-largest-chain-descriptor-inconsistencies#comment-41502
>
> I'm not sure about the purpose of such descriptor. Essentially my
> doubts are the following:
>
>1. The LargestChainDescriptor count atoms that belong to aliphatic
>rings. Is that correct or it is a bug? The word "chain" in my opinion 
> can
>seems opposed to the word "ring".
>2. In some cases terminal atoms seems not to be counted as part of
>the largest chain, while in other cases they are.
>3. In some cases iso terminal groups are counted as 2 while in
>other cases are counted as 3
>4. Atoms between rings in some case to be correctly counted, while
>in other cases they are not
>
> Please, can anybody provide some clarification about these issues?
> Thanks,
> Gio
>
>
> --
> 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=272487151=/4140
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>


 --
 Rajarshi Guha | http://blog.rguha.net
 NIH Center for Advancing Translational Science

>>>
>>>
>>
>>
>> --
>> Rajarshi Guha | http://blog.rguha.net
>> NIH Center for Advancing Translational Science
>>
>
>
>
> --
> Rajarshi Guha | http://blog.rguha.net
> NIH Center for Advancing Translational Science
>
>
> --
> 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 

Re: [Cdk-user] Reaction depiction

2016-03-05 Thread John M
Hi Scooter,

This is now much easier, for most use-cases you use the new
DepictionGenerator

abstract (module cdk-depict will be bundled but needs to be load
separately). Lots of tweaks you can do but it's a one liner:

new DepictionGenerator().depict(rxn).writeTo("~/myrxn.svg");


The web application can show you what it will look like:

http://cdkdepict-openchem.rhcloud.com/depict.html


John

Regards,
John W May
john.wilkinson...@gmail.com

On 5 March 2016 at 04:49, Scooter Morris  wrote:

> Hi all,
>  I've been trying to add reactions to the chemViz2 plugin for
> Cytoscape and have been unsuccessful so far.  I do get the something
> rendered, but everything is on top of each other and much, much larger
> that I think it should be.  Here are the steps I'm taking -- any
> direction would be really helpful.
>
> First, I layout the reaction:
>
>static public IReaction layoutReaction(IReaction reaction) throws
> CDKException {
>  int offset = -10;
>  // Layout agents
>  AtomContainerSet agents = new AtomContainerSet();
>  for (IAtomContainer agent: reaction.getAgents().atomContainers()) {
>IAtomContainer newAgent = layoutMolecule(agent);
>agents.addAtomContainer(newAgent);
>  }
>  // ??? no setAgents method ???
>  reaction.getAgents().removeAllAtomContainers();
>  for (IAtomContainer agent: agents.atomContainers()) {
>reaction.addAgent(agent);
>  }
>
>  // Layout reactants
>  AtomContainerSet reactants = new AtomContainerSet();
>  for (IAtomContainer reactant:
> reaction.getReactants().atomContainers()) {
>IAtomContainer newReactant = layoutMolecule(reactant);
>GeometryTools.translate2DCenterTo(newReactant, new
> Point2d(offset, 0));
>offset += 2;
>reactants.addAtomContainer(newReactant);
>  }
>  reaction.setReactants(reactants);
>  // Layout Products
>  offset += 6;
>  AtomContainerSet products = new AtomContainerSet();
>  for (IAtomContainer product: reaction.getProducts().atomContainers())
> {
>IAtomContainer newProduct = layoutMolecule(product);
>GeometryTools.translate2DCenterTo(newProduct, new Point2d(offset,
> 0));
>offset += 2;
>products.addAtomContainer(newProduct);
>  }
>  reaction.setProducts(products);
>  return reaction;
>}
>
> where layoutMolecule is the code I'm already using to layout
> IAtomContainers and seems to work well.
>
> Then, when I actually do the rendering:
>
>  ChemModelRenderer renderer = getReactionRenderer((Color)background);
>  ChemModel chemModel = new ChemModel();
>  ReactionSet rSet = new ReactionSet();
>  rSet.addReaction(iReaction);
>  chemModel.setReactionSet(rSet);
>  if (renderer == null)
>return null;
>
>
> (I tried ReactionRenderer also, but got the same results)
>
> where getReactionRenderer is:
>private static ChemModelRenderer getReactionRenderer(Color background) {
>  // generators make the image elements
>  Font font = new Font("Arial", Font.PLAIN, 24);
>  ChemModelRenderer renderer =
>new ChemModelRenderer(Arrays.asList(new BasicSceneGenerator(),
> new StandardGenerator(font)),
> Arrays.asList((IGenerator)new ReactionSceneGenerator(),
> (IGenerator)new ReactionArrowGenerator(),
> (IGenerator)new ReactionPlusGenerator()),
> new AWTFontManager());
>
>  RendererModel model = renderer.getRenderer2DModel();
>  model.set(StandardGenerator.Visibility.class,
> SymbolVisibility.iupacRecommendations());
>  model.set(StandardGenerator.AtomColor.class, new CDK2DAtomColors());
>  model.set(StandardGenerator.StrokeRatio.class, 0.85);
>  model.set(StandardGenerator.SymbolMarginRatio.class, 4d);
>
>  if (background == null)
>background = new Color(255,255,255,255);
>
>  return renderer;
>}
>
> I seem to be missing a major step here since the result is a mess. Any
> suggestions or direction would be helpful.  I'm currently using 1.5.12,
> but I've also tried with 1.5.11 to no avail
>
> -- scooter
>
>
>
> --
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Reaction depiction

2016-03-05 Thread John M
On 5 March 2016 at 09:51, John M <john.wilkinson...@gmail.com> wrote:

> will be bundled


*will be bundled in future but at the moment you need to include
it explicitly

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] create amino acide

2016-04-29 Thread John M
Hi Hanouna,

Sorry I didn't see your other messages, they were marked as spam due the
writing style and yahoo.fr authentication failures.

If you're still having trouble building/using the CDK in an IDE (e.g.
Eclipse) I put together a guide here:
https://github.com/cdk/cdk/wiki/Building-CDK

I've you're new CDK you should use the least release 1.5.14. Also there are
more relevant pages/updates on the GitHub wiki.

John

Regards,
John W May
john.wilkinson...@gmail.com

On 27 April 2016 at 19:39, hanouna nouna  wrote:

> hello
> i have to create an amino acide from a library of fragment acide and a
> library of fragments amine if you can help me with packages of CDK that i
> have to use that will be a big pleasur to me
> and thank you so mutch
>
--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] create amino acide

2016-04-27 Thread John M
Regards,
John W May
john.wilkinson...@gmail.com

On 27 April 2016 at 19:39, hanouna nouna  wrote:

> hello
> i have to create an amino acide from a library of fragment acide and a
> library of fragments amine if you can help me with packages of CDK that i
> have to use that will be a big pleasur to me
> and thank you so mutch
>
--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] [URGENT] Help needed for processing of aromatic compounds and Structure Search

2016-05-19 Thread John M
Hi Yannick,

This should be much similar now. First off, you're using some old APIs, SQT
still works but it's preferred now to go through 'Pattern'. The
SmartsPattern does all the setup needed, other implementations can be
faster and more customisable (see later) if you have many SMARTS against
one molecule but only recommended if needed.
The SMSD classes are some specific to SMSD so unless you need MCS don't use
them.

I've attached the code below but if think the real problem here is the
really SMARTS don't match molecule using Daylight's aromaticity model. All
ring atoms there are aromatic and an explicit '=' in SMARTS doesn't match
an aromatic atom ('=,:' is the way to do that).

You can try out SMARTS on CDKDepict:
http://cdkdepict-openchem.rhcloud.com/depict.html

> COC1=C(O)C=C2OC=C(C(=O)C2=C1)C3=CC=C(O)C=C3
>
[O;X1]=[#6;R1]-,:1-,:[#6;R1](=,:[#6;R1]-,:[#8]-,:c2c-,:12)-[c;R1]1[c;R1][c;R1][c;R1][c;R1][c;R1]1
> Correct SMARTS


Doubly confirmed with OpenBabel

>
> *[sovereign ~/Downloads]: obgrep
> '[O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-c2c-12)-[c;R1]1[c;R1][c;R1][c;R1][c;R1][c;R1]1'
> glycitein.sdf [sovereign ~/Downloads]: obgrep
> '[O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-[#6]-2=[#6]-[#6]=[#6]-[#6]=[#6]-1-2)-[#6;R1]-1=[#6;R1]-[#6;R1]=[#6;R1]-[#6;R1]=[#6;R1]-1'
> glycitein.sdf *


Here would be the normal code if SMARTS were changed. SmartsPattern does
aromaticity automatically.

*IChemObjectBuilder bldr  = SilentChemObjectBuilder.getInstance();*
>
> *Pattern ptrn1 =
>> SmartsPattern.create("[O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-c2c-12)-[c;R1]1[c;R1][c;R1][c;R1][c;R1][c;R1]1",
>> null);*
>
> *Pattern ptrn2 =
>> SmartsPattern.create("[O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-[#6]-2=[#6]-[#6]=[#6]-[#6]=[#6]-1-2)-[#6;R1]-1=[#6;R1]-[#6;R1]=[#6;R1]-[#6;R1]=[#6;R1]-1",
>> null);*
>
>
>> *try (MDLV2000Reader mrdr = new MDLV2000Reader(new
>> FileReader("/Users/john/Downloads/glycitein.sdf"))) {*
>
> *  IAtomContainer mol;*
>
> *  while ((mol = mrdr.read(bldr.newInstance(IAtomContainer.class, 0, 0, 0,
>> 0))) != null) {*
>
> *System.err.println("p1: " + ptrn1.matches(mol));*
>
> *System.err.println("p2: " + ptrn2.matches(mol));*
>
> *  }*
>
> *}*
>
>
Here's the code where we use a different aromaticity model. This is lower
level hence some more setup is needed.


>
>
>
>
>
>
>
>
>
>
>
>
> *IChemObjectBuilder bldr  = SilentChemObjectBuilder.getInstance();Pattern
> ptrn1 =
> VentoFoggia.findSubstructure(SMARTSParser.parse("[O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-c2c-12)-[c;R1]1[c;R1][c;R1][c;R1][c;R1][c;R1]1",
> null));Pattern ptrn2 =
> VentoFoggia.findSubstructure(SMARTSParser.parse("[O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-[#6]-2=[#6]-[#6]=[#6]-[#6]=[#6]-1-2)-[#6;R1]-1=[#6;R1]-[#6;R1]=[#6;R1]-[#6;R1]=[#6;R1]-1",
> null));Aromaticity arom = new Aromaticity(ElectronDonation.piBonds(),
>  Cycles.all(6));try (MDLV2000Reader mrdr = new
> MDLV2000Reader(new FileReader("/Users/john/Downloads/glycitein.sdf"))) {
> IAtomContainer mol;while ((mol =
> mrdr.read(bldr.newInstance(IAtomContainer.class, 0, 0, 0, 0))) != null) {
>   arom.apply(mol);SmartsMatchers.prepare(mol, true);
> System.err.println("p1: " + ptrn1.matches(mol));
> System.err.println("p2: " + ptrn2.matches(mol));}}*



Regards,
John W May
john.wilkinson...@gmail.com

On 19 May 2016 at 06:55, Yannick .Djoumbou  wrote:

> Hi all,
>
> I am having some issues with the CDK library.
>
> I have the molecule "glycitein" in the attached file (glycitein.sdf). I
> am  running the SMARTSQueryTool  to perform structure search. The SMARTS
> patterns are the following:
>
>
> P1: 
> [O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-c2c-12)-[c;R1]1[c;R1][c;R1][c;R1][c;R1][c;R1]1
>
>
> P2: 
> [O;X1]=[#6;R1]-1-[#6;R1](=[#6;R1]-[#8]-[#6]-2=[#6]-[#6]=[#6]-[#6]=[#6]-1-2)-[#6;R1]-1=[#6;R1]-[#6;R1]=[#6;R1]-[#6;R1]=[#6;R1]-1
>
> For each of those, the query tool returns false, which is
> really surprising. I imagine it still has to do with the Aromaticity
> detection or a related issue. I have tried many things and it seems that
> they do not always work as they should.
>
> 1) I therefore preprocessed the molecule using the code below (from a
> previous chat I had on a forum):
>
> SMSDNormalizer.percieveAtomTypesAndConfigureAtoms(molecule);
>
> CDKHydrogenAdder.getInstance(molecule.getBuilder())
>
> .addImplicitHydrogens(molecule);
>
> for (IBond bond : molecule.bonds()) {
>
> if (bond.getFlag(CDKConstants.SINGLE_OR_DOUBLE)) {
>
> bond.setFlag(CDKConstants.ISAROMATIC, true);
>
> bond.getAtom(0).setFlag(CDKConstants.ISAROMATIC, true);
>
> bond.getAtom(1).setFlag(CDKConstants.ISAROMATIC, true);
>
>
> }
>
> }
>
>
> SMSDNormalizer.aromatizeMolecule(molecule);
>
>
> I attached the resulting structure in SDF format as returned by CDK
> ((glycitein_processed.sdf)), which in most editors is shown as in the
> attached picture. It seems that all the aromatic bonds (marked as 4) in the
> SDF are perceived as 

[Cdk-user] Interest in metabolic reaction depictions.

2016-05-12 Thread John M
Hey all,

I've been doing a fair bit on reaction depictions recently. It's tended to
focus on organic chemistry but was wondering how much interest there would
be in specialised metabolic reaction depictions.

We do much better with the introduction of abbreviations:

SMILES:

C(C)(C)[C@@H]([C@H](C(=O)[O-])O)C(=O)[O-].C1=CC(=C[N+](=C1)[C@H]2[C@@H]([C@
> @H]([C@H](O2)COP(=O)(O)OP(=O)(O)OC[C@@H]3[C@H]([C@H]([C@
> @H](O3)N4C=NC5=C4N=CN=C5N)O)O)O)O)C(=O)N>>CC(CC(C(=O)[O-])=O)C.C=1N=C(C2=C(N1)N(C=N2)[C@H
> ]3[C@@H]([C@@H]([C@H](O3)COP(=O)(O)OP(=O)(O)OC[C@@H]4[C@H]([C@H]([C@@H](O4)N5C=CCC(=C5)C(=O)N)O)O)O)O)N.C(=O)=O
> |SgD::cdkReactionConditions:1.1.1.85|


CDK Depict


[image: Inline images 1]
Excluding the group abbreviations:
[image: Inline images 3]

But putting the NAD+,NADH,CO2 as side components with an arc may be more
intuitive to some.

See here: http://www.genome.jp/dbget-bin/www_bget?rn:R10052

[image: Inline images 2]


I did show this to a colleague with a background in Chemistry this morning
though and he said he couldn't tell what was going on here.

It's a moderate amount of work and I'm kind of under the impression the
current depiction is pretty good at conveying what's going on. If there is
significant demand for it though it could be something to add.

Thoughts?

John

P.S. we can display a reversible arrow and individual molecule titles (in
the reaction) but no way to put that in SMILES.
--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] create amino acide

2016-05-02 Thread John M
Do you have an example of an amine and acid you want to make an amino acid
out of?

Regards,
John W May
john.wilkinson...@gmail.com

On 2 May 2016 at 20:36, hanouna nouna <hanounanouna...@yahoo.fr> wrote:

> thanks for answering, about your first question i download the acides and
> the amines from ChemSpider database in mol format, and i wont to make a
> novel amino acid from this two fragments , and i will use the first way
> (using SMARTS) to create it .
>
>
> Le Lundi 2 mai 2016 21h21, John M <john.wilkinson...@gmail.com> a écrit :
>
>
> What do the amines look like and what to the acids look like? It sounds
> like you're not simply building a polypeptide but want to make *novel *amino
> acids from an amine and an acid? In bonding these to things together any
> algorithm can't simply know which atoms you want to bond and you must tell
> it.
>
> There are two ways this is typically done but depends on your use case:
>  a) Use a SMARTS pattern/reaction transformation (e.g. SMIRKS) this is
> okay but handling unwanted bonds may be a problem if you're patterns aren't
> strict enough.
>  b) Use attachment points/leaving groups to specify where monomers can be
> bound. This requires rewriting your monomer set but is more robust and
> efficient if you building polymers. This is the approach taken by HELM
> <http://www.pistoiaalliance.org/projects/hierarchical-editing-language-for-macromolecules-helm/>
> .
>
> Unfortunately both of these are rather involved.
>
> - John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 1 May 2016 at 19:23, hanouna nouna <hanounanouna...@yahoo.fr> wrote:
>
> hello i have  a set of fragment acides.mol and a set of fragments
> amine.mol in my disc  and i wont to read an acide and an amin and to create
> an amino acide i try with this code but i have an error
> import java.io.FileNotFoundException;
> import java.io.InputStream;
>
> import org.openscience.cdk.BioPolymer;
> import org.openscience.cdk.exception.CDKException;
> import org.openscience.cdk.io.MDLReader;
> import org.openscience.cdk.tools.ProteinBuilderTool;
>
> public class AA {
> public static void main(String[] args) throws CDKException,
> FileNotFoundException{
> String filename1 = "C:/amine/amine_59.mol";
>
> InputStream ins
> =InputStream.class.getClass().getClassLoader().getResourceAsStream(filename1);
> MDLReader reader = new MDLReader(ins);
> String filename2 = "C:/acide/acide_1.mol";
> InputStream in
> =InputStream.class.getClass().getClassLoader().getResourceAsStream(filename2);
> MDLReader read = new MDLReader(in);
> BioPolymer crambin = ProteinBuilderTool.createProtein(
> filename1+filename2 );
> System.out.println("Crambin has " + crambin.getAtomCount() +"
> atoms.");
> }
> }
> the error is java.lang.NullPointerException
> i wate your answer please
> thanks
>
>
> Le Vendredi 29 avril 2016 17h06, John M <john.wilkinson...@gmail.com> a
> écrit :
>
>
> Hi Hanouna,
>
> Sorry I didn't see your other messages, they were marked as spam due the
> writing style and yahoo.fr authentication failures.
>
> If you're still having trouble building/using the CDK in an IDE (e.g.
> Eclipse) I put together a guide here:
> https://github.com/cdk/cdk/wiki/Building-CDK
>
> I've you're new CDK you should use the least release 1.5.14. Also there
> are more relevant pages/updates on the GitHub wiki.
>
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 27 April 2016 at 19:39, hanouna nouna <hanounanouna...@yahoo.fr> wrote:
>
> hello
> i have to create an amino acide from a library of fragment acide and a
> library of fragments amine if you can help me with packages of CDK that i
> have to use that will be a big pleasur to me
> and thank you so mutch
>
>
>
>
>
>
>
>
--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] create amino acide

2016-05-02 Thread John M
Okay,

But there's no COOH in the Lidociane example...? It's certainly possible to
do what you want but you'll need to do it manually by deleting/adding bonds.

Here's a rough idea:
https://gist.github.com/johnmay/9c814049688cc905c806b9738212809b

> import org.openscience.cdk.exception.CDKException;
> import org.openscience.cdk.interfaces.IAtom;
> import org.openscience.cdk.interfaces.IAtomContainer;
> import org.openscience.cdk.interfaces.IBond;
> import org.openscience.cdk.interfaces.IChemObjectBuilder;
> import org.openscience.cdk.isomorphism.Pattern;
> import org.openscience.cdk.silent.SilentChemObjectBuilder;
> import org.openscience.cdk.smiles.SmilesGenerator;
> import org.openscience.cdk.smiles.SmilesParser;
> import org.openscience.cdk.smiles.smarts.SmartsPattern;
> import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
>
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.Arrays;
> import java.util.List;
>
> public class CreateAminoAcid {
>
> private static final IChemObjectBuilder BLDR = 
> SilentChemObjectBuilder.getInstance();
>
> private static final Pattern AMINE_PATTERN;
> private static final Pattern ACID_PATTERN;
>
> static  {
> try {
> AMINE_PATTERN = SmartsPattern.create("[NX3v3h2]", null);
> ACID_PATTERN = SmartsPattern.create("[OX2v2H1][CX3v4]=[OX1v2H0]", 
> null);
> } catch (IOException ex) {
> throw new InstantiationError("Bad SMARTS!" + ex.getMessage());
> }
> }
>
> private static List fuse(IAtomContainer amine, 
> IAtomContainer acid) throws
>   
>   CloneNotSupportedException {
>
> // optional
> AtomContainerManipulator.suppressHydrogens(amine);
> AtomContainerManipulator.suppressHydrogens(acid);
>
> List result = new ArrayList<>();
>
> int[][] amineHits = 
> AMINE_PATTERN.matchAll(amine).uniqueAtoms().toArray();
> int[][] acidHits  = 
> ACID_PATTERN.matchAll(acid).uniqueAtoms().toArray();
>
>
> for (int[] amineHit : amineHits) {
> for (int[] acidHit : acidHits) {
> IAtomContainer fused = amine.clone();
> fused.add(acid.clone());
>
> IAtom nAtom = fused.getAtom(amineHit[0]);
> IAtom oAtom = fused.getAtom(amine.getAtomCount() + 
> acidHit[0]);
> IAtom cAtom = fused.getAtom(amine.getAtomCount() + 
> acidHit[1]);
>
> // 1. remove bond and adjust N valence
> // XXX: this can be much faster by moving to the back first 
> and then deleting
> fused.removeAtomAndConnectedElectronContainers(oAtom);
> 
> nAtom.setImplicitHydrogenCount(nAtom.getImplicitHydrogenCount()-1);
>
> // This looks confusion but is essentially: 'new Bond(nAtom, 
> cAtom, SINGLE)' using a factory
> // (or builder as called here)
> fused.addBond(BLDR.newInstance(IBond.class, nAtom, cAtom, 
> IBond.Order.SINGLE));
>
> result.add(fused);
> }
> }
>
> return result;
> }
>
> public static void main(String[] args) throws CDKException, 
> CloneNotSupportedException {
>
>
> SmilesParser   smipar = new SmilesParser(BLDR);
> SmilesGeneratorsmigen = SmilesGenerator.isomeric();
>
> // input list of amines/acids
> List amines = Arrays.asList("CC1=CC=CC(C)=C1N");
> List acids  = Arrays.asList("CC(O)=O");
>
> for (String amine : amines) {
> for (String acid : acids) {
> IAtomContainer amineMol = smipar.parseSmiles(amine);
> IAtomContainer acidMol  = smipar.parseSmiles(acid);
>
> for (IAtomContainer fused : fuse(amineMol, acidMol)) {
> System.out.println(smigen.create(fused));
> }
> }
> }
>
> }
> }
>
>
Regards,
John W May
john.wilkinson...@gmail.com

On 2 May 2016 at 22:38, hanouna nouna <hanounanouna...@yahoo.fr> wrote:

> yes somthing like that, i have to break the double bound between C and O
> from the COOH and the H from NH2 to create the novel amino acide similar to
> Lidociane if you can take me wich package i use to break theme in CDK
>
>
> Le Lundi 2 mai 2016 23h18, John M <john.wilkinson...@gmail.com> a écrit :
>
>
> Okay, but what's the input?
>
> For example for Lidocaine, it looks like a two step synthesis, it's not

Re: [Cdk-user] Resonance isomers - Aromatic species

2016-08-12 Thread John M
Hi Florence,

That code is quite old, given it looks like it doesn't work so I'll
probably deprecate it...

If I understand correctly there are three problems:
  1) Not all resonance forms are generated
  2) Non transitivity/round tripping, that is if I have resonsance forms
a,b,c,d,etc I only get [a,b,c] from a, [b,c,d] from b, and may [b,d] from d.
  3) Non-unique forms are produced

Are these the 6 you found:
[CH2]c=1c=cc=c2Cccc12.[CH2]c12Cccc12.cc1[CH]ccc2Cccc12.cc12Ccc[C]12.cc1cc[CH]c2Cccc12.cc12C[CH]cc12
|^1:0,10,22,39,44,57|
.
I'm not sure if it's useful to get both of the first two.

There's clearly problems but a work around might be to keep generating why
you get more and filter unique with Canonical SMILES. Out of interest do
you have the code you used to get it to work? I can't get anything but null
for you input structure (can paste it here: https://gist.github.com/).

What precisely do you need, Are you just interested in resonance forms with
a single radical?

With these types of algorithms there are two ways of doing it, local or
global. Local algorithms apply a list of rules (reactions) to transform the
structure (unique gen slow), InChI does this for tautomers. A global
algorithm strips everything of and then puts it back on (unique gen is
fast). There are pros/cons to both but if not coded correctly the local
transformations can miss structures (as I suspect is the case here).

I might be able to adapt a global tautomer backtracking algorithm quite
easily (
http://www.daylight.com/meetings/emug99/Delany/taut_html/slide01.html),
this will be much faster and robust.

John
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Reaction Agents

2016-08-13 Thread John M
Hi All,

Lots of the ReactionManipulator methods don't consider agents. Guessing
they may have been written before an API change.

Is there any objection to me updating the semantics such that
getAllMolecules and getAtomCount etc don't ignore agents?

Example of current implementations:
https://github.com/cdk/cdk/blob/master/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionManipulator.java#L57

Cheers
J
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] Project Versioning

2016-08-17 Thread John M
This has come up before, but wanted to hear from users.

Currently the project versioning system is 1.{odd/even}.{number} where by 1
is fixed for now, odd/even for stability (e.g. 1.4.x stable, 1.5.x
unstable), the last number just increments. This system hints that 1.4 is
the preferred version as being "stable" but this hasn't been touched in
years. Stable here really means API is fixed, but often also be interpreted
as more robust. This odd/even number *was* used by Linux kernal until 2004
but is not any longer. I'm hesitant to bump to 1.6 on this systems as
working deep in the code base I know a lot of things need fixing.

Does this system make sense/do you like this system?

I would like to propose switching to the following version system:
{major}.{minor}.{maintenance}. Where by {major}=API change, {minor}=new
API, {maintenance}=bug fix/patch release. Number will climb faster but I
believe it will be easier to pinpoint how much further ahead a new version
is.

At the end of the day it's just a number.

Regards,
John W May
john.wilkinson...@gmail.com
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Old versions from Maven?

2016-09-26 Thread John M
Hi Tim,

We switched to maven in 1.5.6,
http://efficientbits.blogspot.co.uk/2014/02/cdk-now-built-using-maven.html.
I think AMBIT might have some in their repo but modules won't match 100%.
Nina will be able to confirm.. the repo moved recently and all the links I
can find are to the old one.

http://ambit.sourceforge.net/download_ambitlibs.html
​
John
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] InChI with \KET and \15T options from JAVA

2016-10-05 Thread John M
Okay support added for 15T and KET options. Hopefully the new version of
InChI is released soon and I can rebuild JNI-InChI and push these patches
down there. Also probably worthwhile rebasing changes from ChemAxon (we
have similar  changes at NextMove too - basically to do with how the code
is loaded).

The modified source, that we use in our program to locate and download
> dlls, is available here
> <http://onlinelibrarystatic.wiley.com/marvin/help/FF/attachments/21496048/21430293.zip>
> .


Patch: https://github.com/cdk/cdk/pull/240/

John

On 4 October 2016 at 15:21, Egon Willighagen <egon.willigha...@gmail.com>
wrote:

> I think this is important for Bioclipse too...
>
> -- Forwarded message --
> From: John M <john.wilkinson...@gmail.com>
> Date: Tue, Oct 4, 2016 at 4:15 PM
> Subject: Re: [Cdk-user] InChI with \KET and \15T options from JAVA
> To: cdkuser <cdk-user@lists.sourceforge.net>
>
>
> Unfortunately this is a limitation of JNI-INCHI. I've recently added a
> work around to allow a timeout to be passed though and can do
> something similar with this. Sam Adams wrote JNI-InChI some years ago
> now and does need an updated, there's a new version of InChI out
> soon (supposedly) in which case Daniel (lowe) and myself will
> probably try and push a new JNIInChI version out. Will try tonight the
> work around in CDK.
>
> Cheers,
> John
>
> On 4 October 2016 at 11:38, Antoni Valencia <avalen...@prousresearch.com>
> wrote:
> >
> > Hi,
> >
> > I am trying to generate InChI with the \KET and \15T options from CDK
> (I'm using CDK from my Java program). It seems that the CDK interface does
> not support those options, and I am not sure that JNI-InChI does (the
> manual says that it does, but \KET \15T returns error "Unrecognised InChI
> option").
> >
> > What would be the easiest way to use those options to generate InChI
> from a JAVA program?
> >
> > Thanks in advance for your help
> > Antoni
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > Cdk-user mailing list
> > Cdk-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/cdk-user
> >
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
>
> --
> E.L. Willighagen
> Department of Bioinformatics - BiGCaT
> Maastricht University (http://www.bigcat.unimaas.nl/)
> Homepage: http://egonw.github.com/
> LinkedIn: http://se.linkedin.com/in/egonw
> Blog: http://chem-bla-ics.blogspot.com/
> PubList: http://www.citeulike.org/user/egonw/tag/papers
> ORCID: -0001-7542-0286
> ImpactStory: https://impactstory.org/u/egonwillighagen
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] InChI with \KET and \15T options from JAVA

2016-10-06 Thread John M
v2.0 will be a while off... 1.05 prerelease is out though:
http://www.inchi-trust.org/downloads105/


On 5 October 2016 at 10:47, Antoni Valencia <antoni.valen...@gmail.com>
wrote:

> Thanks a lot John!
>
> We are looking forward to see that InChI 2.0 (probably with better
> tautomer handling)
>
> Cheers!
> Antoni
>
> On Wed, Oct 5, 2016 at 10:13 AM, John M <john.wilkinson...@gmail.com>
> wrote:
>
>> Okay support added for 15T and KET options. Hopefully the new version of
>> InChI is released soon and I can rebuild JNI-InChI and push these patches
>> down there. Also probably worthwhile rebasing changes from ChemAxon (we
>> have similar  changes at NextMove too - basically to do with how the code
>> is loaded).
>>
>> The modified source, that we use in our program to locate and download
>>> dlls, is available here
>>> <http://onlinelibrarystatic.wiley.com/marvin/help/FF/attachments/21496048/21430293.zip>
>>> .
>>
>>
>> Patch: https://github.com/cdk/cdk/pull/240/
>>
>> John
>>
>> On 4 October 2016 at 15:21, Egon Willighagen <egon.willigha...@gmail.com>
>> wrote:
>>
>>> I think this is important for Bioclipse too...
>>>
>>> -- Forwarded message --
>>> From: John M <john.wilkinson...@gmail.com>
>>> Date: Tue, Oct 4, 2016 at 4:15 PM
>>> Subject: Re: [Cdk-user] InChI with \KET and \15T options from JAVA
>>> To: cdkuser <cdk-user@lists.sourceforge.net>
>>>
>>>
>>> Unfortunately this is a limitation of JNI-INCHI. I've recently added a
>>> work around to allow a timeout to be passed though and can do
>>> something similar with this. Sam Adams wrote JNI-InChI some years ago
>>> now and does need an updated, there's a new version of InChI out
>>> soon (supposedly) in which case Daniel (lowe) and myself will
>>> probably try and push a new JNIInChI version out. Will try tonight the
>>> work around in CDK.
>>>
>>> Cheers,
>>> John
>>>
>>> On 4 October 2016 at 11:38, Antoni Valencia <avalen...@prousresearch.com>
>>> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am trying to generate InChI with the \KET and \15T options from CDK
>>> (I'm using CDK from my Java program). It seems that the CDK interface does
>>> not support those options, and I am not sure that JNI-InChI does (the
>>> manual says that it does, but \KET \15T returns error "Unrecognised InChI
>>> option").
>>> >
>>> > What would be the easiest way to use those options to generate InChI
>>> from a JAVA program?
>>> >
>>> > Thanks in advance for your help
>>> > Antoni
>>> >
>>> > 
>>> --
>>> > Check out the vibrant tech community on one of the world's most
>>> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> > ___
>>> > Cdk-user mailing list
>>> > Cdk-user@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/cdk-user
>>> >
>>>
>>>
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> ___
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>>>
>>>
>>> --
>>> E.L. Willighagen
>>> Department of Bioinformatics - BiGCaT
>>> Maastricht University (http://www.bigcat.unimaas.nl/)
>>> Homepage: http://egonw.github.com/
>>> LinkedIn: http://se.linkedin.com/in/egonw
>>> Blog: http://chem-bla-ics.blogspot.com/
>>> PubList: http://www.citeulike.org/user/egonw/tag/papers
>>> ORCID: -0001-7542-0286
>>> ImpactStory: https://impactstory.org/u/egonwillighagen
>>>
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered IGenerator when in jar

2016-08-23 Thread John M
@cdkuser list - resolved due to downstream project including the CDK 1.5.11.

Regards,
John W May
john.wilkinson...@gmail.com

On 23 August 2016 at 09:37, John M <john.wilkinson...@gmail.com> wrote:

> Nothing odd there... do you have the projected hosted? If not, are you
> able to send the zip just to me? Pretty sure I can work out what's
> interfering but difficult remotely.
>
> Could maybe also try the snapshot build?
>
> Repository: *https://oss.sonatype.org/content/repositories/snapshots/
> <https://oss.sonatype.org/content/repositories/snapshots/>*
> Version: *1.5.14-SNAPSHOT*
> ​
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered IGenerator when in jar

2016-08-23 Thread John M
Nothing odd there... do you have the projected hosted? If not, are you able
to send the zip just to me? Pretty sure I can work out what's interfering
but difficult remotely.

Could maybe also try the snapshot build?

Repository: *https://oss.sonatype.org/content/repositories/snapshots/
*
Version: *1.5.14-SNAPSHOT*
​
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] DepictionGenerator - unregistered IGenerator when in jar

2016-08-22 Thread John M
Okay, how are you interacting with the depiction generator?

John

Regards,
John W May
john.wilkinson...@gmail.com

On 22 August 2016 at 14:37, Staffan Arvidsson <staffan.arvids...@gmail.com>
wrote:

> Hi John,
>
> I'm not using any other depiction-depending stuff in the other projects
> that I've pulled in the jar-file in. Created a empty project and just
> pulled in a fatjar of the first project (so there should not be any
> different versions lying around), still the same problem..
>
> Here's the output for mvn dependency:tree;
>
> [INFO] se.uu.farmbio:PDFGenerator:jar:0.0.1-SNAPSHOT
> [INFO] +- org.openscience.cdk:cdk-depict:jar:1.5.13:compile
> [INFO] |  +- org.openscience.cdk:cdk-renderextra:jar:1.5.13:compile
> [INFO] |  |  +- javax.vecmath:vecmath:jar:1.5.2:compile
> [INFO] |  |  +- org.openscience.cdk:cdk-interfaces:jar:1.5.13:compile
> [INFO] |  |  +- org.openscience.cdk:cdk-core:jar:1.5.13:compile
> [INFO] |  |  +- org.openscience.cdk:cdk-standard:jar:1.5.13:compile
> [INFO] |  |  \- org.openscience.cdk:cdk-render:jar:1.5.13:compile
> [INFO] |  +- org.openscience.cdk:cdk-renderawt:jar:1.5.13:compile
> [INFO] |  |  \- com.google.guava:guava:jar:17.0:compile
> [INFO] |  +- org.openscience.cdk:cdk-renderbasic:jar:1.5.13:compile
> [INFO] |  +- org.openscience.cdk:cdk-smiles:jar:1.5.13:compile
> [INFO] |  |  +- uk.ac.ebi.beam:beam-core:jar:0.9.1:compile
> [INFO] |  |  +- uk.ac.ebi.beam:beam-func:jar:0.9.1:compile
> [INFO] |  |  +- org.openscience.cdk:cdk-ioformats:jar:1.5.13:compile
> [INFO] |  |  +- org.openscience.cdk:cdk-io:jar:1.5.13:compile
> [INFO] |  |  |  +- xpp3:xpp3:jar:1.1.4c:compile
> [INFO] |  |  |  \- org.openscience.cdk:cdk-atomtype:jar:1.5.13:compile
> [INFO] |  |  \- org.openscience.cdk:cdk-valencycheck:jar:1.5.13:compile
> [INFO] |  +- org.openscience.cdk:cdk-smarts:jar:1.5.13:compile
> [INFO] |  |  \- org.openscience.cdk:cdk-isomorphism:jar:1.5.13:compile
> [INFO] |  +- org.openscience.cdk:cdk-sdg:jar:1.5.13:compile
> [INFO] |  +- org.openscience.cdk:cdk-silent:jar:1.5.13:compile
> [INFO] |  +- org.freehep:freehep-graphicsio-svg:jar:2.4:compile
> [INFO] |  |  +- org.freehep:freehep-graphics2d:jar:2.4:compile
> [INFO] |  |  |  \- junit:junit:jar:4.10:compile
> [INFO] |  |  | \- org.hamcrest:hamcrest-core:jar:1.1:compile
> [INFO] |  |  +- org.freehep:freehep-graphicsio:jar:2.4:compile
> [INFO] |  |  |  \- org.freehep:freehep-io:jar:2.2.2:compile
> [INFO] |  |  +- org.freehep:freehep-graphicsio-tests:jar:2.4:compile
> [INFO] |  |  \- org.freehep:freehep-graphicsbase:jar:2.4:compile
> [INFO] |  \- org.freehep:freehep-graphicsio-pdf:jar:2.4:compile
> [INFO] +- org.javatuples:javatuples:jar:1.2:compile
> [INFO] +- com.itextpdf:itextpdf:jar:5.5.9:compile
> [INFO] \- org.apache.directory.studio:org.apache.commons.io:jar:2.4:
> compile
> [INFO]\- commons-io:commons-io:jar:2.4:compile
>
> Regards,
> Staffan
>
> 2016-08-22 15:00 GMT+02:00 John M <john.wilkinson...@gmail.com>:
>
>> Hi Staffan,
>>
>> RendererModel$Padding is a global option: https://github.com/cdk
>> /cdk/blob/master/display/render/src/main/java/org/openscienc
>> e/cdk/renderer/RendererModel.java#L106
>>
>> Could you possibly have an old version of the RendererModel lying
>> around? using JChemPaint.
>>
>> Since you're using maven, can you run:
>>   $ mvn dependency:tree
>>
>> And list the output.
>>
>> J
>>
>> 
>> --
>>
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>>
>
> 
> --
>
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Complex Molecule Rendering

2016-08-22 Thread John M
Steve,

You can do this now, no reorganization. Just double checking, you're
comping from SMILES right? If you only care about getting an image and not
the layout skip the StructureDiagramGenerator entirely.

> SmilesParser   smipar = new 
> SmilesParser(SilentChemObjectBuilder.getInstance());
> IAtomContainer mol= 
> smipar.parseSmiles("[Cu+].CC#N.CC#N.CC#N.CC#N.F[P-](F)(F)(F)(F)F");
> DepictionGenerator dg = new DepictionGenerator().withAtomColors();
> dg.depict(mol).writeTo("~/Tetrakis(acetonitrile)copper(I) 
> hexafluorophosphate.png");
>
> John
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Merge molecules

2016-11-26 Thread John M
My mistake, the method add() already does what you need... just can be more
efficient.

IAtomContainer a;
IAtomContainer b;
a.add(b);

John


On 26 November 2016 at 16:56, John M <john.wilkinson...@gmail.com> wrote:

> No convenience method, curiously addAtom() does a unique check (so that's
> safe but inhibits the common case) but addBond(), etc doesn't.
>
> I'm actually going to update the add(IAtomContainer) method to do what you
> need...
>
> John
>
> On 26 November 2016 at 16:39, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> Given 2 molecules that have potentially overlapping subgraphs, is there
>> a simple way to merge into a single structure?
>>
>> Of course there could potentially be multiple overlapping subgraphs so I
>> suppose you would want to generate merged structures for each one.
>>
>> Tim
>>
>>
>> 
>> --
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Merge molecules

2016-11-26 Thread John M
Ahh okay, merge via MCS. Yes you'll need to do that on your own,
UniversalIsomorphismTester should help or perhaps something in the SMSD -
but as you know NP-Complete so not generally something you want to be
doing.

John
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] molecule fragments

2016-11-24 Thread John M
Hi Tim,

You've already used it... see message from 28 Sep. Documentation is out of
date (MoleculeSet was deleted) but essentially -
http://cdk.github.io/cdk/1.5/docs/api/index.html?org/openscience/cdk/graph/ConnectivityChecker.html

John

On 24 November 2016 at 15:04, Tim Dudgeon  wrote:

> I'm sure this is easy, but I can't find it.
>
> How to break a molecule onto its fragments when it is composed of
> multiple disconnected parts. e.g. the main molecule and its salt.
> I was expecting to find something like a
>
> IAtomContainer[] getFragments();
>
> method in IAtomContainer.
>
> Tim
>
>
> 
> --
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
--
___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


[Cdk-user] CDK 1.5.14 Release

2016-10-12 Thread John M
Been live for a couple of days but took a while to write the release notes:

https://github.com/cdk/cdk/wiki/1.5.14-Release-Notes
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Free QSAR service powered by the CDK

2017-01-03 Thread John M
Looks cool. Any chance of updating the depictions?

[image: Inline images 3]
That's the old code and the renderer that didn't but hydrogens on the atoms
by default.

John

On 3 January 2017 at 12:08, Martin Gütlein  wrote:

> Hi,
>
> Based on the awesome CDK, we built a free QSAR web-service to predict
> chemical compounds:
> http://coffer.informatik.uni-mainz.de
>
> Please give it a try if you like.
>
> Kind regards (and sorry for the shameless ad),
> Martin Gütlein
>
> P.S.: The corresponding paper can be found here:
> http://jcheminf.springeropen.com/articles/10.1186/s13321-016-0173-z
>
> --
>
> Dr. Martin Gütlein
> Phone:
> +49 (0)6131 39 23336 (office)
> +49 (0)177 623 9499 (mobile)
> Email:
> guetl...@uni-mainz.de
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Free QSAR service powered by the CDK

2017-01-03 Thread John M
For comparison:
[image: Inline images 1]

On 3 January 2017 at 12:13, John M <john.wilkinson...@gmail.com> wrote:

> Looks cool. Any chance of updating the depictions?
>
> [image: Inline images 3]
> That's the old code and the renderer that didn't but hydrogens on the
> atoms by default.
>
> John
>
> On 3 January 2017 at 12:08, Martin Gütlein <guetl...@posteo.de> wrote:
>
>> Hi,
>>
>> Based on the awesome CDK, we built a free QSAR web-service to predict
>> chemical compounds:
>> http://coffer.informatik.uni-mainz.de
>>
>> Please give it a try if you like.
>>
>> Kind regards (and sorry for the shameless ad),
>> Martin Gütlein
>>
>> P.S.: The corresponding paper can be found here:
>> http://jcheminf.springeropen.com/articles/10.1186/s13321-016-0173-z
>>
>> --
>>
>> Dr. Martin Gütlein
>> Phone:
>> +49 (0)6131 39 23336 (office)
>> +49 (0)177 623 9499 (mobile)
>> Email:
>> guetl...@uni-mainz.de
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> ___
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Free QSAR service powered by the CDK

2017-01-03 Thread John M
You should just be able to replace BasicAtomGenerator and
BasicBondGenerator with StandardGenerator in your existing code and keep
your highlighting.

It's minimal effort to add a new highlight style, but even with the high
level API you can get pretty close. Code:
https://gist.github.com/johnmay/9d144ccf04745701614a15909abb
[image: Inline images 1]
Also not sure I like your crop option - it's misleading maybe do something
like this:

[image: Inline images 2]
John


On 3 January 2017 at 12:27, Martin Gütlein <guetl...@posteo.de> wrote:

> Hi John,
>
> The depiction I am using includes some custom highlighting of matched atom
> neighborhoods and cropping around the matches. E.g. here:
> http://coffer.informatik.uni-mainz.de/depictMatch?smiles=
> C1%5BC%40H%5D%28%5BC%40%40H%5D%28OC2%3DCC%28%3DCC%28%
> 3DC21%29O%29O%29C3%3DCC%28%3DC%28C%3DC3%29O%29O%29O=
> 150=3,4,5,9=true=true=true
>
> This is why I did not use the new DepictionGenerator yet, because I
> thought it might require some effort to change the code. But I will keep
> this in mind.
>
> Martin
>
>
> Am 03.01.2017 um 13:13 schrieb John M:
>
> For comparison:
> [image: Inline images 1]
>
> On 3 January 2017 at 12:13, John M <john.wilkinson...@gmail.com> wrote:
>
>> Looks cool. Any chance of updating the depictions?
>>
>> [image: Inline images 3]
>> That's the old code and the renderer that didn't but hydrogens on the
>> atoms by default.
>>
>> John
>>
>> On 3 January 2017 at 12:08, Martin Gütlein < <guetl...@posteo.de>
>> guetl...@posteo.de> wrote:
>>
>>> Hi,
>>>
>>> Based on the awesome CDK, we built a free QSAR web-service to predict
>>> chemical compounds:
>>> http://coffer.informatik.uni-mainz.de
>>>
>>> Please give it a try if you like.
>>>
>>> Kind regards (and sorry for the shameless ad),
>>> Martin Gütlein
>>>
>>> P.S.: The corresponding paper can be found here:
>>> http://jcheminf.springeropen.com/articles/10.1186/s13321-016-0173-z
>>>
>>> --
>>>
>>> Dr. Martin Gütlein
>>> Phone:
>>> +49 (0)6131 39 23336 <%2B49%20%280%296131%2039%2023336> (office)
>>> +49 (0)177 623 9499 <%2B49%20%280%29177%20623%209499> (mobile)
>>> Email:
>>> guetl...@uni-mainz.de
>>>
>>>
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! <http://sdm.link/slashdot>
>>> http://sdm.link/slashdot
>>> ___
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>>
>>
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user


Re: [Cdk-user] Get chain between ringsystems

2016-12-20 Thread John M
There isn't a utility function but it's quite simple. Get the fragments as
you are already doing, then for each fragment delete all the the cyclic
bonds. In practise it's more efficient to build a new molecule and only
include the acyclic bonds.

Code:
https://gist.github.com/johnmay/cd02b5e5d45dbd955a30f9e4f9d4bc39

Each output molecule has all the chains in it, you may want to split these
out using the ConnectivityChecker.

John

On 20 December 2016 at 12:38, Nikolas Glaser  wrote:

> Hello,
> i'm new to mailinglists so i'm not sure if my first mail is received.
> I wrote a class which uses the murckofragmenter to create fragments of
> molecules. Now I need the possibility to get the chain between to
> ringsystems as fragment.
> Is it possible to realize it with the murckofragmenter or is there another
> class in the cdk which i can use? After hours of research I could not find
> a solution.
> Does anyone have a idea how it is possible to realize?
> I am very new in the bio/cheminformatics and in using the cdk so I am
> happy for every advise!
>
> Thanks.
>
> Kind regards
> Nikolas Glaser
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> ___
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel___
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user