Beispiel #1
0
 def test_get_compound_mol(self):
     mol = Chem.MolFromSmiles('c1ccccc1')
     compound = message_helpers.build_compound(smiles='c1ccccc1',
                                               name='benzene')
     identifier = compound.identifiers.add()
     identifier.type = identifier.RDKIT_BINARY
     identifier.bytes_value = mol.ToBinary()
     self.assertEqual(
         Chem.MolToSmiles(mol),
         Chem.MolToSmiles(message_helpers.get_compound_mol(compound)))
Beispiel #2
0
def _compound_png(compound):
    mol = message_helpers.get_compound_mol(compound)
    if mol:
        return drawing.mol_to_png(mol)
    return 'no RDKIT_BINARY'