def test_peptide_hot_vector_longer_chain(self): """Tests that a Peptide is created.""" main_chain_residue_seq = "SAAAAAAAA" side_chain_residue_sequences = ["", "", "A", "", "", "A", "", "A", ""] peptide = Peptide(main_chain_residue_seq, side_chain_residue_sequences) side_chain_hot_vector = peptide.get_side_chain_hot_vector() self.assertEqual(len(peptide.get_main_chain.beads_list), 9) self.assertEqual(side_chain_hot_vector, [0, 0, 1, 0, 0, 1, 0, 1, 0])
def test_peptide_constructor(self): """Tests that a Peptide is created.""" main_chain_residue_seq = "SAAR" side_chain_residue_sequences = ["", "", "A", ""] peptide = Peptide(main_chain_residue_seq, side_chain_residue_sequences) side_chain_hot_vector = peptide.get_side_chain_hot_vector() self.assertEqual(len(peptide.get_main_chain.beads_list), 4) self.assertEqual(len(peptide.get_main_chain[2].side_chain.beads_list), 1) assert peptide.get_main_chain[0].side_chain is None assert peptide.get_main_chain[1].side_chain is None assert peptide.get_main_chain[3].side_chain is None self.assertEqual(side_chain_hot_vector, [0, 0, 1, 0])