Skip to content

Commit 747633f

Browse files
committed
Cosmetics
1 parent ea9e034 commit 747633f

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfStructureReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void setGroupInfo(String groupName, int groupNumber,
229229
group = new HetatomImpl();
230230
break;
231231
}
232-
atomsInGroup = new ArrayList<Atom>();
232+
atomsInGroup = new ArrayList<>();
233233
ChemComp chemComp = new ChemComp();
234234
chemComp.setOne_letter_code(String.valueOf(singleLetterCode));
235235
chemComp.setType(chemCompType.toUpperCase());
@@ -243,7 +243,7 @@ public void setGroupInfo(String groupName, int groupNumber,
243243
group.setResidueNumber(chain.getName().trim(),
244244
groupNumber, insertionCode);
245245
}
246-
group.setAtoms(new ArrayList<Atom>(atomCount));
246+
group.setAtoms(new ArrayList<>(atomCount));
247247
if (polymerType==1 || polymerType==2) {
248248
MmtfUtils.insertSeqResGroup(chain, group, sequenceIndexId);
249249
}

biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public static int getSecStructType(Group group) {
371371
/**
372372
* Get the secondary structure as defined by DSSP.
373373
* @param group the input group to be calculated
374-
* @param the integer index of the group type.
374+
* @param dsspIndex integer index of the group type.
375375
*/
376376
public static void setSecStructType(Group group, int dsspIndex) {
377377
SecStrucType secStrucType = getSecStructTypeFromDsspIndex(dsspIndex);
@@ -508,9 +508,7 @@ public static void addSeqRes(Chain modelChain, String sequence) {
508508

509509
char singleLetterCode = sequence.charAt(i);
510510
Group group = null;
511-
if(seqResGroups.size()<=i){
512-
}
513-
else{
511+
if (seqResGroups.size() > i) {
514512
group=seqResGroups.get(i);
515513
}
516514
if(group!=null){
@@ -525,10 +523,7 @@ public static void addSeqRes(Chain modelChain, String sequence) {
525523

526524
private static GroupType getChainType(List<Group> groups) {
527525
for(Group group : groups) {
528-
if(group==null){
529-
continue;
530-
}
531-
else if(group.getType()!=GroupType.HETATM){
526+
if(group!=null && group.getType()!=GroupType.HETATM){
532527
return group.getType();
533528
}
534529
}

biojava-structure/src/test/java/org/biojava/nbio/structure/io/mmtf/TestMmtfStructureReader.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ public void compareMmcif() throws IOException, StructureException {
6464
assertEquals(mmcif.getPDBHeader().getExperimentalTechniques(),
6565
mmtf.getPDBHeader().getExperimentalTechniques());
6666

67-
68-
6967
// Compare the SEQRES
7068
assertEquals(mmcif.getChainByIndex(0).getSeqResSequence(),
7169
mmtf.getChainByIndex(0).getSeqResSequence());

0 commit comments

Comments
 (0)