Skip to content

Commit

Permalink
Copyright statements
Browse files Browse the repository at this point in the history
  • Loading branch information
gilleain authored and egonw committed Aug 1, 2010
1 parent e32f334 commit d96f596
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
28 changes: 26 additions & 2 deletions src/main/org/openscience/cdk/tools/StereoTool.java
@@ -1,3 +1,26 @@
/* Copyright (C) 2005-2009 The Jmol Development Team
* Copyright (C) 2010 Gilleain Torrance <gilleain.torrance@gmail.com>
*
* Contact: cdk-devel@lists.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
* All we ask is that proper credit is given for our work, which includes
* - but is not limited to - adding the above copyright notice to the beginning
* of your source code files, and to any copyright notice that you may distribute
* with programs based on this work.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.openscience.cdk.tools;

import javax.vecmath.Point3d;
Expand All @@ -6,8 +29,9 @@
import org.openscience.cdk.interfaces.IAtom;

/**
* Methods 'borrowed' (stolen) from Jmol to determine or check the stereo
* class of a set of atoms.
* Methods to determine or check the stereo class of a set of atoms.
*
* Some of these methods were adapted from Jmol's smiles search package.
*
* @author maclean
* @cdk.module stereo
Expand Down
35 changes: 35 additions & 0 deletions src/test/org/openscience/cdk/tools/StereoToolTest.java
@@ -1,3 +1,25 @@
/* Copyright (C) 2010 Gilleain Torrance <gilleain.torrance@gmail.com>
*
* Contact: cdk-devel@lists.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
* All we ask is that proper credit is given for our work, which includes
* - but is not limited to - adding the above copyright notice to the beginning
* of your source code files, and to any copyright notice that you may distribute
* with programs based on this work.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.openscience.cdk.tools;

import javax.vecmath.Point3d;
Expand Down Expand Up @@ -67,6 +89,19 @@ public void getNormalFromThreePoints() {
Assert.assertEquals(ZAXIS, normal);
}

@Test
public void tetrahedralPlusAtomsAboveXYClockwiseTest() {
// above the XY plane
IAtom baseA = new Atom("C", new Point3d(0, 0, 1));
IAtom baseB = new Atom("C", new Point3d(1, 0, 1));
IAtom baseC = new Atom("C", new Point3d(1, 1, 1));

IAtom positiveApex = new Atom("C", new Point3d(0.5, 0.5, 2));
TetrahedralSign tetSign =
StereoTool.getHandedness(baseC, baseB, baseA, positiveApex);
Assert.assertEquals(TetrahedralSign.PLUS, tetSign);
}

@Test
public void tetrahedralPlusAtomsAboveXYTest() {
// above the XY plane
Expand Down

0 comments on commit d96f596

Please sign in to comment.