def test_calc_kcf_matrix(self): """ calc_kcf_matrixのテスト """ mat = KCFmat() mat.input_molfile(PATH) mat.input_molfile(PATH) mat.calc_kcf_matrix() self.assertNotEqual(len(mat.all_mat), 0) self.assertNotEqual(len(mat.mat), 0)
def test_input_molfile(self): """ input_from_molfileのテスト """ KEGG_ATOM_LABEL = \ {0: {'atom_class': 'C8', 'atom_species': 'C', 'kegg_atom': 'C8y'}, 1: {'atom_class': 'C8', 'atom_species': 'C', 'kegg_atom': 'C8x'}, 2: {'atom_class': 'C8', 'atom_species': 'C', 'kegg_atom': 'C8x'}, 3: {'atom_class': 'C4', 'atom_species': 'C', 'kegg_atom': 'C4a'}, 4: {'atom_class': 'C8', 'atom_species': 'C', 'kegg_atom': 'C8x'}, 5: {'atom_class': 'C8', 'atom_species': 'C', 'kegg_atom': 'C8x'}, 6: {'atom_class': 'O4', 'atom_species': 'O', 'kegg_atom': 'O4a'}, 7: {'atom_class': 'C8', 'atom_species': 'C', 'kegg_atom': 'C8y'}, 8: {'atom_class': 'O1', 'atom_species': 'O', 'kegg_atom': 'O1a'}} mat = KCFmat() mat.input_molfile(PATH) mat.input_molfile(PATH) self.assertIsInstance(mat.kcf_vecs[0], KCFvec) self.assertIsInstance(mat.kcf_vecs[1], KCFvec) self.assertEqual(mat.kcf_vecs[0].kegg_atom_label, KEGG_ATOM_LABEL)