The infix2pharmml converter translates expressions from the usual mathematical infix notation into the corresponding PharmML markup. PharmML is a markup for pharmacometrics models developed by the DDMoRe consortium.
This is an online version of the converter, version 0.7. Output should be compliant with the PharmML 0.7.x specification.
If you need code conforming to PharmML 0.6, please find the legacy version of this tool (0.6) at this link.
The converter works in either stand-alone model or single-statement mode.
In stand-alone mode it creates a mostly ready-to-run model (encompassing only structural equations). In this mode, several statements can be provided separated by semicolons. Statement types are restricted to variable and derivative variable definitions.
In single-statement mode it converts a variety of statement types into the equivalent PharmML constructs, one at a time. The user is responsible of combining them, and supplying boilerplate code in order to get a fully-functional (e.g., XML-valid) model.
For details, a full list of the converter's features and limitations, and source code, see the project's README and the infix2pharmml project page at SourceForge. Note that this tool is intended to jump-start development; it is no substitute for a full-fledged modeling language.
Click to copy in the input area above.
Stand-alone model mode | Single-statement mode |
y:=A*exp(-alpha*t)+B*exp(-beta*t)
diff(a,t)=b;
diff(A,t)=-k*A;
A:=dose*exp(-k*t) {Exponential decay model};
diff(A1,t)=-Cl*A1/V1+Q*(A2/V2-A1/V1);
diff(E,t)=Rin-Rout*E
diff(G,t)=-(Sg+Si*Z)*G+Sg*Gb+Ra/V;
par v_init=10, a=1; diff(v,t):=a+b; |
1+sqrt(a^2+b^2)
logx(x,e)
A*exp(-alpha*t)+B*exp(-beta*t)
output=1+pi+myfunc(t=sin(x))
diff(q,t)=1+sin(t)
myLength(x,y,z):=x^2+y^2+z^2
sqrt(myLength(x=sin(t),y=4!,z=0)) |
infix2pharmml - Infix notation to PharmML math online converter
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Server use and the data submitted are logged. Do not submit any confidential information. To use the server privately, download the code and use it locally.
Partial funding from the DDMoRe IMI project is gratefully acknowledged.