Skip to content

Commit

Permalink
Remove the useMmcif from test
Browse files Browse the repository at this point in the history
Fix the bug and clean up the logic of adding seq res groups
biojava#517
  • Loading branch information
abradle committed Jul 15, 2016
1 parent c007868 commit 1dce7cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,21 +480,18 @@ public static void addSeqRes(Chain modelChain, String sequence) {
GroupType chainType = getChainType(modelChain.getAtomGroups());
for(int i=0; i<sequence.length(); i++){
char singleLetterCode = sequence.charAt(i);
Group group;
Group group = null;
if(seqResGroups.size()<=i){
group=null;
}
else{
group=seqResGroups.get(i);
}
if(group!=null){
group=null;
continue;
}
group = getSeqResGroup(modelChain, singleLetterCode, chainType);
addGroupAtId(seqResGroups, group, i);
seqResGroups.set(i, group);
group=null;
}
}

Expand All @@ -514,7 +511,7 @@ private static <T> void addGroupAtId(List<T> seqResGroups, T group, int sequence
while(seqResGroups.size()<=sequenceIndexId){
seqResGroups.add(null);
}
if(sequenceIndexId>0){
if(sequenceIndexId>=0){
seqResGroups.set(sequenceIndexId, group);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,11 @@ public class TestQuatSymmetryDetector {
public void testNMR() throws IOException, StructureException {

AtomCache cache = new AtomCache();
cache.setUseMmCif(true);
Structure pdb = cache.getStructure("BIO:1b4c:1");

SubunitClustererParameters clusterParams = new SubunitClustererParameters();
QuatSymmetryParameters symmParams = new QuatSymmetryParameters();
QuatSymmetryResults symmetry = QuatSymmetryDetector.calcGlobalSymmetry(
pdb, symmParams, clusterParams);

// C2 symmetry non pseudosymmetric
assertEquals("C2", symmetry.getSymmetry());
assertEquals("A2", symmetry.getSubunits().getStoichiometry());
Expand Down

0 comments on commit 1dce7cb

Please sign in to comment.