Permalink
Browse files

Missing annotations are now given to the ForceFieldConfigurator class…

… after new test class has been added
  • Loading branch information...
1 parent 829da6c commit f7654cbfa85b3e761d916f27f0f9276e4326c6f5 Daniel Szisz committed with rajarshi Apr 20, 2012
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/main/org/openscience/cdk/modeling/builder3d/ForceFieldConfigurator.java
@@ -32,6 +32,8 @@
import java.util.regex.Pattern;
import org.openscience.cdk.CDKConstants;
+import org.openscience.cdk.annotations.TestClass;
+import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.aromaticity.CDKHueckelAromaticityDetector;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.exception.NoSuchAtomTypeException;
@@ -61,6 +63,8 @@
* @cdk.module forcefield
* @cdk.githash
*/
+
+@TestClass("org.openscience.modeling.builder3d.ForceFieldConfiguratorTest")
public class ForceFieldConfigurator {
private String ffName = "mmff94";
@@ -100,6 +104,8 @@ public void setInputStream(InputStream ins) {
*
* @param ffname The new forceFieldType name
*/
+
+ @TestMethod("testCheckForceFieldType")
public boolean checkForceFieldType(String ffname) {
boolean check=false;
for (int i = 0; i < fftypes.length; i++) {
@@ -120,6 +126,7 @@ public boolean checkForceFieldType(String ffname) {
*
* @param ffname name of the force field data file
*/
+ @TestMethod("testSetForceFieldConfigurator")
public void setForceFieldConfigurator(String ffname) throws CDKException {
ffname=ffname.toLowerCase();
boolean check=false;
@@ -182,6 +189,7 @@ public void setParameters(Map<String, Object> parameterset) {
/**
* Sets the parameters attribute of the ForceFieldConfigurator object, default is mm2 force field
*/
+ @TestMethod("testSetMM2Parameters")
public void setMM2Parameters() throws CDKException{
try{
mm2.readParameterSets();
@@ -191,7 +199,7 @@ public void setMM2Parameters() throws CDKException{
parameterSet = mm2.getParamterSet();
atomTypes = mm2.getAtomTypes();
}
-
+ @TestMethod("testSetMMFF94Parameters")
public void setMMFF94Parameters() throws Exception{
mmff94.readParameterSets();
parameterSet = mmff94.getParamterSet();
@@ -241,6 +249,7 @@ private IAtomType getAtomType(String ID) throws NoSuchAtomTypeException {
*@return sssrf set
*@exception CDKException Problems detecting aromaticity or making hose codes.
*/
+ @TestMethod("testAssignAtomTyps")
public IRingSet assignAtomTyps(IAtomContainer molecule) throws CDKException {
IAtom atom = null;
String hoseCode = "";
@@ -542,6 +551,7 @@ public IAtom configureMM2BasedAtom(IAtom atom, String hoseCode,boolean hetRing)
}
}
+ @TestMethod("testRemoveAromaticityFlagsFromHoseCode")
public String removeAromaticityFlagsFromHoseCode(String hoseCode){
String hosecode="";
for (int i=0;i<hoseCode.length();i++){
@@ -560,6 +570,7 @@ public String removeAromaticityFlagsFromHoseCode(String hoseCode){
* @return atom
* @exception NoSuchAtomTypeException atomType is not known
*/
+ @TestMethod("testConfigureMMFF94BasedAtom")
public IAtom configureMMFF94BasedAtom(IAtom atom, String hoseCode, boolean isInHetRing) throws NoSuchAtomTypeException {
//logger.debug("****** Configure MMFF94 AtomType ******");
List<Pattern> atomTypePattern = null;

0 comments on commit f7654cb

Please sign in to comment.