public static final List < Chain > getAlignedModel ( Atom [ ] ca ) { List < Chain > model = new ArrayList < Chain > ( ) ; for ( Atom a : ca ) { Group g = a . getGroup ( ) ; Chain parentC = g . getChain ( ) ; Chain newChain = null ; for ( Chain c : model ) { if ( c . getId ( ) . equals ( parentC . getId ( ) ) ) { newChain = c ; break ; } } if ( newChain == null ) { newChain = new ChainImpl ( ) ; newChain . setId ( parentC . getId ( ) ) ; model . add ( newChain ) ; } newChain . addGroup ( g ) ; } return model ; }
get an artificial List of chains containing the Atoms and groups . Does NOT rotate anything .