atomPlacer.setMolecule(this.molecule); ringPlacer.setMolecule(this.molecule); ringPlacer.setAtomPlacer(this.atomPlacer);
atomPlacer.setMolecule(this.molecule); ringPlacer.setMolecule(this.molecule); ringPlacer.setAtomPlacer(this.atomPlacer);
atomPlacer.setMolecule(container);
atomPlacer.setMolecule(container);
atomPlacer.setMolecule(chemModel.getBuilder().newInstance(IAtomContainer.class,atomCon)); double bondLength; if (atomCon.getBondCount() >= 1) { Vector2d v = atomPlacer.getNextBondVector(atom, connectedAtom, distanceMeasure, true); atomPlacer.setMolecule(ac); atomPlacer.placeLinearChain(ac, v, bondLength); } else {
atomPlacer.setMolecule(this.molecule); ringPlacer.setMolecule(this.molecule); macroPlacer = new MacroCycleLayout(this.molecule);
atomPlacer.setMolecule(this.molecule); ringPlacer.setMolecule(this.molecule); macroPlacer = new MacroCycleLayout(this.molecule);
atomPlacer.setMolecule(m); atomPlacer.placeLinearChain(m, new Vector2d(0, 1.5), 1.5);
@Test public void cumulated_x2() { IAtomContainer m = new AtomContainer(5, 4, 0, 0); m.addAtom(atom("C", 3)); m.addAtom(atom("C", 1)); m.addAtom(atom("C", 0)); m.addAtom(atom("C", 1)); m.addAtom(atom("C", 3)); m.addBond(0, 1, IBond.Order.SINGLE); m.addBond(1, 2, IBond.Order.DOUBLE); m.addBond(2, 3, IBond.Order.DOUBLE); m.addBond(3, 4, IBond.Order.SINGLE); m.getAtom(0).setPoint2d(new Point2d(0, 0)); m.getAtom(0).setFlag(CDKConstants.ISPLACED, true); AtomPlacer atomPlacer = new AtomPlacer(); atomPlacer.setMolecule(m); atomPlacer.placeLinearChain(m, new Vector2d(0, 1.5), 1.5); Point2d p1 = m.getAtom(1).getPoint2d(); Point2d p2 = m.getAtom(2).getPoint2d(); Point2d p3 = m.getAtom(3).getPoint2d(); Vector2d p2p1 = new Vector2d(p1.x - p2.x, p1.y - p2.y); Vector2d p2p3 = new Vector2d(p3.x - p2.x, p3.y - p2.y); p2p1.normalize(); p2p3.normalize(); double theta = Math.acos(p2p1.x * p2p3.x + p2p1.y * p2p3.y); assertThat(theta, closeTo(Math.PI, 0.05)); }
atomPlacer.setMolecule(molecule);