This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void plot_line(GraphPoint[] line, int m, int c) { | |
Point next = new Point(0, c); | |
while (next.x < line.length) { | |
line[next.x] = new GraphPoint(next, graphpoint.crosshair); | |
next.x += 1; | |
next.y += m; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AtomTests { | |
public final static IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance(); | |
@Test | |
public void one_four_cyclohexadiene() throws InvalidSmilesException { | |
String acpString = "C0C1C2C3C4C5 0:1(2),0:5(1),1:2(1),2:3(1),3:4(2),4:5(1)"; | |
IAtomContainer cyclohexadiene = AtomContainerPrinter.fromString(acpString, builder); | |
AtomDiscretePartitionRefiner refiner = new AtomDiscretePartitionRefiner(); | |
PermutationGroup aut = refiner.getAutomorphismGroup(cyclohexadiene); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
public class Atom { | |
public Atom(String element) { | |
this.element = element; | |
} | |
public String element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openscience.cdk.Molecule; | |
import org.openscience.cdk.io.CDKSourceCodeWriter; | |
import org.openscience.cdk.io.MDLReader; | |
import org.eclipse.jgit.api.*; | |
import org.eclipse.jgit.lib.*; | |
import org.eclipse.jgit.storage.file.*; | |
element = bsh.args[0]; | |
FileRepositoryBuilder builder = new FileRepositoryBuilder(); | |
Repository repository = builder.readEnvironment().findGitDir().build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for e in Ag Au | |
do | |
echo "Checking out $e" | |
git checkout $e | |
git reset --soft HEAD~1 | |
java -cp ~/jgit/org.eclipse.jgit-1.0.0.201106090707-r.jar bsh.Interpreter patcher.bsh $e | |
git add src/ | |
git commit -m "$e final" | |
git checkout master | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package customgenerator; | |
import java.awt.Color; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.vecmath.Point2d; | |
import javax.vecmath.Vector2d; | |
import org.openscience.cdk.geometry.GeometryTools; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package customgenerator; | |
import java.awt.Color; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.vecmath.Point2d; | |
import javax.vecmath.Vector2d; | |
import org.openscience.cdk.geometry.GeometryTools; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void drawMolecule(IMolecule molecule, String name) throws Exception { | |
// layout the molecule | |
StructureDiagramGenerator sdg = new StructureDiagramGenerator(); | |
sdg.setMolecule(molecule, false); | |
sdg.generateCoordinates(); | |
// make generators | |
List<IGenerator<IAtomContainer>> generators = new ArrayList<IGenerator<IAtomContainer>>(); | |
generators.add(new BasicSceneGenerator()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5a86e14eef2b516dab2c4e369376d76bb6dfdd7b Mon Sep 17 00:00:00 2001 | |
From: maclean <gilleain.torrance@gmail.com> | |
Date: Wed, 30 Mar 2011 07:59:03 +0100 | |
Subject: [PATCH] Use IAtomContainer instead of AtomContainer in AtomContainerSet | |
--- | |
src/main/org/openscience/cdk/AtomContainerSet.java | 6 +++--- | |
1 files changed, 3 insertions(+), 3 deletions(-) | |
diff --git a/src/main/org/openscience/cdk/AtomContainerSet.java b/src/main/org/openscience/cdk/AtomContainerSet.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caused by: java.lang.NullPointerException | |
[java] at net.sf.cdk.tools.MakeJavafilesFiles.readBlackList(MakeJavafilesFiles.java:79) | |
[java] at net.sf.cdk.tools.MakeJavafilesFiles.<init>(MakeJavafilesFiles.java:66) | |
[java] at net.sf.cdk.tools.MakeJavafilesFiles.main(MakeJavafilesFiles.java:241) | |
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | |
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | |
[java] at java.lang.reflect.Method.invoke(Method.java:597) | |
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217) | |
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152) |
NewerOlder