Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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