Skip to content

Commit d4597c4

Browse files
committed
biojava#360 improving class and method names
1 parent 8203b89 commit d4597c4

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

biojava-structure/src/main/java/demo/DemoSecStrucPred.java renamed to biojava-structure/src/main/java/demo/DemoSecStrucCalc.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.biojava.nbio.structure.StructureException;
2828
import org.biojava.nbio.structure.align.util.AtomCache;
2929
import org.biojava.nbio.structure.secstruc.SecStrucElement;
30-
import org.biojava.nbio.structure.secstruc.SecStrucPred;
30+
import org.biojava.nbio.structure.secstruc.SecStrucCalc;
3131
import org.biojava.nbio.structure.secstruc.SecStrucTools;
3232

3333
/**
@@ -38,7 +38,7 @@
3838
* @author Aleix Lafita
3939
*
4040
*/
41-
public class DemoSecStrucPred {
41+
public class DemoSecStrucCalc {
4242

4343
public static void main(String[] args) throws IOException,
4444
StructureException {
@@ -51,8 +51,8 @@ public static void main(String[] args) throws IOException,
5151
Structure s = cache.getStructure(pdbID);
5252

5353
// Predict and assign the SS of the Structure
54-
SecStrucPred ssp = new SecStrucPred();
55-
ssp.predict(s, true);
54+
SecStrucCalc ssp = new SecStrucCalc();
55+
ssp.calculate(s, true);
5656

5757
// Print the DSSP output
5858
System.out.println("******DSSP output: ");

biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucPred.java renamed to biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucCalc.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @author Aleix Lafita
4444
*
4545
*/
46-
public class SecStrucPred {
46+
public class SecStrucCalc {
4747

4848
/**
4949
* DSSP assigns helices one residue shorter at each end, because the
@@ -55,7 +55,7 @@ public class SecStrucPred {
5555
private static final boolean DSSP_HELICES = true;
5656

5757
private static final Logger logger =
58-
LoggerFactory.getLogger(SecStrucPred.class);
58+
LoggerFactory.getLogger(SecStrucCalc.class);
5959

6060
/** min distance between two residues */
6161
public static final double MINDIST = 0.5;
@@ -87,7 +87,7 @@ public class SecStrucPred {
8787
private List<Ladder> ladders;
8888
private List<BetaBridge> bridges;
8989

90-
public SecStrucPred(){
90+
public SecStrucCalc(){
9191
ladders = new ArrayList<Ladder>();
9292
bridges = new ArrayList<BetaBridge>();
9393
}
@@ -100,7 +100,7 @@ public SecStrucPred(){
100100
* @param assign sets the SS information to the Groups of s
101101
* @return a List of SS annotation objects
102102
*/
103-
public List<SecStrucState> predict(Structure s, boolean assign)
103+
public List<SecStrucState> calculate(Structure s, boolean assign)
104104
throws StructureException {
105105

106106
groups = initGroupArray(s);
@@ -558,9 +558,9 @@ public String printFASTA() {
558558
@Override
559559
public boolean equals(Object o){
560560

561-
if (!(o instanceof SecStrucPred)) return false;
561+
if (!(o instanceof SecStrucCalc)) return false;
562562
else {
563-
SecStrucPred ss = (SecStrucPred) o;
563+
SecStrucCalc ss = (SecStrucCalc) o;
564564
if (groups.length != ss.groups.length) return false;
565565

566566
for (int g=0; g<groups.length; g++){

biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/internal/CeSymm.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import org.biojava.nbio.structure.align.multiple.util.MultipleAlignmentScorer;
4242
import org.biojava.nbio.structure.align.util.AFPChainScorer;
4343
import org.biojava.nbio.structure.jama.Matrix;
44-
import org.biojava.nbio.structure.secstruc.SecStrucPred;
44+
import org.biojava.nbio.structure.secstruc.SecStrucCalc;
4545
import org.biojava.nbio.structure.secstruc.SecStrucTools;
4646
import org.biojava.nbio.structure.symmetry.internal.CESymmParameters.RefineMethod;
4747
import org.biojava.nbio.structure.symmetry.internal.CESymmParameters.SymmetryType;
@@ -410,8 +410,8 @@ public MultipleAlignment analyze(Atom[] atoms, CESymmParameters param)
410410
if (params.getSSEThreshold() > 0) {
411411
Structure s = atoms[0].getGroup().getChain().getStructure();
412412
if (SecStrucTools.getSecStrucInfo(s).isEmpty()){
413-
SecStrucPred ssp = new SecStrucPred();
414-
ssp.predict(s, true);
413+
SecStrucCalc ssp = new SecStrucCalc();
414+
ssp.calculate(s, true);
415415
}
416416
}
417417

biojava-structure/src/test/java/org/biojava/nbio/structure/secstruc/TestDSSPParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public void testDSSPParser() throws IOException, StructureException {
5959
List<SecStrucState> pdb = DSSPParser.fetch(name, s, false);
6060

6161
// Test predicting, writting and parsing back
62-
SecStrucPred sec = new SecStrucPred();
63-
List<SecStrucState> pred = sec.predict(s, false);
62+
SecStrucCalc sec = new SecStrucCalc();
63+
List<SecStrucState> pred = sec.calculate(s, false);
6464

6565
List<SecStrucState> parseBack = DSSPParser.parseString(
6666
sec.toString(), s, false);

biojava-structure/src/test/java/org/biojava/nbio/structure/secstruc/TestSecStrucPred.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public void testSecStrucPred() throws StructureException, IOException {
6060
Structure s = cache.getStructure(name);
6161

6262
//Predict with BioJava the SS
63-
SecStrucPred sec = new SecStrucPred();
64-
List<SecStrucState> biojava = sec.predict(s, true);
63+
SecStrucCalc sec = new SecStrucCalc();
64+
List<SecStrucState> biojava = sec.calculate(s, true);
6565

6666
//Download the original DSSP implementation output
6767
List<SecStrucState> dssp = DSSPParser.fetch(name, s, false);

0 commit comments

Comments
 (0)