Skip to content

Commit

Permalink
Moved Stereotool to stereo package
Browse files Browse the repository at this point in the history
  • Loading branch information
gilleain authored and egonw committed Aug 1, 2010
1 parent 7abbdcc commit a99c918
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Expand Up @@ -21,11 +21,13 @@
* 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;
package org.openscience.cdk.stereo;

import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;

import org.openscience.cdk.geometry.cip.CIPTool;
import org.openscience.cdk.geometry.cip.CIPTool.CIP_CHIRALITY;
import org.openscience.cdk.interfaces.IAtom;

/**
Expand All @@ -34,7 +36,7 @@
* Some of these methods were adapted from Jmol's smiles search package.
*
* @author maclean
* @cdk.module stereo
* @cdk.module standard
*/
public class StereoTool {

Expand All @@ -55,8 +57,6 @@ public enum StereoClass { TETRAHEDRAL, SQUARE_PLANAR,
*/
public enum TetrahedralSign { PLUS, MINUS }

public enum TetrahedralDescriptor { R, S }

/**
* The shape that four atoms take in a plane.
*/
Expand Down Expand Up @@ -279,7 +279,7 @@ public static boolean isTrigonalBipyramidal(IAtom atomA, IAtom atomB,
* @param atom4 the fourth atom in priority
* @return 'R' or 'S'
*/
public static TetrahedralDescriptor getTetrahedralDescriptor(
public static CIP_CHIRALITY getTetrahedralDescriptor(
IAtom atom1, IAtom atom2, IAtom atom3, IAtom atom4) {

// The handedness uses the first three arguments in an anti-clockwise
Expand All @@ -290,9 +290,9 @@ public static TetrahedralDescriptor getTetrahedralDescriptor(

if (StereoTool.getHandedness(atom1, atom2, atom3, atom4)
== TetrahedralSign.PLUS) {
return TetrahedralDescriptor.R;
return CIP_CHIRALITY.R;
} else {
return TetrahedralDescriptor.S;
return CIP_CHIRALITY.S;
}
}

Expand Down
Expand Up @@ -20,7 +20,7 @@
* 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;
package org.openscience.cdk.stereo;

import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;
Expand All @@ -31,12 +31,12 @@
import org.openscience.cdk.Atom;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.tools.StereoTool.SquarePlanarShape;
import org.openscience.cdk.tools.StereoTool.TetrahedralSign;
import org.openscience.cdk.stereo.StereoTool.SquarePlanarShape;
import org.openscience.cdk.stereo.StereoTool.TetrahedralSign;

/**
* @author maclean
* @cdk.module test-stereo
* @cdk.module test-standard
*/
public class StereoToolTest extends CDKTestCase {

Expand Down

0 comments on commit a99c918

Please sign in to comment.