def geometry(geom, name="default"): """Function to create a molecule object of name *name* from the geometry in string *geom*. Permitted for user use but deprecated in driver in favor of explicit molecule-passing. """ geom = pubchemre.sub(process_pubchem_command, geom) molecule = core.Molecule.create_molecule_from_string(geom) molecule.set_name(name) activate(molecule) return molecule
def geometry(geom, name="default"): """Function to create a molecule object of name *name* from the geometry in string *geom*. Permitted for user use but deprecated in driver in favor of explicit molecule-passing. Comments within the string are filtered. """ core.efp_init() geom = pubchemre.sub(process_pubchem_command, geom) geom = filter_comments(geom) molecule = core.Molecule.create_molecule_from_string(geom) molecule.set_name(name) # Attempt to go ahead and construct the molecule try: molecule.update_geometry() except: core.print_out("Molecule: geometry: Molecule is not complete, please use 'update_geometry'\n" " once all variables are set.\n") activate(molecule) return molecule