Created
November 20, 2012 13:57
-
-
Save gilleain/4118095 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AtomTests { | |
public final static IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance(); | |
@Test | |
public void one_four_cyclohexadiene() throws InvalidSmilesException { | |
String acpString = "C0C1C2C3C4C5 0:1(2),0:5(1),1:2(1),2:3(1),3:4(2),4:5(1)"; | |
IAtomContainer cyclohexadiene = AtomContainerPrinter.fromString(acpString, builder); | |
AtomDiscretePartitionRefiner refiner = new AtomDiscretePartitionRefiner(); | |
PermutationGroup aut = refiner.getAutomorphismGroup(cyclohexadiene); | |
for (Permutation automorphism : aut.all()) { | |
System.out.println(automorphism.toCycleString()); | |
} | |
} | |
@Test | |
public void four_H_pyran() throws InvalidSmilesException { | |
String acpString = "C0C1C2C3C4O5 0:1(2),0:5(1),1:2(1),2:3(1),3:4(2),4:5(1)"; | |
IAtomContainer cyclohexadiene = AtomContainerPrinter.fromString(acpString, builder); | |
AtomDiscretePartitionRefiner refiner = new AtomDiscretePartitionRefiner(); | |
PermutationGroup aut = refiner.getAutomorphismGroup(cyclohexadiene); | |
for (Permutation automorphism : aut.all()) { | |
System.out.println(automorphism.toCycleString()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment