LigancyFourChirality { public LigancyFourChirality project(ILigand[] newOrder) { ITetrahedralChirality.Stereo newStereo = this.stereo; ILigand[] newAtoms = new ILigand[4]; System.arraycopy(this.ligands, 0, newAtoms, 0, 4); for (int i = 0; i < 3; i++) { if (!newAtoms[i].getLigandAtom().equals(newOrder[i].getLigandAtom())) { for (int j = i; j < 4; j++) { if (newAtoms[j].getLigandAtom().equals(newOrder[i].getLigandAtom())) { swap(newAtoms, i, j); if (newStereo == Stereo.CLOCKWISE) { newStereo = Stereo.ANTI_CLOCKWISE; } else { newStereo = Stereo.CLOCKWISE; } } } } } return new LigancyFourChirality(chiralAtom, newAtoms, newStereo); } LigancyFourChirality(IAtom chiralAtom, ILigand[] ligands, ITetrahedralChirality.Stereo stereo);  LigancyFourChirality(IAtomContainer container, ITetrahedralChirality cdkChirality); ILigand[] getLigands(); IAtom getChiralAtom(); ITetrahedralChirality.Stereo getStereo(); LigancyFourChirality project(ILigand[] newOrder);  }
@Test public void testProject() { LigancyFourChirality chirality = new LigancyFourChirality(molecule.getAtom(1), ligands, Stereo.CLOCKWISE); chirality.project(ligands); Assert.assertEquals(Stereo.CLOCKWISE, chirality.getStereo()); }