コード例 #1
0
ファイル: molutil.py プロジェクト: kannon92/psi4
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
コード例 #2
0
ファイル: molutil.py プロジェクト: g-andres/psi4public
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
コード例 #3
0
ファイル: molutil.py プロジェクト: bennybp/psi4
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
コード例 #4
0
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