|
22 | 22 |
|
23 | 23 | import org.biojava.nbio.structure.symmetry.geometry.MomentsOfInertia; |
24 | 24 | import org.biojava.nbio.structure.symmetry.geometry.SuperPosition; |
| 25 | +import org.slf4j.Logger; |
| 26 | +import org.slf4j.LoggerFactory; |
25 | 27 |
|
26 | 28 | import javax.vecmath.*; |
27 | 29 | import java.util.*; |
28 | 30 |
|
29 | 31 | public class RotationAxisAligner extends AxisAligner{ |
| 32 | + |
| 33 | + private static final Logger LOGGER = LoggerFactory.getLogger(RotationAxisAligner.class); |
| 34 | + |
30 | 35 | private static final Vector3d X_AXIS = new Vector3d(1,0,0); |
31 | 36 | private static final Vector3d Y_AXIS = new Vector3d(0,1,0); |
32 | 37 | private static final Vector3d Z_AXIS = new Vector3d(0,0,1); |
@@ -320,7 +325,7 @@ private List<Integer> alignWithReferenceAxis(List<Integer> orbit) { |
320 | 325 | } |
321 | 326 | Collections.reverse(orbit.subList(1, orbit.size())); |
322 | 327 | if (orbit.get(1) != index2) { |
323 | | - System.err.println("Warning: alignWithReferenceAxis failed"); |
| 328 | + LOGGER.warn("alignWithReferenceAxis failed"); |
324 | 329 | } |
325 | 330 | // System.out.println("Orbit2: " + orbit); |
326 | 331 | return orbit; |
@@ -459,7 +464,7 @@ private Matrix4d alignAxes(Vector3d[] axisVectors, Vector3d[] referenceVectors) |
459 | 464 | ref[0] = new Point3d(referenceVectors[0]); |
460 | 465 | ref[1] = new Point3d(referenceVectors[1]); |
461 | 466 | if (SuperPosition.rmsd(axes, ref) > 0.1) { |
462 | | - System.out.println("Warning: AxisTransformation: axes alignment is off. RMSD: " + SuperPosition.rmsd(axes, ref)); |
| 467 | + LOGGER.info("AxisTransformation: axes alignment is off. RMSD: " + SuperPosition.rmsd(axes, ref)); |
463 | 468 | } |
464 | 469 |
|
465 | 470 | return m2; |
@@ -632,7 +637,7 @@ private List<Integer> deconvolute(List<Integer> orbit) { |
632 | 637 | int index = p0.indexOf(current); |
633 | 638 | int next = p1.get(index); |
634 | 639 | if (!orbit.contains(next)) { |
635 | | - System.err.println("deconvolute: inconsistency in permuation. Returning original order"); |
| 640 | + LOGGER.warn("deconvolute: inconsistency in permuation. Returning original order"); |
636 | 641 | return orbit; |
637 | 642 | } |
638 | 643 | inRotationOrder.add(next); |
@@ -675,7 +680,7 @@ private void calcReferenceVector() { |
675 | 680 | } |
676 | 681 |
|
677 | 682 | if (referenceVector == null) { |
678 | | - System.err.println("Warning: no reference vector found. Using y-axis."); |
| 683 | + LOGGER.warn("no reference vector found. Using y-axis."); |
679 | 684 | referenceVector = new Vector3d(Y_AXIS); |
680 | 685 | } |
681 | 686 | // make sure reference vector is perpendicular principal roation vector |
|
0 commit comments