Original chem_graph.cpp