Esempio n. 1
0
 def test_GetResultsForBiosensors_absent(self):
     chassis_1_smile = "[H+]"
     chassis_1 = Compound(chassis_1_smile)
     benzoate_chassis = ChemicalCompoundState([chassis_1],
                                              organism=detectable_cmpds_H)
     retrosynthesis = benzoate_chassis.GetResults_from_InChI_Keys(
         rewarding=Basic_Rollout_Reward)
     biosensor = benzoate_chassis.GetResultsForBiosensors(
         rewarding=Basic_Rollout_Reward)
     assert retrosynthesis == -1 and biosensor == -1
Esempio n. 2
0
 def test_GetResultsForBiosensors_present(self):
     chassis_1_smile = "[H+]"
     chassis_1 = Compound(chassis_1_smile)
     benzoate = Compound(
         InChI="InChI=1S/C7H6O2/c8-7(9)6-4-2-1-3-5-6/h1-5H,(H,8,9)/p-1")
     benzoate_chassis = ChemicalCompoundState([benzoate, chassis_1],
                                              organism=detectable_cmpds_H)
     retrosynthesis = benzoate_chassis.GetResults_from_InChI_Keys(
         rewarding=Basic_Rollout_Reward)
     biosensor = benzoate_chassis.GetResultsForBiosensors(
         rewarding=Basic_Rollout_Reward)
     assert retrosynthesis == 0.5 and biosensor == 2