Giter Site home page Giter Site logo

egonw / cdkbook Goto Github PK

View Code? Open in Web Editor NEW
40.0 5.0 11.0 11.69 MB

Groovy Cheminformatics with the Chemistry Development Kit

Home Page: https://egonw.github.io/cdkbook/

License: Creative Commons Attribution Share Alike 4.0 International

Makefile 18.78% Groovy 78.83% JavaScript 2.10% Shell 0.28%
java cheminformatics groovy chemistry chemistry-development-kit

cdkbook's Introduction

cdkbook's People

Contributors

egonw avatar johnmay avatar larsgw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cdkbook's Issues

possible CML convention registration issue

Processing  ProteinFromSequence.groovyin
doing ProteinFromSequence.out...
org.openscience.cdk.io.cml.CMLHandler WARN: Detected unknown convention: cdk:substructureList

review IsotopeFactory warnings

Processing  IsotopesDemo.groovyin
doing IsotopesDemo.out...
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 43
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 61
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 84
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 85
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 86
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 87
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 88
org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 89

Invalid URLs in Markdown files

Errors in introduction.md

Errors in graph.md

Errors in reaction.md

Errors in atomsbonds.md

Errors in io.md

Errors in cheminfo.md

Errors in descriptor.md

This content was produced by a GitHub Action.

NPE while listing all atom types

Processing  ListAllCDKAtomTypes.groovyin
doing ListAllCDKAtomTypes.out...
Caught: java.lang.NullPointerException: Cannot invoke method compareTo() on null object
java.lang.NullPointerException: Cannot invoke method compareTo() on null object
        at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:47)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at java_lang_String$compareTo$1.call(Unknown Source)
        at ListAllCDKAtomTypes$1.compare(ListAllCDKAtomTypes.groovy:17)
        at ListAllCDKAtomTypes$1.compare(ListAllCDKAtomTypes.groovy)
        at java.util.TimSort.binarySort(TimSort.java:296)
        at java.util.TimSort.sort(TimSort.java:239)
        at java.util.Arrays.sort(Arrays.java:1438)
        at java_util_Arrays$sort.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:136)
        at ListAllCDKAtomTypes.run(ListAllCDKAtomTypes.groovy:15)
        at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
        at groovy.lang.GroovyShell.run(GroovyShell.java:507)
        at groovy.lang.GroovyShell.run(GroovyShell.java:496)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:597)
        at groovy.ui.GroovyMain.run(GroovyMain.java:329)
        at groovy.ui.GroovyMain.process(GroovyMain.java:315)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)
        at groovy.ui.GroovyMain.main(GroovyMain.java:114)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:116)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:138)
Processing  ListAllSybylAtomTypes.groovyin
doing ListAllSybylAtomTypes.out...
Caught: java.lang.NullPointerException
java.lang.NullPointerException
        at java.lang.String.compareTo(String.java:1155)
        at java.lang.String.compareTo(String.java:111)
        at java_lang_Comparable$compareTo.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at ListAllSybylAtomTypes$1.compare(ListAllSybylAtomTypes.groovy:17)
        at ListAllSybylAtomTypes$1.compare(ListAllSybylAtomTypes.groovy)
        at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
        at java.util.TimSort.sort(TimSort.java:234)
        at java.util.Arrays.sort(Arrays.java:1438)
        at java_util_Arrays$sort.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:136)
        at ListAllSybylAtomTypes.run(ListAllSybylAtomTypes.groovy:15)
        at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
        at groovy.lang.GroovyShell.run(GroovyShell.java:507)
        at groovy.lang.GroovyShell.run(GroovyShell.java:496)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:597)
        at groovy.ui.GroovyMain.run(GroovyMain.java:329)
        at groovy.ui.GroovyMain.process(GroovyMain.java:315)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)
        at groovy.ui.GroovyMain.main(GroovyMain.java:114)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:116)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:138)

duplicate Grab output

For example in code/CTR2.code.md:

 ```groovy
+@Grab(group='org.openscience.cdk', module='cdk-bundle', version='%CDKVERSION%')
+@Grab(group='org.openscience.cdk', module='cdk-bundle', version='2.3')
+

review AtomTypeFactory warnings

Processing  CovalentRadii.groovyin
doing CovalentRadii.out...
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
Processing  RebondToolDemo.groovyin
doing RebondToolDemo.out...
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist
org.openscience.cdk.config.AtomTypeFactory WARN: Taking first atom type, but other may exist

clean up missing references

The current list:

builders.md:1. <a name="citeref1"></a>Missing
builders.md:2. <a name="citeref2"></a>Missing
cheminfo.md:4. <a name="citeref4"></a>Missing
cheminfo.md:8. <a name="citeref8"></a>Missing
cheminfo.md:10. <a name="citeref10"></a>Missing
cheminfo.md:13. <a name="citeref13"></a>Missing
cheminfo.md:14. <a name="citeref14"></a>Missing
cheminfo.md:15. <a name="citeref15"></a>Missing
cheminfo.md:16. <a name="citeref16"></a>Missing
cheminfo.md:17. <a name="citeref17"></a>Missing
cheminfo.md:18. <a name="citeref18"></a>Missing
graph.md:1. <a name="citeref1"></a>Missing
graph.md:2. <a name="citeref2"></a>Missing
graph.md:3. <a name="citeref3"></a>Missing
graph.md:4. <a name="citeref4"></a>Missing
graph.md:5. <a name="citeref5"></a>Missing
graph.md:6. <a name="citeref6"></a>Missing
properties.md:1. <a name="citeref1"></a>Missing
properties.md:2. <a name="citeref2"></a>Missing
protein.md:1. <a name="citeref1"></a>Missing
protein.md:2. <a name="citeref2"></a>Missing

DebugBuilder no longer gives output

Change in the live book:

 ### The Debug Builder
@@ -135,21 +135,6 @@ IChemObjectBuilder builder =
 ... we get this debug information for the data classes:
 
 ```plain
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng max bond order: null
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng bond order sum: null
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng formal charge: 0
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng formal charge: 0
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng hybridization: null
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng formal neighbour count: null
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...
-  ng covalent radius: null
-org.openscience.cdk.debug.DebugAtom DEBUG: Getti...

check possible API change org.openscience.cdk.Atom

Processing  MACCSFingerprint.groovyin
doing MACCSFingerprint.out...
Caught: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
        at org.openscience.cdk.Atom.bonds(Atom.java:260)
        at org.openscience.cdk.isomorphism.matchers.Expr.getTotalHCount(Expr.java:431)
        at org.openscience.cdk.isomorphism.matchers.Expr.matches(Expr.java:278)
        at org.openscience.cdk.isomorphism.matchers.Expr.matches(Expr.java:359)
        at org.openscience.cdk.isomorphism.matchers.Expr.matches(Expr.java:444)
        at org.openscience.cdk.isomorphism.matchers.QueryAtom.matches(QueryAtom.java:763)
        at org.openscience.cdk.isomorphism.AtomMatcher$QueryMatcher.matches(AtomMatcher.java:95)
        at org.openscience.cdk.isomorphism.VFSubState.feasible(VFSubState.java:115)
        at org.openscience.cdk.isomorphism.AbstractVFState.add(AbstractVFState.java:129)
        at org.openscience.cdk.isomorphism.StateStream.map(StateStream.java:108)
        at org.openscience.cdk.isomorphism.StateStream.findNext(StateStream.java:90)
        at org.openscience.cdk.isomorphism.StateStream.<init>(StateStream.java:61)
        at org.openscience.cdk.isomorphism.VentoFoggia$VFIterable.iterator(VentoFoggia.java:252)
        at com.google.common.collect.Iterables.getFirst(Iterables.java:775)
        at org.openscience.cdk.isomorphism.Mappings.first(Mappings.java:508)
        at org.openscience.cdk.smarts.SmartsPattern.match(SmartsPattern.java:136)
        at org.openscience.cdk.isomorphism.Pattern.matches(Pattern.java:117)
        at org.openscience.cdk.fingerprint.MACCSFingerprinter.getBitFingerprint(MACCSFingerprinter.java:145)
        at org.openscience.cdk.fingerprint.IFingerprinter$getBitFingerprint.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at MACCSFingerprint.run(MACCSFingerprint.groovy:27)
        at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
        at groovy.lang.GroovyShell.run(GroovyShell.java:507)
        at groovy.lang.GroovyShell.run(GroovyShell.java:496)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:597)
        at groovy.ui.GroovyMain.run(GroovyMain.java:329)
        at groovy.ui.GroovyMain.process(GroovyMain.java:315)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)
        at groovy.ui.GroovyMain.main(GroovyMain.java:114)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:116)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:138)

error in the build system

Processing  SimpleFingerprintDemo.groovyin
doing SimpleFingerprintDemo.out...
Caught: java.lang.NoClassDefFoundError: org/openscience/cdk/fingerprint/IFingerprinter
java.lang.NoClassDefFoundError: org/openscience/cdk/fingerprint/IFingerprinter
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:175)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
        at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:702)
        at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:570)
        at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:184)
        at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
        at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
        at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:740)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:377)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:340)
        at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:324)
        at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:336)
        at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:1131)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:770)
        at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:1099)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:764)
        at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:144)
        at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:88)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:166)
        at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1402)
        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115)
        at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:55)
        at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:239)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126)
        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1081)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
        at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1345)
        at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:214)
        at org.codehaus.groovy.control.CompilationUnit$12.call(CompilationUnit.java:684)
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:966)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:575)
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
        at groovy.lang.GroovyShell.parseClass(GroovyShell.java:677)
        at groovy.lang.GroovyShell.run(GroovyShell.java:506)
        at groovy.lang.GroovyShell.run(GroovyShell.java:496)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:597)
        at groovy.ui.GroovyMain.run(GroovyMain.java:329)
        at groovy.ui.GroovyMain.process(GroovyMain.java:315)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)
        at groovy.ui.GroovyMain.main(GroovyMain.java:114)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:116)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:138)
Caused by: java.lang.ClassNotFoundException: org.openscience.cdk.fingerprint.IFingerprinter
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:179)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:151)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 61 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.