Hi Kevin,
I’ve fixed this issue in the primary JChemPaint version -
https://github.com/jchempaint/jchempaint and deployed to the EBI Snapshot Repo.
Were you including the jchempaint-hotfix via maven? If so you can use the
snapshot version of this project instead. The dependency info is different.
groupId: org.openscience.jchemain
artifactId: jchempaint-app-jar
version: 3.4-SNAPSHOT
Hope this helps,
John
On Sep 30, 2014, at 4:20 PM, Kevin Lawson <klawson...@gmail.com> wrote:
> Hi John
>
> Yes, as you say:
> 'You should be able to load the SMILES ‘[Ra]C’ and then generate SMILES
> ‘[Ra]C’ without a problem - the hydrogen count was explicitly declared as
> zero'
> I have tried this as you suggest and it works fine with 1.5.8 - regenerates
> the SMILES without an issue - the problem is just with sketching the molecule
> and then generating SMILES.
>
> Best wishes
>
> Kevin
>
> On Mon, Sep 29, 2014 at 11:14 AM, John May <john.wilkinson...@gmail.com>
> wrote:
> Hi Kevin,
>
> Glad you’re finding Stephan’s fix up useful.
>
> Input from SMILES/InChI/molfile will set the hydrogen count allowing correct
> output for any compound. Drawing the compound in JChemPaint uses the CDK atom
> types to determine the number of hydrogens. We recently added an “X” for
> unknown atom type - this would cause problems if JChemPaint wasn’t using the
> CDK to set the hydrogen counts*. This is a hunch though, will do some
> tracking down.
>
> You should be able to load the SMILES ‘[Ra]C’ and then generate SMILES
> ‘[Ra]C’ without a problem - the hydrogen count was explicitly declared as
> zero. Which points me to atom types.
>
>> Incidentally,is there a JChemPaint release available/planned for use with
>> the CDK 1.6.x series?
>
>
> I’ve actually started patching up the main version of JChemPaint
> (https://github.com/JChemPaint/jchempaint) but there is a lot to do so no
> site of an official release for now. I might do a snapshot/beta version for
> those who need it though.
>
> Best regards,
> John
>
> *implicit hyrogens are added by subtracting the connectivity/degree from the
> formal neighbour count. For “X” the neighbour count is ‘0’ but if you have a
> single bond it’s '0-1’. The CDK handles this correctly but it would not be
> caught if JChemPaint implemented their own method.
>
> On Sep 17, 2014, at 10:55 AM, Kevin Lawson <klawson...@gmail.com> wrote:
>
>> Hi
>>
>> The development version of our LICSS v3.2 program currently uses CDK 1.5.6.
>> To provide molecule input/editing facilities I have been using Stefan's
>> JChemPaint hotfix - jchempaint-hotfix-3.4.jar which works very effectively
>> with cdk-1.5.6.jar. I tried using the new CDK 1.5.8 release and found that,
>> whilst in general Smiles was generated correctly, there was an error for all
>> molecules containing Radium (which LICSS uses as a proxy R-Group indicator
>> for enumeration). To investigate this further, I ran the JChemPaint hotfix
>> as a standalone program using cdk-1.5.8.jar (in which I had to include the
>> apache commons cli jar to get it to run). I then tried using the 'Create
>> SMILES' command for a series of elements singly bonded to Carbon. The
>> following elements generated the expected Smiles: Li, Na, K, Rb, Mg, Ca, Co,
>> Cu, Zn, B, C, N, O, P, S, Ga, Ge, As, Se, In, Sn, Te, Tl. However, the
>> following all failed with the error: "Error while creating SMILES: the
>> number of hydrogens must be positive": Cs, Fr, Be, Sr, Ba, Ra, Sc, Ti, V,
>> Cr, Mn, Fe, Ni, Al, Si, Sb, Pb, Bi, Po. I must admit, I can't see what
>> distinguishes the successes from the fails chemically.
>>
>> If it's any help, the error trace caught when calling JChemPaint from LICSS
>> includes the following:
>>
>> Unexpected exception caught in CdkInterfaceDll -
>> getEditAsSmilesCdkInterfaceDll(const char * componentId):
>> java.lang.IllegalArgumentException: the number of hydrogens must be positive
>> at uk.ac.ebi.beam.AtomBuilder.hydrogens(AtomBuilder.java:220)
>> at org.openscience.cdk.smiles.CDKToBeam.toBeamAtom(CDKToBeam.java:203)
>> at org.openscience.cdk.smiles.CDKToBeam.toBeamGraph(CDKToBeam.java:149)
>> at
>> org.openscience.cdk.smiles.SmilesGenerator.create(SmilesGenerator.java:374)
>> at
>> org.openscience.cdk.smiles.SmilesGenerator.create(SmilesGenerator.java:330)
>>
>> Incidentally,is there a JChemPaint release available/planned for use with
>> the CDK 1.6.x series?
>>
>> Best regards
>>
>> Kevin
>> ------------------------------------------------------------------------------
>> Want excitement?
>> Manually upgrade your production database.
>> When you want reliability, choose Perforce
>> Perforce version control. Predictably reliable.
>> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk_______________________________________________
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user