public static final void rotate ( Structure structure , double [ ] [ ] rotationmatrix ) throws StructureException { if ( rotationmatrix . length != 3 ) { throw new StructureException ( "matrix does not have size 3x3 !" ) ; } AtomIterator iter = new AtomIterator ( structure ) ; while ( iter . hasNext ( ) ) { Atom atom = iter . next ( ) ; Calc . rotate ( atom , rotationmatrix ) ; } }
Rotate a structure . The rotation Matrix must be a pre - multiplication Matrix .