public List < StructureIdentifier > getRepeatsID ( ) throws StructureException { if ( ! isRefined ( ) ) return null ; List < StructureIdentifier > repeats = new ArrayList < StructureIdentifier > ( numRepeats ) ; String pdbId = structureId . toCanonical ( ) . getPdbId ( ) ; Block align = multipleAlignment . getBlocks ( ) . get ( 0 ) ; for ( int su = 0 ; su < numRepeats ; su ++ ) { // Get the start and end residues of the repeat ResidueNumber res1 = atoms [ align . getStartResidue ( su ) ] . getGroup ( ) . getResidueNumber ( ) ; ResidueNumber res2 = atoms [ align . getFinalResidue ( su ) ] . getGroup ( ) . getResidueNumber ( ) ; ResidueRange range = new ResidueRange ( res1 . getChainName ( ) , res1 , res2 ) ; StructureIdentifier id = new SubstructureIdentifier ( pdbId , Arrays . asList ( range ) ) ; repeats . add ( id ) ; } return repeats ; }
Return the symmetric repeats as structure identifiers if the result is symmetric and it was refined return null otherwise .