Exemplo n.º 1
0
 def __get_mol_id(self, chebi_id):
     '''COMMENT'''
     directory = os.path.dirname(os.path.realpath(__file__))
     textfile_read = open(directory + '/ChEBI_' + str(chebi_id) + '.mol',
                          'r')
     mol_read = textfile_read.read()
     this_structure = Structure(mol_read, Structure.mol, 2)
     self.assertEquals(this_structure, parsers.get_mol(chebi_id))
Exemplo n.º 2
0
 def test_get_smiles(self):
     '''COMMENT'''
     this_structure = Structure(
         'NC(=[NH2+])NCC[C@H](O)[C@H]([NH3+])C([O-])=O', Structure.SMILES,
         1)
     self.assertEquals(this_structure, parsers.get_smiles(73938))
Exemplo n.º 3
0
 def test_get_inchi_key_neg_type(self):
     '''COMMENT'''
     this_structure = Structure('VIDUVSPOWYVZIC-IMJSIDKUSA-O',
                                Structure.mol, 1)
     self.assertNotEquals(this_structure, parsers.get_inchi_key(73938))
Exemplo n.º 4
0
 def test_get_inchi_key_neg_dim(self):
     '''COMMENT'''
     this_structure = Structure('VIDUVSPOWYVZIC-IMJSIDKUSA-O',
                                Structure.InChIKey, 123456)
     self.assertNotEquals(this_structure, parsers.get_inchi_key(73938))
Exemplo n.º 5
0
 def test_get_inchi_key_neg_struct(self):
     '''COMMENT'''
     this_structure = Structure('made_up', Structure.InChIKey, 1)
     self.assertNotEquals(this_structure, parsers.get_inchi_key(73938))