Skip to content

Commit

Permalink
Merge pull request #252 from CovertLab/bug-fixes
Browse files Browse the repository at this point in the history
Do not request ppGpp when growth rate control is off
  • Loading branch information
thalassemia authored Nov 29, 2024
2 parents 20e16fd + c685a92 commit 78aa2f4
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions ecoli/processes/polypeptide_elongation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,18 @@ def request(self, states, aasInSequences):
request_ppgpp_metabolites = np.zeros(
len(self.process.ppgpp_reaction_metabolites)
)
bulk_request = [
(
self.process.charging_molecule_idx,
requested_molecules.astype(int),
),
(self.process.charged_trna_idx, charged_trna_request.astype(int)),
# Request water for transfer of AA from tRNA for initial polypeptide.
# This is severe overestimate assuming the worst case that every
# elongation is initializing a polypeptide. This excess of water
# shouldn't matter though.
(self.process.water_idx, int(aa_counts_for_translation.sum())),
]
if self.process.ppgpp_regulation:
total_trna_conc = self.counts_to_molar * (
uncharged_trna_counts + charged_trna_counts
Expand All @@ -1126,28 +1138,17 @@ def request(self, states, aasInSequences):

request_ppgpp_metabolites = -delta_metabolites
ppgpp_request = counts(states["bulk"], self.process.ppgpp_idx)
bulk_request.append((self.process.ppgpp_idx, ppgpp_request))
bulk_request.append((
self.process.ppgpp_rxn_metabolites_idx,
request_ppgpp_metabolites.astype(int),
))

return (
fraction_charged,
aa_counts_for_translation,
{
"bulk": [
(
self.process.charging_molecule_idx,
requested_molecules.astype(int),
),
(self.process.charged_trna_idx, charged_trna_request.astype(int)),
# Request water for transfer of AA from tRNA for initial polypeptide.
# This is severe overestimate assuming the worst case that every
# elongation is initializing a polypeptide. This excess of water
# shouldn't matter though.
(self.process.water_idx, int(aa_counts_for_translation.sum())),
(self.process.ppgpp_idx, ppgpp_request),
(
self.process.ppgpp_rxn_metabolites_idx,
request_ppgpp_metabolites.astype(int),
),
],
"bulk": bulk_request,
"listeners": {
"growth_limits": {
"original_aa_supply": self.process.aa_supply,
Expand Down

0 comments on commit 78aa2f4

Please sign in to comment.