public int getLengthDirectional ( int positionStart , int positionEnd , String startingChain ) { int count = getLength ( positionStart , positionEnd , startingChain ) ; if ( positionStart <= positionEnd ) { return count ; } else { return - count ; } }
Calculates the number of residues of the specified chain in a given range . Will return a negative value if the start is past the end .