示例#1
0
    def test_structural_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = {
         "iupacName": "2,3-dihydro-1,4-benzodioxin",
         "smiles": "OC[C@H]1COc2c(O1)cccc2N1CCN(CC1)CCNC(=O)c1ccc(cc1)F",
         "inchi": "InChI=1S/C22H26FN3O4/c23-17-6-4-16(5-7-17)22(28)24-8-9-25-10",
         "inchiKey": "NYSDRDDQELAVKP-SFHVURJKSA-N",
         "oneLetterSeq": "ILK",
         "threeLetterSeq": "Ile-Leu-Lys",
         "postTranslationalModifications": "Glycosylation",
         "chemicalModifications": "Methylation"
        }
        ligand = Ligand(self.ligand_json)

        self.assertEqual(ligand.iupac_name(), "2,3-dihydro-1,4-benzodioxin")
        self.assertEqual(
         ligand.smiles(),
         "OC[C@H]1COc2c(O1)cccc2N1CCN(CC1)CCNC(=O)c1ccc(cc1)F"
        )
        self.assertEqual(
         ligand.inchi(),
         "InChI=1S/C22H26FN3O4/c23-17-6-4-16(5-7-17)22(28)24-8-9-25-10"
        )
        self.assertEqual(ligand.inchi_key(), "NYSDRDDQELAVKP-SFHVURJKSA-N")
        self.assertEqual(ligand.one_letter_sequence(), "ILK")
        self.assertEqual(ligand.three_letter_sequence(), "Ile-Leu-Lys")
        self.assertEqual(
         ligand.post_translational_modifications(),
         "Glycosylation"
        )
        self.assertEqual(ligand.chemical_modifications(), "Methylation")
示例#2
0
    def test_structural_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = {
            "iupacName": "2,3-dihydro-1,4-benzodioxin",
            "smiles": "OC[C@H]1COc2c(O1)cccc2N1CCN(CC1)CCNC(=O)c1ccc(cc1)F",
            "inchi":
            "InChI=1S/C22H26FN3O4/c23-17-6-4-16(5-7-17)22(28)24-8-9-25-10",
            "inchiKey": "NYSDRDDQELAVKP-SFHVURJKSA-N",
            "oneLetterSeq": "ILK",
            "threeLetterSeq": "Ile-Leu-Lys",
            "postTranslationalModifications": "Glycosylation",
            "chemicalModifications": "Methylation"
        }
        ligand = Ligand(self.ligand_json)

        self.assertEqual(ligand.iupac_name(), "2,3-dihydro-1,4-benzodioxin")
        self.assertEqual(
            ligand.smiles(),
            "OC[C@H]1COc2c(O1)cccc2N1CCN(CC1)CCNC(=O)c1ccc(cc1)F")
        self.assertEqual(
            ligand.inchi(),
            "InChI=1S/C22H26FN3O4/c23-17-6-4-16(5-7-17)22(28)24-8-9-25-10")
        self.assertEqual(ligand.inchi_key(), "NYSDRDDQELAVKP-SFHVURJKSA-N")
        self.assertEqual(ligand.one_letter_sequence(), "ILK")
        self.assertEqual(ligand.three_letter_sequence(), "Ile-Leu-Lys")
        self.assertEqual(ligand.post_translational_modifications(),
                         "Glycosylation")
        self.assertEqual(ligand.chemical_modifications(), "Methylation")
示例#3
0
 def test_structural_properties_when_no_json(self, mock_json_retriever):
     mock_json_retriever.return_value = None
     ligand = Ligand(self.ligand_json)
     self.assertIs(ligand.iupac_name(), None)
     self.assertIs(ligand.smiles(), None)
     self.assertIs(ligand.inchi(), None)
     self.assertIs(ligand.inchi_key(), None)
     self.assertIs(ligand.one_letter_sequence(), None)
     self.assertIs(ligand.three_letter_sequence(), None)
     self.assertIs(ligand.post_translational_modifications(), None)
     self.assertIs(ligand.chemical_modifications(), None)
示例#4
0
 def test_structural_properties_when_no_json(self, mock_json_retriever):
     mock_json_retriever.return_value = None
     ligand = Ligand(self.ligand_json)
     self.assertIs(ligand.iupac_name(), None)
     self.assertIs(ligand.smiles(), None)
     self.assertIs(ligand.inchi(), None)
     self.assertIs(ligand.inchi_key(), None)
     self.assertIs(ligand.one_letter_sequence(), None)
     self.assertIs(ligand.three_letter_sequence(), None)
     self.assertIs(ligand.post_translational_modifications(), None)
     self.assertIs(ligand.chemical_modifications(), None)