@@ -101,7 +101,7 @@ public class SecStrucCalc {
101101 private Atom [] atoms ;
102102 // Added by Anthony - to speed up intergroup calculations
103103 private AtomContactSet contactSet ;
104- private Map <String , Integer > indResMap ;
104+ private Map <ResidueNumber , Integer > indResMap ;
105105 public SecStrucCalc (){
106106 ladders = new ArrayList <Ladder >();
107107 bridges = new ArrayList <BetaBridge >();
@@ -161,10 +161,10 @@ private void initContactSet() {
161161 // Initialise an array of atoms
162162 atoms = new Atom [groups .length ];
163163 // Remake this local var
164- indResMap = new HashMap <String , Integer >();
164+ indResMap = new HashMap <>();
165165 for (int i =0 ; i < groups .length ; i ++){
166166 SecStrucGroup one = groups [i ];
167- indResMap .put (one .getResidueNumber (). getChainName ()+ one . getResidueNumber (). getSeqNum () , i );
167+ indResMap .put (one .getResidueNumber (), i );
168168 atoms [i ] = one .getCA ();
169169 }
170170 Grid grid = new Grid (CA_MIN_DIST );
@@ -433,8 +433,8 @@ private void findBridges() {
433433 Group g1 = ac .getPair ().getFirst ().getGroup ();
434434 Group g2 = ac .getPair ().getSecond ().getGroup ();
435435 // Get the indices
436- int i = indResMap .get (g1 .getResidueNumber (). getChainName ()+ g1 . getResidueNumber (). getSeqNum () );
437- int j = indResMap .get (g2 .getResidueNumber (). getChainName ()+ g2 . getResidueNumber (). getSeqNum () );
436+ int i = indResMap .get (g1 .getResidueNumber ());
437+ int j = indResMap .get (g2 .getResidueNumber ());
438438 // If i>j switch them over
439439 if (i >j ){
440440 // Switch them over
@@ -785,8 +785,8 @@ private void calculateHBonds() {
785785 Group g1 = pair .getFirst ().getGroup ();
786786 Group g2 = pair .getSecond ().getGroup ();
787787 // Now I need to get the index of the Group in the list groups
788- int i = indResMap .get (g1 .getResidueNumber (). getChainName ()+ g1 . getResidueNumber (). getSeqNum () );
789- int j = indResMap .get (g2 .getResidueNumber (). getChainName ()+ g2 . getResidueNumber (). getSeqNum () );
788+ int i = indResMap .get (g1 .getResidueNumber ());
789+ int j = indResMap .get (g2 .getResidueNumber ());
790790 // Now check this
791791 checkAddHBond (i ,j );
792792 //"backwards" hbonds are not allowed
@@ -1054,7 +1054,7 @@ private static Atom calcSimple_H(Atom c, Atom o, Atom n) {
10541054 }
10551055
10561056 private void buildHelices (){
1057-
1057+
10581058 //Alpha-helix (i+4), 3-10-helix (i+3), Pi-helix (i+5)
10591059 checkSetHelix (4 , SecStrucType .helix4 );
10601060 checkSetHelix (3 , SecStrucType .helix3 );
0 commit comments