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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Test" default="cdk-ant"> | |
<target name="cdk-ant" description="build cdk"> | |
<echo>"Building CDK"</echo> | |
<subant target="dist-all" buildpath="../cdk"> | |
</subant> | |
</target> | |
</project> |
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
Apache Ant(TM) version 1.8.2 compiled on February 28 2011 | |
Buildfile: /Users/maclean/development/projects/SMSD/build-smsd.xml | |
Adding reference: ant.PropertyHelper | |
Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home | |
Detected OS: Mac OS X | |
Adding reference: ant.ComponentHelper | |
Setting ro project property: ant.file -> /Users/maclean/development/projects/SMSD/build-smsd.xml | |
Setting ro project property: ant.file.type -> file | |
Adding reference: ant.projectHelper | |
Adding reference: ant.parsing.context |
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
<het/TBD> <prop/hasAtom> <atom/TBD> . | |
<atom/TBD> <prop/hasH2Sig> "[B]([H][H][H][P]([O][O][O]))" . | |
<atom/TBD> <prop/hasAtomSymbol> "B1A" . | |
<atom/TBD> <prop/hasH2Sig> "[P]([B]([H][H][H])[O]([C])[O]([H])[O]([P]))" . | |
<atom/TBD> <prop/hasAtomSymbol> "PA" . | |
<atom/TBD> <prop/hasAtomID> "TBD" . |
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
<rdf:RDF | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:j.0="http://cpt/p/" > | |
<rdf:Description rdf:about="http://cpt/r/"> | |
<j.0:HET rdf:resource="http://cpt/r/TBE"/> | |
<j.0:HET rdf:resource="http://cpt/r/TBD"/> | |
</rdf:Description> | |
<rdf:Description rdf:about="http://cpt/r/TBD"> | |
<j.0:hasHeight2Sig>[B]([H][H][H][P]([O][O][O]))</j.0:hasHeight2Sig> | |
<j.0:hasAtomSymbol>B1A</j.0:hasAtomSymbol> |
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 static IAtomContainer extractSubstructure( | |
IAtomContainer atomContainer, int... atomIndices) throws CloneNotSupportedException { | |
IAtomContainer substructure = (IAtomContainer) atomContainer.clone(); | |
int numberOfAtoms = substructure.getAtomCount(); | |
IAtom[] atoms = new IAtom[numberOfAtoms]; | |
for (int atomIndex = 0; atomIndex < numberOfAtoms; atomIndex++) { | |
atoms[atomIndex] = substructure.getAtom(atomIndex); | |
} | |
Arrays.sort(atomIndices); |
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
IMoleculeSet molSet = makeMolSet(); | |
Vector2d axis = new Vector2d(1.25, .5); | |
axis.normalize(); | |
LinearMoleculeSetLayout layout = new LinearMoleculeSetLayout(new StandardMoleculeLayout(), 3, axis); |
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
/** | |
* Layout an object. | |
* | |
* @author maclean | |
* | |
* @param <T> | |
*/ | |
public interface ILayout<T> { | |
public enum AxisOrientation { X, Y }; |
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
AxisOrientation orientationA = AxisOrientation.Y; | |
AxisOrientation orientationB = AxisOrientation.X; | |
ILayout<IReaction> layout = new LinearReactionLayout( | |
new LinearMoleculeSetLayout( | |
new StandardMoleculeLayout(), orientationA), | |
new LinearMoleculeSetLayout( | |
new StandardMoleculeLayout(), orientationA), | |
2, orientationB); |
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 TechnicallyJava { | |
public Map<Integer, Integer> zip(int[] a, int[] b) { | |
assert a.length == b.length; | |
Map<Integer, Integer> map = new HashMap<Integer, Integer>(); | |
for (int i = 0; i < a.length; i++) { | |
map.put(a[i], b[i]); | |
} | |
return map; | |
} |
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 ArcDrawer extends AWTDrawVisitor { | |
private Graphics2D g2; | |
public ArcDrawer(Graphics2D g) { | |
super(g); | |
this.g2 = g; | |
} | |
@Override |