Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antimony Round-tripping Bug #46

Open
luciansmith opened this issue Nov 8, 2017 · 1 comment
Open

Antimony Round-tripping Bug #46

luciansmith opened this issue Nov 8, 2017 · 1 comment

Comments

@luciansmith
Copy link
Contributor

For the first time in five years, I found an Antimony round-tripping bug. This isn't a priority, I just wanted to file it here so we don't forget about it.

The following code:

model advanced()
  # Create two compartments
  compartment compA=1, compB=0.5 # B is half the volume of A
  species A in compA, B in compB
  # Use the label `J0` for the reaction
  J0: A -> B; k*A
  # C is defined by an assignment rule
  species C
  C := sin(2*time/3.14) # a sine wave
  k = 0.1
  A = 10
  
  # Event: half-way through the simulation,
  # add a bolus of A
  at time>=5: A = A+10
end

Gets round-tripped as:

// Created by libAntimony v2.9.4
model *advanced()

  // Compartments and Species:
  compartment compA, compB;
  species A in compA, B in compB, $C;

  // Assignment Rules:
  C := sin(2*time/3.14);

  // Reactions:
  J0: A -> B; k*A;

  // Events:
  _E0: at time >= 5: A = A + 10;

  // Species initializations:
  A = 10;
  B = ;

  // Compartment initializations:
  compA = 1;
  compB = 0.5;

  // Variable initializations:
  k = 0.1;

  // Other declarations:
  const compA, compB, k;

  // SBO terms:
  // - Compartment SBO Terms:
  default_compartment.sboTerm = SBO:0000410;

end

C gets converted into a boundary species, and the simulations are different. Roadrunner plots the value of C in the first example, but not in the second.

Antimony 2.9.4, Win64, libSBML 5.15.0

Reported by: o0u812

@luciansmith
Copy link
Contributor Author

The SBO term was added by Tellurium, can be deleted

Original comment by: o0u812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant