package signature.chemistry;

public class MoleculeFactory {
    
    public static Molecule threeCycle() {
        Molecule molecule = new Molecule("C", 3);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 2);
        molecule.addSingleBond(1, 2);
        return molecule;
    }
    
    public static Molecule fourCycle() {
        Molecule molecule = new Molecule("C", 4);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 3);
        molecule.addSingleBond(1, 2);
        molecule.addSingleBond(2, 3);
        return molecule;
    }
    
    public static Molecule fiveCycle() {
        Molecule molecule = new Molecule("C", 5);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 4);
        molecule.addSingleBond(1, 2);
        molecule.addSingleBond(2, 3);
        molecule.addSingleBond(3, 4);
        return molecule;
    }
    
    public static Molecule sixCycle() {
        Molecule molecule = new Molecule("C", 6);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 5);
        molecule.addSingleBond(1, 2);
        molecule.addSingleBond(2, 3);
        molecule.addSingleBond(3, 4);
        molecule.addSingleBond(4, 5);
        return molecule;
    }
    
    public static Molecule threeStar() {
        Molecule molecule = new Molecule("C", 4);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 2);
        molecule.addSingleBond(0, 3);
        return molecule;
    }
    
    public static Molecule fourStar() {
        Molecule molecule = new Molecule("C", 5);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 2);
        molecule.addSingleBond(0, 3);
        molecule.addSingleBond(0, 4);
        return molecule;
    }
    
    public static Molecule fiveStar() {
        Molecule molecule = new Molecule("C", 6);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 2);
        molecule.addSingleBond(0, 3);
        molecule.addSingleBond(0, 4);
        molecule.addSingleBond(0, 5);
        return molecule;
    }
    
    public static Molecule propellane() {
        Molecule molecule = new Molecule("C", 5);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 4);
        molecule.addSingleBond(1, 2);
        molecule.addSingleBond(1, 3);
        molecule.addSingleBond(1, 4);
        molecule.addSingleBond(2, 4);
        molecule.addSingleBond(3, 4);
        return molecule;
    }
    
    public static Molecule methylatedCyclobutane() {
        Molecule molecule = new Molecule("C", 5);
//        molecule.addSingleBond(0, 1);
//        molecule.addSingleBond(1, 2);
//        molecule.addSingleBond(1, 3);
//        molecule.addSingleBond(1, 4);
//        molecule.addSingleBond(2, 4);
//        molecule.addSingleBond(3, 4);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 2);
        molecule.addSingleBond(0, 3);
        molecule.addSingleBond(0, 4);
        molecule.addSingleBond(2, 3);
        molecule.addSingleBond(3, 4);
        return molecule;
    }
    
    public static Molecule pseudopropellane() {
        Molecule molecule = new Molecule("C", 5);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 4);
        molecule.addSingleBond(1, 2);
        molecule.addSingleBond(1, 3);
        molecule.addSingleBond(2, 4);
        molecule.addSingleBond(3, 4);
        return molecule;
    }

    // note that this cannot physically exist, 
    // as the bond strain would be too high 
    public static Molecule sixCage() {
        Molecule molecule = new Molecule("C", 6);
        molecule.addSingleBond(0, 1);
        molecule.addSingleBond(0, 2);
        molecule.addSingleBond(0, 3);
        molecule.addSingleBond(1, 2);
        molecule.addSingleBond(1, 3);
        molecule.addSingleBond(2, 5);
        molecule.addSingleBond(3, 4);
        molecule.addSingleBond(3, 5);
        molecule.addSingleBond(4, 5);
        return molecule;
    }

}

@@ -55,24 +55,450 @@
 tory %7B%0A    %0A
+    public static Molecule methane() %7B%0A        Molecule molecule = new Molecule();%0A        molecule.addAtom(%22C%22);%0A        molecule.addAtom(%22H%22);%0A        molecule.addAtom(%22H%22);%0A        molecule.addAtom(%22H%22);%0A        molecule.addAtom(%22H%22);%0A        molecule.addSingleBond(0, 1);%0A        molecule.addSingleBond(0, 2);%0A        molecule.addSingleBond(0, 3);%0A        molecule.addSingleBond(0, 4);%0A        return molecule;%0A    %7D%0A    %0A
     public s

Create methane method