def test_drugs():
    import openeye.oechem
    database_filename = utils.get_data_filename("chemicals/drugs/Zdd.mol2.gz")
    ifs = openeye.oechem.oemolistream(database_filename)
    for molecule in ifs.GetOEMols():
        with utils.enter_temp_directory():
            molecule_name, tripos_mol2_filename = utils.molecule_to_mol2(molecule)
            yield utils.tag_description(lambda : utils.test_molecule(molecule_name, tripos_mol2_filename), "Testing drugs %s" % molecule_name)
def test_common_molecules():
    import openeye.oechem
    for molecule_name in molecules:
        molecule = openmoltools.openeye.iupac_to_oemol(molecule_name)
        molecule = openmoltools.openeye.get_charges(molecule)
        with utils.enter_temp_directory():
            tripos_mol2_filename = 'molecule.mol2'
            molecule_name, tripos_mol2_filename = utils.molecule_to_mol2(molecule, tripos_mol2_filename=tripos_mol2_filename)
            yield utils.tag_description(lambda : utils.test_molecule('molecule', tripos_mol2_filename), "Testing molecule %s" % molecule_name)
Example #3
0
def test_drugs():
    import openeye.oechem
    database_filename = utils.get_data_filename("chemicals/drugs/Zdd.mol2.gz")
    ifs = openeye.oechem.oemolistream(database_filename)
    for molecule in ifs.GetOEMols():
        with utils.enter_temp_directory():
            molecule_name, tripos_mol2_filename = utils.molecule_to_mol2(
                molecule)
            yield utils.tag_description(
                lambda: utils.test_molecule(molecule_name, tripos_mol2_filename
                                            ),
                "Testing drugs %s" % molecule_name)
Example #4
0
def test_link_in_utils():
    m0 = openmoltools.openeye.iupac_to_oemol("benzene")
    m1 = openmoltools.openeye.get_charges(m0)
    with utils.enter_temp_directory():
        # This function was moved from utils to openeye, so check that the old link still works.
        utils.molecule_to_mol2(m1, "out.mol2")
Example #5
0
def test_link_in_utils():
    m0 = openmoltools.openeye.iupac_to_oemol("benzene")
    m1 = openmoltools.openeye.get_charges(m0)
    with utils.enter_temp_directory():
        # This function was moved from utils to openeye, so check that the old link still works.
        utils.molecule_to_mol2(m1, "out.mol2")