Skip to content

Commit

Permalink
Removed a bunch of unused local variables (PMD reports)
Browse files Browse the repository at this point in the history
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
  • Loading branch information
Mark B Vine authored and johnmay committed Aug 30, 2014
1 parent fb8b0d2 commit e6bf941
Show file tree
Hide file tree
Showing 12 changed files with 2,880 additions and 2,914 deletions.
Expand Up @@ -479,7 +479,6 @@ && getIfBondIsNotRotatable(
}

// Variables
double distance;
double sum;
double smooth = -20;
double partial;
Expand All @@ -501,7 +500,6 @@ && getIfBondIsNotRotatable(
IAtom cycloexBondAtom0;
IAtom cycloexBondAtom1;
IBond theInCycloexBond;
distance = 0;
limitInf = 0;
limitSup = Math.PI;
step = (limitSup - limitInf) / 13;
Expand All @@ -510,7 +508,6 @@ && getIfBondIsNotRotatable(
angle = 0;
int ya_counter = 0;
List<IAtom> connAtoms;
int counter = 0;
for (double g3r = 0; g3r < limitSup; g3r = g3r + step) {
sum = 0;
for (Integer aBondsInCycloex : bondsInCycloex) {
Expand Down Expand Up @@ -561,7 +558,6 @@ && getIfBondIsNotRotatable(
// g3r_function.add(new Double(sum));
rdfProtonCalculatedValues.add(sum);
logger.debug("RDF g3r prob.: "+sum+ " at distance "+g3r);
counter++;
}
}
else {
Expand Down
Expand Up @@ -387,7 +387,6 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing

///////////////////////THE FIRST CALCULATED DESCRIPTOR IS g(H)r WITH PARTIAL CHARGES:
if(atoms.size() > 0) {
int counter = 0;
for(double ghr = limitInf; ghr < limitSup; ghr = ghr + step) {
sum = 0;
for (Object atom1 : atoms) {
Expand All @@ -403,7 +402,6 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing
rdfProtonCalculatedValues.add(sum);

logger.debug("RDF gr distance prob.: "+sum+ " at distance "+ghr);
counter++;
}
}
else {
Expand Down Expand Up @@ -509,7 +507,6 @@ private int getNearestBondtoAGivenAtom(IAtomContainer mol, IAtom atom, IBond bon
double[] values;
double distance = 0;
IAtom atom0 = bond.getAtom(0);
IAtom atom1 = bond.getAtom(1);
List<IBond> bondsAtLeft = mol.getConnectedBondsList(atom0);
int partial;
for (int i = 0; i < bondsAtLeft.size(); i++) {
Expand Down
Expand Up @@ -396,7 +396,6 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing

if(atoms.size() > 0) {
//ArrayList gHr_topol_function = new ArrayList(15);
int counter = 0;
ShortestPaths shortestPaths = new ShortestPaths(mol, startVertex);
for(double ghrt = limitInf; ghrt < limitSup; ghrt = ghrt + step) {
sum = 0;
Expand All @@ -416,7 +415,6 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing
//gHr_topol_function.add(new Double(sum));
rdfProtonCalculatedValues.add(sum);
logger.debug("RDF gr-topol distance prob.: "+sum+ " at distance "+ghrt);
counter++;
}
}
else {
Expand Down Expand Up @@ -525,7 +523,6 @@ private int getNearestBondtoAGivenAtom(IAtomContainer mol, IAtom atom, IBond bon
double[] values;
double distance = 0;
IAtom atom0 = bond.getAtom(0);
IAtom atom1 = bond.getAtom(1);
List<IBond> bondsAtLeft = mol.getConnectedBondsList(atom0);
int partial;
for (int i = 0; i < bondsAtLeft.size(); i++) {
Expand Down
Expand Up @@ -371,7 +371,6 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing

//Variables
double[] values; // for storage of results of other methods
double distance;
double sum;
double smooth = -20;
double partial;
Expand All @@ -394,14 +393,12 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing
double dist1;
IAtom singleBondAtom0;
IAtom singleBondAtom1;
distance = 0;
position = 0;
IBond theSingleBond = null;
limitInf = 0;
limitSup = Math.PI / 2;
step = (limitSup - limitInf)/7;
smooth = -1.15;
int counter = 0;
for(double ghs = 0; ghs < limitSup; ghs = ghs + step) {
sum = 0;
for( int sing = 0; sing < singles.size(); sing++ ) {
Expand Down Expand Up @@ -433,7 +430,6 @@ public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer, IRing
//gSr_function.add(new Double(sum));
rdfProtonCalculatedValues.add(sum);
logger.debug("RDF gSr prob.: " + sum + " at distance " + ghs);
counter++;
}
}
else {
Expand Down

0 comments on commit e6bf941

Please sign in to comment.