Re: [Cdk-user] Writing V3000 format

2017-02-06 Thread John Mayfield
IIRC the output is internally buffered, you're calling flush but it won't do anything. Try closing the files to force the flush. try (MDLV3000Writer mdlw = new MDLV3000Writer(System.out)) { mdlw.write(mol); } You can also manually buffer your output: StringWriter writer2 = new

Re: [Cdk-user] 'neutralizing' a molecule

2017-02-17 Thread John Mayfield
In general you shouldn't use InChI for storing (i.e. reading structures) it's unfortunate they made it possible. It is an identifier != exchange format, see Talk form Steve , Slide 8. That being said you can strip the salts and push it back

Re: [Cdk-user] 'neutralizing' a molecule

2017-02-18 Thread John Mayfield
InChI's. > > The Java code you linked to is handy - what license is it available under? > if feasible, I'd like to include it in the rcdk package > > On Fri, Feb 17, 2017 at 5:38 PM, John Mayfield < > john.wilkinson...@gmail.com> wrote: > >> In general you shouldn't use

Re: [Cdk-user] 'neutralizing' a molecule

2017-02-18 Thread John Mayfield
Oh and need to watch out for cases like. *[N+](=O)[O-] J On 18 February 2017 at 09:43, Egon Willighagen <egon.willigha...@gmail.com> wrote: > > I am also interested in implementing this in Bioclipse... > > Egon > > On Sat, Feb 18, 2017 at 10:12 AM, John Mayfield < &g

Re: [Cdk-user] MurckoFragmenter infinity loop

2017-01-11 Thread John Mayfield
Well It's not that big a molecule. I can't remember the exact number but we can write SMILES for proteins of up to around 1000 AAs. With the correct algorithm It should be sublinear time to get the framework... however the fragments and uniquifiing of those would take a while. Unfortunately it

Re: [Cdk-user] Count fragment in molecule

2017-01-05 Thread John Mayfield
You can find more documentation on that class here: http://cdk.github.io/cdk/1.5/docs/api/index.html On 5 January 2017 at 14:57, Nikolas Glaser <glase...@gmail.com> wrote: > Ah great, that was what i hoped to find. > Thanks a lot for the fast answer! > Niko > > John May

Re: [Cdk-user] Count fragment in molecule

2017-01-05 Thread John Mayfield
Niko, I do not need a complete code, just some information what i can use for it. > I want to try it by myself to learn more about cdk. It's a one liner... so I'm just going to give the answer: int count = Pattern.findSubstructure(frag).matchAll(mol).countUnique(); John On 5 January 2017 at

Re: [Cdk-user] Questions about the CDK 1.5.14 (JDK 1.8.0_121, maven 3.3.9) and the source code of calculateBCUT.java

2017-03-13 Thread John Mayfield
Hi, Yes your changes look correct. Unfortunately the API changed a lot between 1.4 and 1.5. The true/false specifies whether to calculate aromaticity:

Re: [Cdk-user] General Question to method getAtomNumber(IAtom atom) of IAtomContainer

2017-04-07 Thread John Mayfield
HI Niko, If getAtomNumber works like an array indexOf and does reference equality. I'm a bit confused by your description but I think what your trying to do is find a hydroxy in CHEMBL501674? In general you need to find a substructure, https://en.wikipedia.org/wiki/Subgraph_isomorphism_problem.

[Cdk-user] NCDK .NET Port of CDK

2017-07-10 Thread John Mayfield
Hi All, If you're interested in a .NET port of CDK please check out NCDK ( https://github.com/kazuyaujihara/NCDK). It's also now linked from the homepage. The author has done a great job and found some issues with the Java which has feed back an improved the Java version too. Cheers, John

Re: [Cdk-user] Atom Signatures with stereo-info

2017-07-21 Thread John Mayfield
Yes, Use the CircularFingerprinter, it encodes stereochemistry, the relevant method is CircularFingerprinter .getFP() which will give you the atoms involved and the hashed value. IIRC the

Re: [Cdk-user] Atom Signatures with stereo-info

2017-07-21 Thread John Mayfield
orrectly? > Currently all our code requires the Signatures to be Strings. Would require > a large rewrite to get this to work for us. Because the javadoc says that > method getRawFingerprint is not correct so I should not use it? (Even > though this would be something more l

Re: [Cdk-user] Atom Signatures with stereo-info

2017-07-21 Thread John Mayfield
contains(tc.getLigands()[0]) && aset.contains(tc.getLigands()[1]) && aset.contains(tc.getLigands()[2]) && aset.contains(tc.getLigands()[3])) part.addStereoElement(tc); } } return SmilesGenerator.isomeric().create(part); } On 21 Jul

Re: [Cdk-user] Bug in IteratingSDFReader in 2.0 cdk?

2017-07-24 Thread John Mayfield
Which version did you generate it with? There should be a blank line after M END? John On 24 July 2017 at 11:03, Staffan Arvidsson wrote: > I just bumped the CDK version in our code repo (from 1.5.13) and found > that some of my tests are now failing. The issue is

Re: [Cdk-user] Bug in IteratingSDFReader in 2.0 cdk?

2017-07-24 Thread John Mayfield
> M V30 8 C .0 .0 0 0 > M V30 9 C .0 .0 0 0 > M V30 10 C .0 .0 0 0 > M V30 11 C .0 .0 0 0 > M V30 END ATOM > M V30 BEGIN BOND > M V30 1 1 1 2 > M V30 2 1 2 3 > M V30 3 2 3 4 > M V30 4 2 3 5 > M V30 5 1 2 6 > M V30 6 2 6 7 > M V30 7 1 7 8 >

Re: [Cdk-user] Strange behaviour of AtomContainer.getConnectedAtomsList()

2017-04-26 Thread John Mayfield
How are you generating the depiction (p.s. you're losing stereochemistry somewhere)? Speculating - but if you generate a SMILES the output order may (normally will) be different from the input. When generating a SMILES you can access the atom output order but it's easier just to label the atoms

[Cdk-user] n way-bonds

2017-04-27 Thread John Mayfield
Hi All, I was wondering does anyone use n-way bonds in CDK (a bond with more than two atoms)? IAtom atom1 = object.getBuilder().newInstance(IAtom.class, "C"); > IAtom atom2 = object.getBuilder().newInstance(IAtom.class, "O"); > IAtom atom3 = object.getBuilder().newInstance(IAtom.class, "C"); >

Re: [Cdk-user] n way-bonds

2017-04-27 Thread John Mayfield
preoccupied with whether or not they could, they > didn’t stop to think if they should* By argument John On 27 April 2017 at 09:36, Egon Willighagen <egon.willigha...@gmail.com> wrote: > > > On Thu, Apr 27, 2017 at 9:54 AM, John Mayfield < > john.wilkinson...@gmail.com> wrote: >

Re: [Cdk-user] ungraceful fail of MDE descriptor for long alkyl chains

2017-08-06 Thread John Mayfield
In fact even better please submit a PR since you've identified and fixed the problem. On 6 August 2017 at 16:43, John Mayfield <john.wilkinson...@gmail.com> wrote: > Please post an issue: github.com/cdk/cdk > > > On 5 August 2017 at 01:50, Andrei Kazakov <and4li...@gmail.c

[Cdk-user] CDK 1.5.15

2017-05-02 Thread John Mayfield
Hi All, I've done a CDK 1.5.15 release ahead of the imminent v2.0 release. Release notes should follow later this week. There was a regression in 1.5.14 when passing options to the InChI generation this has been resolved along with some decent performance gains in SMILES/SDF reading. The

Re: [Cdk-user] Title line for MDL formats

2017-06-26 Thread John Mayfield
t a property named cdk:Title is > output with a value of "null". > For mol2 the title is set and output correctly, but the property cdk:Title > is also output. > This is with version 1.5.14. > > Tim > > > > On 25/06/2017 15:40, John Mayfield wrote: > &

Re: [Cdk-user] Title line for MDL formats

2017-06-26 Thread John Mayfield
some other commit around then for example null is now blank. John On 26 June 2017 at 09:51, John Mayfield <john.wilkinson...@gmail.com> wrote: > Use version 2.0 :-) > > On 26 June 2017 at 08:31, Tim Dudgeon <tdudgeon...@gmail.com> wrote: > >> Here's what I see:

Re: [Cdk-user] Maven Artifact Overview

2017-05-23 Thread John Mayfield
> > I currently try to get an overview over the existing different maven > atifacts that the cdk provides. However, I am a bit overwhelmed by the > sheer amount of different artifacts. Is there a good overview or > introduction that explains, which features are found in which artifact and > where

Re: [Cdk-user] CDK - issue with stereochemistry

2017-06-07 Thread John Mayfield
have > brought the confusion. This just means the issue in my code might come from > somewhere else. > > Thanks, > Yannick > > On Tue, Jun 6, 2017 at 3:25 AM, John Mayfield <john.wilkinson...@gmail.com > > wrote: > >> Hi Yannick, >> >> Ple

Re: [Cdk-user] CDK - issue with stereochemistry

2017-06-06 Thread John Mayfield
Hi Yannick, Please, please, please don't "add hydrogens" like this! The hydrogens are already there and don't need to be added - this is just wasted effort and worst of all the atom typing *might* change your structures valence!! If for some reason you want to make hydrogens explicit just call

[Cdk-user] CDK 2.0 Release

2017-06-06 Thread John Mayfield
Hi All, Been live for almost two weeks but 2.0 is released. As always, available on Maven, GitHub, and SF. Release (GitHub Bundle Jar) Release Notes John

[Cdk-user] Request for comment: AtomContainer2

2017-09-14 Thread John Mayfield
Hi All, I've been working on a patch since March that greatly enhances the CDK structure manipulation both in terms of usability and performance. It is essentially backwards compatible with the current API (barring some minor caveats) but to minimise issues I was planning a gradual introduction

Re: [Cdk-user] It is possible to set timeout in search?

2017-10-11 Thread John Mayfield
Hi Charo, It is possible to avoid this? InChI or canonical SMILES is the correct way to check identity. It is possible to set a timeout in the search? I've contemplated setting a timeout (or more realistically a state counter) but I've not encountered any molecules where it's needed. If you

[Cdk-user] CDK Depict is Moving

2017-09-26 Thread John Mayfield
Hi All, If you're are using the publicly hosted CDK Depict http://cdkdepict-openchem.rhcloud.com please be aware that the service will no longer be available from the 30th Sep 2017. I have set up a new instance on my own website available at http://www.simolecule.com/cdkdepict - alternatively if

[Cdk-user] CDK Release 2.1

2017-12-15 Thread John Mayfield
Hi All, CDK v2.1 has been released and includes improved. AtomContainer and Stereochemistry Implementations/APIs: https://github.com/cdk/cdk/wiki/2.1-Release-Notes *Important:* the new AtomContainer APIs may have some unexpected behaviour on existing codebases (see

Re: [Cdk-user] Reg: Editing linear Chain alkane (Heptane)

2017-10-30 Thread John Mayfield
ssues, but I thought it should work for small molecules? > > The SMILES for my assembled molecules (NewHeptane) = *CC[CH3]C[CH3]CC* > > Thank you for your interest in this post. > > On Mon, Oct 30, 2017 at 11:39 AM, John Mayfield < > john.wilkinson...@gmail.com> wr

Re: [Cdk-user] Reg: Editing linear Chain alkane (Heptane)

2017-10-30 Thread John Mayfield
lBuilder3D builder3d = ModelBuilder3D.getInstance(m.getBuilder()); > IAtomContainer newHeptane = builder3d.generate3DCoordinates(m, false); > > Any insights in the right direction are highly appreciated. Thank you. > > > > On Sat, Oct 28, 2017 at 5:38 PM, John Mayfield < > john.wi

Re: [Cdk-user] Question about 3D SDF file from SMILES string

2018-05-20 Thread John Mayfield
There is some support in the *builder3d *modules but there are better options out there. One day I'll find some time to update that code but depending on how many structure you need to convert the NCI resolver uses Corina (via CACTVS) IIRC.

Re: [Cdk-user] Question about 3D SDF file from SMILES string

2018-05-20 Thread John Mayfield
; Egon > > On Sun, May 20, 2018 at 4:20 PM Xuan Cao <danis.cao.x...@gmail.com> wrote: > >> Hi John, >> >> Thank you for your reply! I will look into that! >> >> BTW, the link is not working (404). >> >> Xuan >> >> On 20 M

Re: [Cdk-user] aromatic bonds depicted as any bonds

2018-01-03 Thread John Mayfield
I'll answer these back to front as the second one is much simpler to answer: 1. Why the inconsistency in how the different parsers/readers behave? Is > this documented anywhere? > 2. Is it possible to have the aromatic bonds depicted as proper aromatic > bonds? Answer 2: I don't think the

Re: [Cdk-user] InChiKey changing Upon simple conversion of implicit hydrogens

2018-02-07 Thread John Mayfield
Which version are you using, works okay for me on 2.2-SNAPSHOT and not much should have changed their since a few years: public static void main(String[] args) throws CDKException { String smi = "C[C@]12CC[C@H]3[C@@H](CCC4=CC(O)=CC=C34)[C@@H]1CC[C@@]2(O)C#C";

Re: [Cdk-user] CDK Release 2.1

2017-12-28 Thread John Mayfield
repositories as there is a dependency on > uk.ac.ebi.beam:beam-core:1.1-SNAPSHOT that is not present in those repos. > > To run a maven or gradle based build using CDK 2.1 you should also include > the OSSRH repo: https://oss.sonatype.org/content/repositories/snapshots > Tim > > > On 15/12/17 21

Re: [Cdk-user] CDK Release 2.1

2017-12-28 Thread John Mayfield
Okay I've done a 2.1.1 patch release to rectify it. Deployed and should be synced with central shortly. On 28 December 2017 at 18:48, John Mayfield <john.wilkinson...@gmail.com> wrote: > Doh, That'll teach me to rush before Christmas, Will push out a 2.1.1 > patch release to fix tha

Re: [Cdk-user] aromatic bonds depicted as any bonds

2018-01-03 Thread John Mayfield
notation that ChemAxon uses to depict this type of query bond. But I guess > that's not an absolute standard. > > On 03/01/18 14:03, John Mayfield wrote: > > I'll answer these back to front as the second one is much simpler to > answer: > > 1. Why the inconsistency in how the diffe

Re: [Cdk-user] lots of debug output when using CDK 2.2-SNAPSHOT

2018-08-06 Thread John Mayfield
The output is coming from *DynamicFactory*, are you including log4j on your classpath (watch out for cdk-bundle), if so make sure it picks up your config and not one from another project (e.g. jena/jni-inchi). You can either exclude *log4j* or configure it to suite your needs. On Sat, 4 Aug 2018

Re: [Cdk-user] lots of debug output when using CDK 2.2-SNAPSHOT

2018-08-06 Thread John Mayfield
I've removed *cdk-log4j* from the bundle, see if that has any impact. https://github.com/cdk/cdk/commit/6af1ad94638dc11874fa85006302b92a786f5d7b On Mon, 6 Aug 2018 at 08:24, John Mayfield wrote: > The output is coming from *DynamicFactory*, are you including log4j on > your classpath

Re: [Cdk-user] SMARTSQueryTool aromaticity

2018-08-27 Thread John Mayfield
This is because you are using the CDK aromaticity model whilst in this case the Daylight model is the correct one. It's "correct" because Daylight created SMARTS so anything to do with SMARTS should preferably be using this model. If all toolkits did this, SMARTS patterns (and SMIRKS transforms)

Re: [Cdk-user] Aligning Reaction using Fixed Substructure

2018-09-07 Thread John Mayfield
Yes, reactions are aligned left to right automatically when atom-maps are present. For example: [image: image.png] (CDK Depict

Re: [Cdk-user] InChi and Docker

2018-09-10 Thread John Mayfield
Unlikely to work in alpine, have you tried ubuntu/debian slim? John On Mon, 10 Sep 2018 at 18:16, Maria Sorokina wrote: > Hi, > > I developed an app using CDK, and in particular it’s InChi Generator. It > runs perfectly with IntelliJ, and as a jar on MacOS and on CentOS. I wanted > to make it

Re: [Cdk-user] InChi and Docker

2018-09-11 Thread John Mayfield
our help! > > Kind regards, > > > Maria Sorokina, PhD > Steinbeck Research Group > Analytical Chemistry - Cheminformatics and Chemometrics > Friedrich-Schiller-University Jena, Germany > http://cheminf.uni-jena.de > > Le 11 sept. 2018 à 00:13, John Mayfield a > écr

Re: [Cdk-user] CDK functionality in Docker images (was: InChi and Docker)

2018-09-11 Thread John Mayfield
It doesn't use InChI :-). On Tue, 11 Sep 2018 at 16:43, Egon Willighagen wrote: > Anyway, I'm quite excited about the idea of a Docker for CDK > functionality... (well, excited it triggered here not so much I am entirely > sure this is a fantastic platform, but in our OpenRiskNet we use it for

Re: [Cdk-user] InChi and Docker

2018-09-11 Thread John Mayfield
gt; it here. Meanwhile, I’m still very open to any suggestion! > > Kind regards, > > Maria Sorokina, PhD > Steinbeck Research Group > Analytical Chemistry - Cheminformatics and Chemometrics > Friedrich-Schiller-University Jena, Germany > http://cheminf.uni-jena.de > >

Re: [Cdk-user] Aligning Reaction using Fixed Substructure

2018-10-11 Thread John Mayfield
Nice, For historical reasons, CDK uses unit bond length 1.5 instead of 1. Something to do with C-C bonds but that really only makes sense for 3D. Rescale it like this: GeometryUtil.scaleMolecule(fixedSubstructure, 1.5/GeometryUtil.getBondLengthMedian(fixedSubstructure)); Also I presume you

[Cdk-user] CDK v2.2

2018-10-30 Thread John Mayfield
Dear CDK users, CDK 2.2 is now released and can be obtained from Maven central or the GitHub site. The full release notes provide details on the new features and changes. As noted in v2.1/v2.1.1

Re: [Cdk-user] CDK v2.2

2018-10-30 Thread John Mayfield
groupBracket > > java.lang.ClassCastException: java.util.ArrayList cannot be cast to > org.openscience.cdk.sgroup.SgroupBracket > > at > org.openscience.cdk.tools.manipulator.SgroupManipulator.copy(SgroupManipulator.java:108) > > at > org.openscience.cdk.AtomContain

Re: [Cdk-user] CDK v2.2

2018-10-30 Thread John Mayfield
On (2) you can also just remove all the Sgroup info, likely you're not even using it. mol.setProperty(CDKConstants.CTAB_SGROUPS, null); > On Tue, 30 Oct 2018 at 16:15, John Mayfield wrote: > 1) You can just include cdk-legacy and use the existing, but the > functionality was just a c

Re: [Cdk-user] CDK v2.2

2018-10-30 Thread John Mayfield
ishes, > > -Asad > > > > *From: *John Mayfield > *Date: *Tuesday, 30 October 2018 at 12:01 > *To: *cdkuser > *Subject: *[Cdk-user] CDK v2.2 > > > > Dear CDK users, > > > > CDK 2.2 is now released and can be obtained from Maven central or the >

Re: [Cdk-user] CDK v2.2

2018-10-30 Thread John Mayfield
.de> wrote: > > > On 30. Oct 2018, at 17:15, John Mayfield > wrote: > > > > 2) Looks like a bug, but you really really really should not be using > clone. > > You also say that in https://github.com/cdk/cdk/wiki/AtomContainer2, > which is a great guidance,

Re: [Cdk-user] Question on CDK and a small documentation

2018-10-29 Thread John Mayfield
Please use the *cdk-user* mailing (cc'd) for such questions in future. Other people than me can help, and if someone has the same question they'll get to see the answer too (it's also archived). Is there any possibilities to turn off the counter ion depiction in CDK and > can we use a just lines

Re: [Cdk-user] Question on CDK and a small documentation

2018-10-29 Thread John Mayfield
I am still curious why, this kind of dubious manipulation is how errors start propagating. Anyways I can only ask twice :-). These are not depiction options but you can achieve it by modifying the molecule. 1) I think what you're asking is to get the "parent" molecule. You should define a list of

Re: [Cdk-user] InChi and Docker [solved]

2018-09-14 Thread John Mayfield
Knew it was the JAR packaging, I did try to send the JAR file I has working in debain-slim but Gmail blocks JAR attachments. Interestingly I stopped using SpringBoot (for another reason I can't remember) a few years ago and use the TomCat (exec-war) plugin instead. Jetty also has a plugin which

Re: [Cdk-user] InChi and Docker

2018-09-11 Thread John Mayfield
Do you have a different machine to test on? Could also be a factor, alpine gave me a segfault (see attached) but slim works OK. [john@toaster jni-inchi-docker]$ more Dockerfile > FROM openjdk:8u171-slim > COPY smi2inchi.jar . John On Tue, 11 Sep 2018 at 16:23, John Mayfield wrote:

Re: [Cdk-user] can't get total exact mass after atom typing

2018-09-17 Thread John Mayfield
No but the isotopes are assigned by the isotope factory not the atom types. Always been this way. Isotopes.getInstance().configure(mol); However depends on what you want: *AtomContainer.getMolecularWeight(mol);* does not need atom typing or isotope configuring. It will be a different number to

Re: [Cdk-user] MCS detection

2018-09-17 Thread John Mayfield
A couple of options, a) Use the newer standalone version of SMSD, this is why the package is deprecated. We did try to integrate the newer version but it proved difficult and there were some test regressions. You can still use the deprecated one. b) Edmund Duesbury has some updated MCS algorithms

Re: [Cdk-user] CDK2.0 with python

2019-04-08 Thread John Mayfield
I thought there was a Cinfony version suing CDK 2+... but can't find it now or even the repo as google code no longer exists. CC'ing Noel. On Mon, 8 Apr 2019 at 07:52, Ganapati Natarajan wrote: > Dear all, > > I wish to use the CDK 2.0 from python. I noticed on the cinfony website > that the

Re: [Cdk-user] CDK2.0 with python

2019-04-08 Thread John Mayfield
nks. > > Ganapati > > On Mon, 8 Apr 2019 at 12:59, John Mayfield > wrote: > >> I thought there was a Cinfony version suing CDK 2+... but can't find it >> now or even the repo as google code no longer exists. CC'ing Noel. >> >> On Mon, 8 Apr 2019 at 07:52,

Re: [Cdk-user] How to add hydrogens with 3D coordinate?

2019-02-23 Thread John Mayfield
Unfortunately there is no easy way to do this ATM other then regeneration 3D coordinates and that support is pretty limited in CDK. Of course the question is then do you want minimised hydrogens or any old reasonably valid positions. As a first approximation you can set the hydrogen coordinates to

Re: [Cdk-user] Tow problems about the calculation of molecular weight

2019-02-14 Thread John Mayfield
As an aside we are thinking of simplifying this to a single API point *getMass(mol, opt) *where the option lets you choose what you want. The existing API points will still be valid but defer to this method. John On Thu, 14 Feb 2019 at 09:59, John Mayfield wrote: > Please note the correct

Re: [Cdk-user] Tow problems about the calculation of molecular weight

2019-02-14 Thread John Mayfield
Please note the correct way to get Molecular Weight is: AtomContainerManipulator.getMolecularWeight(mol); We are aware of the issue with the MolecularWeight descriptor - please see the issue tracker. On Thu, 14 Feb 2019 at 08:44, Stesycki, Manuel wrote: > Dear love_software0, > > i am

Re: [Cdk-user] Enantiomer generator?

2019-05-08 Thread John Mayfield
No there isn't and I'm struggling to think of a use-case so I'll first ask what's your actually end goal as there is likely a more efficient approach. For example testing if two compounds are enantiomers does not require enumeration. But if you really want to enumerate - I would just flip them as

Re: [Cdk-user] Stereochemistry is disregarded when creating SMILES from MOL-File

2019-07-16 Thread John Mayfield
Hi Sebastian, > I am using CDK version 1.4.17 That is a very old version and does not convert stereochemistry correctly. Essentially there wasn't data structures to represent it so it was store different for 0D (e.g. SMILES) vs 2D vs 3D. This will all fixed about 7 years ago :-). Latest release

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread John Mayfield
he "Visibility" option controls this, but the other answer is just don't set to zero on carbons? On Fri, 2 Aug 2019 at 12:09, Egon Willighagen wrote: > > > On Fri, Aug 2, 2019 at 11:28 AM John Mayfield > wrote: > >> Other option You can also use the old *BasicAto

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread John Mayfield
neighbors, RendererModel model) { return atom.getAtomicNumber() != 6; } }); On Fri, 2 Aug 2019 at 16:26, Tim Dudgeon wrote: > On 02/08/2019 15:42, John Mayfield wrote: > > 1.

Re: [Cdk-user] MCS and alignment

2019-08-15 Thread John Mayfield
sure right now how to approach it. > > CDK rendering is so beautiful! > > Tim > > 1. https://github.com/asad/SMSD/issues/9 > 2. https://github.com/asad/SMSD/issues/10 > > > On 14/08/2019 16:05, John Mayfield wrote: > > 2. Use SMSD or Edmund Duesbury's MCS code.

Re: [Cdk-user] depiction without stereochemistry

2019-08-20 Thread John Mayfield
Are you using the very latest release? I think it's an over site. Try bond.setDisplay(IBond.Display.Solid); On Tue, 20 Aug 2019 at 16:40, Tim Dudgeon wrote: > Hi, I'm wanting to depict a molecule without sterochemistry, but the > DepictionGenerator stubbornly seems to add it back. > What is

Re: [Cdk-user] Bug in MCS determination?

2019-08-28 Thread John Mayfield
Okay code is likely adding atoms/bonds in the wrong order, will fix it. On Tue, 27 Aug 2019 at 18:18, Tim Dudgeon wrote: > Hi John, > > Yes, turning off AtomContainer2 avoids the error. > > > On 27/08/2019 16:31, John Mayfield wrote: > > Hmm odd, in legacy so expected

Re: [Cdk-user] Bug in MCS determination?

2019-08-28 Thread John Mayfield
t problem it looks to be a no go as a solution. > > Would switching to the legacy classes in the org.openscience.cdk.smsd > package be an option or do I just need to wait for the problem to be fixed? > > > On 28/08/2019 08:15, John Mayfield wrote: > > Okay code is likely addi

Re: [Cdk-user] depiction without stereochemistry

2019-08-21 Thread John Mayfield
he bond's > display property gets reset to the chiral representation. > > The workaround is to make sure that 2D coordinates are present (e.g. using > StructureDiagramGenerator) and then set the display property. > > Tim > > > On 20/08/2019 17:31, John Mayfield wrote:

Re: [Cdk-user] Stereochemistry resolution

2019-07-30 Thread John Mayfield
No, it wasn't possible. They used different data structures so you could go to/from SMILES and to/from 2D Mol/CML but not from Mol to Smi or Smi to Mol. Please don't use 1.1.5 (I presume as there is no 1.15 version) it's 10+ years old. John On Tue, 30 Jul 2019 at 08:49, Wehner, Sebastian via

Re: [Cdk-user] Stereochemistry resolution

2019-07-30 Thread John Mayfield
Improvements after I believe it was 1.5.4+ https://github.com/cdk/cdk/wiki/1.5.4-Release-Notes#stereochemistry- On Tue, 30 Jul 2019 at 14:19, John Mayfield wrote: > Ah okay, in some versions of 1.5 it's supported. Which subversion are you > using? > > On Tue, 30 Jul 2019 at 0

Re: [Cdk-user] Stereochemistry resolution

2019-07-30 Thread John Mayfield
gt; > Sebastian > > > > *From:* John Mayfield > *Sent:* Tuesday, July 30, 2019 10:27 AM > *To:* Wehner, Sebastian > *Cc:* cdk-user@lists.sourceforge.net > *Subject:* Re: [Cdk-user] Stereochemistry resolution > > > > No, it wasn't possible. They used diff

Re: [Cdk-user] controlling hydrogen display with DepictionGenerator

2019-08-02 Thread John Mayfield
It's not an option - and I would hesitant to add it as it's "at best ambiguous" (quoting Brecher's IUPAC :-)). Symyx/Accelrys/BioVia Draw like to hide the hydrogens by default which is where I think the acceptability crept in from. You right that for queries there's a use-case, but the depiction

Re: [Cdk-user] Stereochemistry is disregarded when creating SMILES from MOL-File

2019-07-17 Thread John Mayfield
answer and explanations. > > > > Sebastian > > > > *From:* John Mayfield > *Sent:* Tuesday, July 16, 2019 6:05 PM > *To:* Wehner, Sebastian > *Cc:* cdk-user@lists.sourceforge.net > *Subject:* Re: [Cdk-user] Stereochemistry is disregarded when creating > SMIL

Re: [Cdk-user] Reg: Reading Jmol generated SDF file using Iterating SDF reader cdk 1.5.8

2019-11-17 Thread John Mayfield
IIRC JMol was generating them incorrectly, Bob (JMol dev) patched it and we also updated our code to be more tolerant. Please try CDK 2.3 and if there is still an issue report via GitHub Issues. On Sun, 17 Nov 2019 at 09:50, Vinothkumar Mohanakrishnan wrote: > Dear Users, > > I would like to

Re: [Cdk-user] Smarts cast exception

2019-11-08 Thread John Mayfield
No problem, So essentially there are "molecules" and "queries". Molecules are things, queries match things. We can convert a molecule to a query by telling it what things we want to match. John On Fri, 8 Nov 2019 at 09:27, Stesycki, Manuel wrote: > Ok i looked up the Test class and did the

Re: [Cdk-user] Questions about the function "Addring"

2019-11-20 Thread John Mayfield
It's calculated differently because without it the rings get laid out on top of each other. Example case, you can reverse this commit: https://github.com/cdk/cdk/commit/6533533a95b5e9ca0d55d0d37ab5f048a25e88f7#diff-da65f1759b150e9510a643e017112b3f And see how it lays out the following.

Re: [Cdk-user] Questions about the function "placeSpiroRing" in RingPlacer.jave

2019-11-30 Thread John Mayfield
I already explained, you can have "spirodegree > 2" (i.e. degree > 4) in which case it lays things out on top of each other (incorrect). The num place two "nudge" is to make the bond lengths longer. Try commenting out the if conditions and use the SMILES I gave last time to see the effect:

Re: [Cdk-user] How can I use CDK on ia64 server using HP UX OS?

2019-12-02 Thread John Mayfield
Hi, Providing you don't try and get an InChI from OPSIN/CDK then everything else will work. Do you really need an InChI? If you really do need it then I think the best option would be to build the InChI library/executable yourself and then call out to it via system exec via a Molfile:

Re: [Cdk-user] Raw fingerprints impossible to calculate

2020-02-25 Thread John Mayfield
formatics and Chemometrics > Friedrich-Schiller-University Jena, Germany > http://cheminf.uni-jena.de > > Le 21 févr. 2020 à 19:31, John Mayfield a > écrit : > > Okay looking at it the Substructure fingerprint would be easy to adapt... > but it's not hard to just count

Re: [Cdk-user] Substructure search using ShortestPathFingerprinter

2020-02-25 Thread John Mayfield
ude candidates for a substructure > search in a database. They are also a means for determining the similarity > of chemical structures.". Perhaps it’s worth removing so that there are > no contradictions. > > чт, 20 февр. 2020 г. в 18:28, John Mayfield : > >> I've ad

Re: [Cdk-user] Substructure search using ShortestPathFingerprinter

2020-02-20 Thread John Mayfield
I've added a warning in the doc, there was already a warning on MACCS 166 keys. https://github.com/cdk/cdk/commit/82cb4f8d49283e117696f40d09538c70790a18fd On Thu, 20 Feb 2020 at 15:20, John Mayfield wrote: > *wrote :-) > > On Thu, 20 Feb 2020 at 15:20, John Mayfield > wrot

Re: [Cdk-user] Substructure search using ShortestPathFingerprinter

2020-02-20 Thread John Mayfield
Only *Fingerprinter* or *ExtendedFingerprint* obey this transitivity property. Relevant post I wrong in 2015: https://nextmovesoftware.com/blog/2015/02/16/for-every-fingerprint-optimisation-there-is-an-equal-and-opposite-fingerprint-deterioration/ On Thu, 20 Feb 2020 at 10:44, nicepeopleproject

Re: [Cdk-user] Raw fingerprints impossible to calculate

2020-02-21 Thread John Mayfield
ngerprints are binary in nature though so you would probably never want the RAW version. *getBitFingerprint()* it implemented always. John On Fri, 21 Feb 2020 at 09:34, John Mayfield wrote: > Hi Maria, > > Not all fingerprint support the "RAW" option and Count options. > > Jo

Re: [Cdk-user] Raw fingerprints impossible to calculate

2020-02-21 Thread John Mayfield
Hi Maria, Not all fingerprint support the "RAW" option and Count options. John On Fri, 21 Feb 2020 at 09:31, Maria Sorokina wrote: > Dear community, > > It is decidedly substructure search and fingerprinting period of the year! > > I want to create (to store) raw fingerprints of a range of

Re: [Cdk-user] Raw fingerprints impossible to calculate

2020-02-21 Thread John Mayfield
y > http://cheminf.uni-jena.de > > Le 21 févr. 2020 à 10:39, John Mayfield a > écrit : > > ... I do have some patches for an updated fingerprint API stack that would > also add this in to more places. Essentially it was added to the public API > but only implemented in a

Re: [Cdk-user] Raw fingerprints impossible to calculate

2020-02-21 Thread John Mayfield
effort to implement something I (or hopefully someone else) will ultimately rewrite in future. "Deprecated on arrival" I believe Egon has said before. On Fri, 21 Feb 2020 at 18:25, John Mayfield wrote: > What do you think the "raw" fingerprint is? Why would you expect it for

Re: [Cdk-user] How can I save a wavy bond in a file?

2020-04-01 Thread John Mayfield
Yes they are round tripped by MDL (BondStereo.UP_OR_DOWN) for sure, however could be a JChemPaint issue - and that's no longer actively developed. Corner-case but are you using a JChemPaint release or built one yourself? If you've mixed in a new version of CDK it may be tripped up with the new

Re: [Cdk-user] How can I save a wavy bond in a file?

2020-04-02 Thread John Mayfield
been > updated yet. > Anyway, must I write my own file format writer? I thought there would be a > serialization method of CDK/NCDK. : ) > > -- > John Mayfield > 2020-4-1 20:00 > Re: [Cdk-user] How can I save a wavy bond in a file? >

Re: [Cdk-user] atom typing without atom type name

2020-09-21 Thread John Mayfield
The SMILES parser nor other IO (maybe CML) will assign atom types for you - you need to do this yourself with: AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(methane); Atom types are an annotation on top of a molecule. There are different atom types we could assign - CDK atom types

Re: [Cdk-user] CDK in PyCharm IDE

2020-07-05 Thread John Mayfield
ld easy to use CDK right in > PyCharm/Python I now see that I will have to install it separately and use > the command line. > I guess I don’t know, is there command line functionality built into the > CDK jar file? > > Any advice much appreciated… > Stuart > > On Jun

Re: [Cdk-user] CDK in PyCharm IDE

2020-06-24 Thread John Mayfield
Hi Stuart, We have some small snippets here ( https://github.com/cdk/cdk/wiki/Toolkit-Rosetta) but most of our doc is geared towards having at least some familiarity with writing and using Java libraries. Saying you don't see a plugin in the IDE for CDK is like saying you don't see a petrol cap

Re: [Cdk-user] Wrong molecular formula?

2020-12-03 Thread John Mayfield
Hi Manual, Chris is right, unfortunately the ChemDraw export isn't quite correct. It is actually possible to represent multi-attach in V3000 but it's not used here. The more common problem is that there are simply a random bond into the middle of a ring. I've done a fair bit of work on ChemDraw

Re: [Cdk-user] How to install Chemistry development kit after installing apache-maven-3.6.3

2020-12-30 Thread John Mayfield
Sorry I misread your email and that you had the JAR downloaded, you do not need maven unless your project will use maven to build. You just need to add the JAR to the classpath. java -cp cdk-2.0.jar YourClassName > or in an IDE (e.g. Eclipse/IntelliJ) you would configure this from a menu option.

Re: [Cdk-user] Mol2 file to SMILES

2021-03-28 Thread John Mayfield
You should use the *CircularFingerprinter* for similarity. On Sun, 28 Mar 2021 at 08:39, Sub Jae Shin wrote: > To John Mayfield > > Hi, I found the drugbank id property from AtomContainer's getproperties > method, so that I could specify which atom container indicates which drug. &g

Re: [Cdk-user] Mol2 file to SMILES

2021-03-26 Thread John Mayfield
Do you have a mol2 file or a SMILES file? It's not clear. Mol2 support isn't great in the CDK mainly because it's more a compchem/modelling format than cheminformations which primarily use SMILES or MOLfile. Presume you know how to read line by line from a file here is an example from SMILES:

  1   2   >