public static CeSymmResult analyze ( Atom [ ] atoms , CESymmParameters params ) throws StructureException { if ( atoms . length < 1 ) throw new IllegalArgumentException ( "Empty Atom array given." ) ; // If the SSE information is needed, we calculate it if the user did not if ( params . getSSEThreshold ( ) > 0 ) { Structure s = atoms [ 0 ] . getGroup ( ) . getChain ( ) . getStructure ( ) ; if ( SecStrucTools . getSecStrucInfo ( s ) . isEmpty ( ) ) { logger . info ( "Calculating Secondary Structure..." ) ; SecStrucCalc ssp = new SecStrucCalc ( ) ; ssp . calculate ( s , true ) ; } } CeSymmIterative iter = new CeSymmIterative ( params ) ; CeSymmResult result = iter . execute ( atoms ) ; if ( result . isRefined ( ) ) { // Optimize the global alignment freely once more (final step) if ( params . getOptimization ( ) && result . getSymmLevels ( ) > 1 ) { try { SymmOptimizer optimizer = new SymmOptimizer ( result ) ; MultipleAlignment optimized = optimizer . optimize ( ) ; // Set the optimized MultipleAlignment and the axes result . setMultipleAlignment ( optimized ) ; } catch ( RefinerFailedException e ) { logger . info ( "Final optimization failed:" + e . getMessage ( ) ) ; } } result . getMultipleAlignment ( ) . getEnsemble ( ) . setStructureIdentifiers ( result . getRepeatsID ( ) ) ; } return result ; }
Analyze the symmetries of the input Atom array using the provided parameters .