<reponame>hasnainroopawalla/chemical-reactions-solver
from reaction_solver.knowledge.atoms import Carbon, Hydrogen, Oxygen
from reaction_solver.utils.molecule import Molecule
from reaction_solver.utils.reaction import Reaction

# molecule = Molecule()

# c1 = molecule.add_atom(Carbon())
# c2 = molecule.add_atom(Carbon())
# c3 = molecule.add_atom(Carbon())
# c4 = molecule.add_atom(Carbon())
# c5 = molecule.add_atom(Carbon())

# h1 = molecule.add_atom(Hydrogen())
# h2 = molecule.add_atom(Hydrogen())
# h3 = molecule.add_atom(Hydrogen())
# h4 = molecule.add_atom(Hydrogen())
# h5 = molecule.add_atom(Hydrogen())
# h6 = molecule.add_atom(Hydrogen())
# h7 = molecule.add_atom(Hydrogen())
# h8 = molecule.add_atom(Hydrogen())
# h9 = molecule.add_atom(Hydrogen())
# h10 = molecule.add_atom(Hydrogen())
# h11 = molecule.add_atom(Hydrogen())
# h12 = molecule.add_atom(Hydrogen())

# o1 = molecule.add_atom(Oxygen())
# # print(molecule.nodes)

# molecule.add_bond(c1, h1)
# molecule.add_bond(c1, h2)
# molecule.add_bond(c1, h3)
# molecule.add_bond(c1, c2)

# molecule.add_bond(c2, c3)
# molecule.add_bond(c2, o1)
# molecule.add_bond(c2, c4)

# molecule.add_bond(c3, h4)
# molecule.add_bond(c3, h5)
# molecule.add_bond(c3, h6)

# molecule.add_bond(c4, h7)
# molecule.add_bond(c4, h8)
# molecule.add_bond(c4, c5)

# molecule.add_bond(c5, h9)
# molecule.add_bond(c5, h10)
# molecule.add_bond(c5, h11)

# molecule.add_bond(o1, h12)


# molecule.visualize()

molecule = Molecule("H3")
molecule.visualize()
# print(molecule.graph.edges())
Reaction().solve(molecule, Hydrogen(), "+")
molecule.visualize()

# molecule.get_un()

from reaction_solver.knowledge.atoms import Carbon, Hydrogen, Oxygen
from reaction_solver.utils.molecule import Molecule
from reaction_solver.utils.reaction import Reaction

# molecule = Molecule()

# c1 = molecule.add_atom(Carbon())
# c2 = molecule.add_atom(Carbon())
# c3 = molecule.add_atom(Carbon())
# c4 = molecule.add_atom(Carbon())
# c5 = molecule.add_atom(Carbon())

# h1 = molecule.add_atom(Hydrogen())
# h2 = molecule.add_atom(Hydrogen())
# h3 = molecule.add_atom(Hydrogen())
# h4 = molecule.add_atom(Hydrogen())
# h5 = molecule.add_atom(Hydrogen())
# h6 = molecule.add_atom(Hydrogen())
# h7 = molecule.add_atom(Hydrogen())
# h8 = molecule.add_atom(Hydrogen())
# h9 = molecule.add_atom(Hydrogen())
# h10 = molecule.add_atom(Hydrogen())
# h11 = molecule.add_atom(Hydrogen())
# h12 = molecule.add_atom(Hydrogen())

# o1 = molecule.add_atom(Oxygen())
# # print(molecule.nodes)

# molecule.add_bond(c1, h1)
# molecule.add_bond(c1, h2)
# molecule.add_bond(c1, h3)
# molecule.add_bond(c1, c2)

# molecule.add_bond(c2, c3)
# molecule.add_bond(c2, o1)
# molecule.add_bond(c2, c4)

# molecule.add_bond(c3, h4)
# molecule.add_bond(c3, h5)
# molecule.add_bond(c3, h6)

# molecule.add_bond(c4, h7)
# molecule.add_bond(c4, h8)
# molecule.add_bond(c4, c5)

# molecule.add_bond(c5, h9)
# molecule.add_bond(c5, h10)
# molecule.add_bond(c5, h11)

# molecule.add_bond(o1, h12)


# molecule.visualize()

molecule = Molecule("H3")
molecule.visualize()
# print(molecule.graph.edges())
Reaction().solve(molecule, Hydrogen(), "+")
molecule.visualize()

# molecule.get_un()
# molecule = Molecule() # c1 = molecule.add_atom(Carbon()) # c2 = molecule.add_atom(Carbon()) # c3 = molecule.add_atom(Carbon()) # c4 = molecule.add_atom(Carbon()) # c5 = molecule.add_atom(Carbon()) # h1 = molecule.add_atom(Hydrogen()) # h2 = molecule.add_atom(Hydrogen()) # h3 = molecule.add_atom(Hydrogen()) # h4 = molecule.add_atom(Hydrogen()) # h5 = molecule.add_atom(Hydrogen()) # h6 = molecule.add_atom(Hydrogen()) # h7 = molecule.add_atom(Hydrogen()) # h8 = molecule.add_atom(Hydrogen()) # h9 = molecule.add_atom(Hydrogen()) # h10 = molecule.add_atom(Hydrogen()) # h11 = molecule.add_atom(Hydrogen()) # h12 = molecule.add_atom(Hydrogen()) # o1 = molecule.add_atom(Oxygen()) # # print(molecule.nodes) # molecule.add_bond(c1, h1) # molecule.add_bond(c1, h2) # molecule.add_bond(c1, h3) # molecule.add_bond(c1, c2) # molecule.add_bond(c2, c3) # molecule.add_bond(c2, o1) # molecule.add_bond(c2, c4) # molecule.add_bond(c3, h4) # molecule.add_bond(c3, h5) # molecule.add_bond(c3, h6) # molecule.add_bond(c4, h7) # molecule.add_bond(c4, h8) # molecule.add_bond(c4, c5) # molecule.add_bond(c5, h9) # molecule.add_bond(c5, h10) # molecule.add_bond(c5, h11) # molecule.add_bond(o1, h12) # molecule.visualize() # print(molecule.graph.edges()) # molecule.get_un()