PageSourceSearch

https://dune-copasi.netlify.app/assets/js/a94edffa.6b855700.js

js dune-copasi.netlify.app collected 2026-10-03 10:40:50 UTC 17,061 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdune_copasi_docusaurus=self.webpackChunkdune_copasi_docusaurus||[]).push([[957],{9586:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>m,contentTitle:()=>p,default:()=>x,frontMatter:()=>c,metadata:()=>h,toc:()=>f});var t=i(4848),o=i(8453),r=i(1470),s=i(9365),a=i(1302),l=i(2826),u=i(1543),d=i(2478);const c={id:"use_cli",title:"Command Line Interface Usage",description:"How to use the Command Line Interface",sidebar_label:"Use as CLI",tags:["CLI"]},p=void 0,h={id:"use_cli",title:"Command Line Interface Usage",description:"How to use the Command Line Interface",source:"@site/versioned_docs/version-v2.1.0/use_cli.mdx",sourceDirName:".",slug:"/use_cli",permalink:"/docs/use_cli",draft:!1,unlisted:!1,editUrl:"https://gitlab.dune-project.org/copasi/dune-copasi/-/edit/master/doc/docusaurus/versioned_docs/version-v2.1.0/use_cli.mdx",tags:[{inline:!0,label:"CLI",permalink:"/docs/tags/cli"}],version:"v2.1.0",lastUpdatedBy:"Santiago Ospina De Los R\xedos",lastUpdatedAt:1732665958e3,frontMatter:{id:"use_cli",title:"Command Line Interface Usage",description:"How to use the Command Line Interface",sidebar_label:"Use as CLI",tags:["CLI"]},sidebar:"docs",previous:{title:"Usage Options",permalink:"/docs/category/docs/use"},next:{title:"Use as GUI",permalink:"/docs/use_gui"}},m={},f=[{value:"Configuration options",id:"configuration-options",level:3},{value:"Version",id:"version",level:3},{value:"Running the program",id:"running-the-program",level:3}];function g(e){const n={a:"a",admonition:"admonition",code:"code",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"Installation Guide",type:"tip",children:(0,t.jsxs)(n.p,{children:["Check out our ",(0,t.jsx)(n.a,{href:"install",children:"Installation Documentation"})," to find the optimal way to install ",(0,t.jsx)(n.code,{children:"dune-copasi"})," and access the Command Line Interface!"]})}),"\n",(0,t.jsx)(n.admonition,{title:"CLI on the Web Browser",type:"tip",children:(0,t.jsxs)(n.p,{children:["If you're interested in exploring and using the Command Line Interface (CLI) without installation, you're in luck! The ",(0,t.jsx)(n.a,{href:"try",children:"Web Browser executable"})," allows you to interact with the CLI directly from any device. No setup required\u2014just open your browser and start experimenting!"]})}),"\n",(0,t.jsxs)(n.p,{children:["In this form, we provide one executable named ",(0,t.jsx)(n.code,{children:"dune-copasi"})," for running forward simulations from the command line.\nThis executable is completely configurable from the command line arguments passed to it."]}),"\n",(0,t.jsx)(n.h3,{id:"configuration-options",children:"Configuration options"}),"\n",(0,t.jsxs)(n.p,{children:["By running the program with the command line arguments ",(0,t.jsx)(n.code,{children:"--help"})," or ",(0,t.jsx)(n.code,{children:"--help-full"}),", it will result in the\npossible configuration options to run the program:"]}),"\n",(0,t.jsx)(u.A,{}),"\n",(0,t.jsx)(n.admonition,{title:"Configuration Options",type:"tip",children:(0,t.jsxs)(n.p,{children:["For more information on the possible options to successfully run a simulation, make sure to visit the ",(0,t.jsx)(n.a,{href:"param_tree",children:"Configuration Options"}),", and the ",(0,t.jsx)(n.a,{href:"/tutorials",children:"Tutorials"})," documentations!"]})}),"\n",(0,t.jsx)(n.h3,{id:"version",children:"Version"}),"\n",(0,t.jsxs)(n.p,{children:["By running the program with the command line argument ",(0,t.jsx)(n.code,{children:"--version"}),", you can find out the installed version of DuneCopasi:"]}),"\n",(0,t.jsx)(l.A,{title:"Getting DuneCopasi version",children:[{input:"dune-copasi --version",output:["2.1.0"]}]}),"\n",(0,t.jsx)(n.h3,{id:"running-the-program",children:"Running the program"}),"\n",(0,t.jsxs)(n.p,{children:["By parsing a initialization file ",(0,t.jsx)(n.code,{children:"config.ini"})," to the DuneCopasi solver it will exactly know how to construct the problem and the simulation will be started.\nOnce it finished you should get the message ",(0,t.jsx)(n.code,{children:"dune-copasi successfully finished :)"})," by the end simulation logs."]}),"\n",(0,t.jsxs)(n.admonition,{title:"configuration file example",type:"tip",children:[(0,t.jsxs)(n.p,{children:["Having installed we are now set to test the DuneCopasi solver.\nTo do this we will create a simple initialization file. We write the code of the minimal example to the file ",(0,t.jsx)(n.code,{children:"config.ini"}),":"]}),(0,t.jsx)(a.A,{language:"ini",title:"~/workdir/config.ini",showLineNumbers:!0,children:d.A}),(0,t.jsx)(n.p,{children:"In case of the example above, you have just set up the heat equation with an initial Gaussian distribution (it doesn't save it though)."})]}),"\n",(0,t.jsxs)(r.A,{groupId:"cli-type",defaultValue:"native",values:[{label:"Native",value:"native"},{label:"Docker",value:"docker"}],children:[(0,t.jsx)(s.A,{value:"native",children:(0,t.jsx)(l.A,{prompt:"~/workdir$",title:"Running DuneCopasi",children:[{input:"dune-copasi --config=config.ini",output:["[2024-03-21 12:38:32.479] [info] Reading configuration file '~/wor
1kdir/config.ini'","[2024-03-21 12:38:32.479] [info] Starting dune-copasi (version: 2.0.0)",'[2024-03-21 12:38:32.580] [info] Axis names are set to: ["x", "y", "z"]',"...","...","[2024-03-21 12:38:32.723] [info] dune-copasi successfully finished :)"]}]})}),(0,t.jsx)(s.A,{value:"docker",children:(0,t.jsx)(l.A,{prompt:"~/workdir$",title:"Running DuneCopasi (with docker)",children:[{input:"chmod o+rw $PWD"},{input:"docker run -v $PWD:/dunecopasi dune-copasi --config=config.ini",output:["[2024-03-21 12:38:32.479] [info] Reading configuration file '~/workdir/config.ini'","[2024-03-21 12:38:32.479] [info] Starting dune-copasi (version: 2.0.0)",'[2024-03-21 12:38:32.580] [info] Axis names are set to: ["x", "y", "z"]',"...","...","[2024-03-21 12:38:32.723] [info] dune-copasi successfully finished :)"]}]})})]}),"\n",(0,t.jsxs)(n.p,{children:["Note that the ",(0,t.jsx)(n.a,{href:"output",children:"output files"})," produced by DuneCopasi are relative to the directory where\n",(0,t.jsx)(n.code,{children:"dune-copasi"})," is started, hence, it is recommended to run the program within a working directory, for example ",(0,t.jsx)(n.code,{children:"~/workdir"}),"."]}),"\n",(0,t.jsxs)(n.admonition,{title:"Simulation Failed?",type:"warning",children:[(0,t.jsx)(n.p,{children:"A failed simulation may look instead like this:"}),(0,t.jsx)(l.A,{prompt:"~/workdir$",title:"Running DuneCopasi (failure)",children:[{input:"dune-copasi --config=config.ini",output:["[2024-03-21 12:38:32.479] [info] Reading configuration file '~/workdir/config.ini'","[2024-03-21 12:38:32.479] [info] Starting dune-copasi (version: 2.0.0)",'[2024-03-21 12:38:32.580] [info] Axis names are set to: ["x", "y", "z"]',"...","...","[2024-03-21 12:38:32.723] [error] Dune reported error:","[2024-03-21 12:38:32.723] [error]   Message:        Basis has dimension 0, make sure to have at least one 'scalar_field' with a non-empty 'compartment'","[2024-03-21 12:38:32.723] [error]   Exception type: Dune::InvalidStateException","[2024-03-21 12:38:32.723] [error] dune-copasi finished with some errors :("]}]}),(0,t.jsx)(n.p,{children:"If your simulation failed, it's worth to ask yourself the following questions:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"What are the contents of your configuration options and what's the expected behavior?"}),"\n",(0,t.jsxs)(n.li,{children:["What are the ",(0,t.jsx)(n.strong,{children:"warning"})," and ",(0,t.jsx)(n.strong,{children:"error"})," logs provided by program? Do they give you hints on how to solve the problem?"]}),"\n",(0,t.jsx)(n.li,{children:"What is stage of the simulation where the problem failed?"}),"\n"]}),(0,t.jsx)(n.p,{children:"In particular, remember that providing no configuration options gives an invalid simulation\n(what would be the simulation for this?), therefore the program rightfully fails."})]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},9365:(e,n,i)=>{i.d(n,{A:()=>s});i(6540);var t=i(8215);const o={tabItem:"tabItem_Ymn6"};var r=i(4848);function s(e){let{children:n,hidden:i,className:s}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.A)(o.tabItem,s),hidden:i,children:n})}},1470:(e,n,i)=>{i.d(n,{A:()=>w});var t=i(6540),o=i(8215),r=i(3104),s=i(6347),a=i(205),l=i(7485),u=i(1682),d=i(679);function c(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:i}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return c(e).map((e=>{let{props:{value:n,label:i,attributes:t,default:o}}=e;return{value:n,label:i,attributes:t,default:o}}))}(i);return function(e){const n=(0,u.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,i])}function h(e){let{value:n,tabValues:i}=e;return i.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:i}=e;const o=(0,s.W6)(),r=function(e){let{queryString:n=!1,groupId:i}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!i)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:n,groupId:i});return[(0,l.aZ)(r),(0,t.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(o.location.search);n.set(r,e),o.replace({...o.location,search:n.toString()})}),[r,o])]}function f(e){const{defaultValue:n,queryString:i=!1,groupId:o}=e,r=p(e),[s,l]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!h({value:n,tabValues:i}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=i.find((e=>e.default))??i[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:r}))),[u,c]=m({queryString:i,groupId:o}),[f,g]=function(e){let{groupId:n}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(n),[o,r]=(0,d.Dv)(i);return[o,(0,t.useCallback)((e=>{i&&r.set(e)}),[i,r])]}({groupId:o}),x=(()=>{const e=u??f;return h({value:e,tabValues:r})?e:null})();(0,a.A)((()=>{x&&l(x)}),[x]);return{selectedValue:s,selectValue:(0,t.useCallback)((e=>{if(!h({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),g(e)}),[c,g,r]),tabValues:r}}var g=i(2303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=i(4848);function v(e){let{className:n,block:i,selectedValue:t,selectValue:s,tabValues:a}=e;const l=[],{blockElementScrollPositionUntilNextRender:u}=(0,r.a_)(),d=e=>{const n=e.currentTarget,i=l.indexOf(n),o=a[i].value;o!==t&&(u(n),s(o))},c=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const i=l.indexOf(e.currentTarget)+1;n=l[i]??l[0];break}case"ArrowLeft":{const i=l.indexOf(e.currentTarget)-1;n=l[i]??l[l.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":i},n),children:a.map((e=>{let{value:n,label:i,attributes:r}=e;return(0,b.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>
1l.push(e),onKeyDown:c,onClick:d,...r,className:(0,o.A)("tabs__item",x.tabItem,r?.className,{"tabs__item--active":t===n}),children:i??n},n)}))})}function y(e){let{lazy:n,children:i,selectedValue:r}=e;const s=(Array.isArray(i)?i:[i]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===r));return e?(0,t.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function j(e){const n=f(e);return(0,b.jsxs)("div",{className:(0,o.A)("tabs-container",x.tabList),children:[(0,b.jsx)(v,{...n,...e}),(0,b.jsx)(y,{...n,...e})]})}function w(e){const n=(0,g.A)();return(0,b.jsx)(j,{...e,children:c(e.children)},String(n))}},2826:(e,n,i)=>{i.d(n,{A:()=>r});i(6540);var t=i(1308),o=i(4848);function r(e){let{children:n,prompt:i,title:r}=e;i=i||"~$";const s={custom:{themeBGColor:"rgb(41, 45, 62)",themeToolbarColor:"#ffffff1a",themeColor:"rgb(191, 199, 213)",themePromptColor:"rgb(130, 170, 255)"}},a=e=>(0,o.jsx)("span",{style:{color:s.custom.themePromptColor,WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},children:e}),l=(0,o.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:n.map(((e,n)=>(0,o.jsxs)("span",{children:[a(e.prompt?e.prompt:i)," ",(0,o.jsx)("span",{children:Array.isArray(e.input)?e.input.map(((e,n)=>(0,o.jsxs)("span",{children:[e," ",(0,o.jsx)("br",{})]},n))):(0,o.jsxs)("span",{children:[" ",e.input," ",(0,o.jsx)("br",{})]})}),e.output&&e.output.map(((e,n)=>(0,o.jsxs)("span",{children:[e," ",(0,o.jsx)("br",{})]},n)))]},n)))}),u={display:"inline-block",width:"10px",float:"left",height:"10px",background:"#f9f9f9",borderRadius:"50%",margin:"8px 4px 0 0"};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{width:"100%",borderRadius:"7px 7px 7px 7px",WebkitBoxShadow:"rgba(0, 0, 0, 0.3) 0 1px 3px",MozBoxShadow:"rgba(0,0,0,0.3) 0 1px 3px",BoxShadow:"rgba(0, 0, 0, 0.3) 0 1px 3px",WebkitFontSmoothing:"antialiased",textRendering:"optimizelegibility"},children:(0,o.jsx)("div",{style:{width:"100%",position:"relative",WebkitBoxSizing:"border-box",borderRadius:"7px 7px 7px 7px"},children:(0,o.jsxs)("div",{style:{background:"rgb(244,244,239)",width:"100%",borderRadius:"7px 7px 7px 7px"},children:[(0,o.jsxs)("div",{style:{height:"25px",padding:"0px 10px",color:"#4d494d",textAlign:"center",fontFamily:"HelveticaNeue, 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif"},children:[(0,o.jsx)("div",{style:{...u,background:"#FF6057",border:"1px solid #E14640"}}),(0,o.jsx)("div",{style:{...u,background:"#FFBD2E",border:"1px solid #DFA123"}}),(0,o.jsx)("div",{style:{...u,background:"rgba(218, 218, 213)",border:"1px solid rgba(203, 203, 196)"}}),(0,o.jsx)("div",{style:{height:"10px",textAlign:"center",fontSize:14,opacity:.75,WebkitFontSmoothing:"antialiased",textRendering:"optimizelegibility"},children:r&&(0,o.jsx)(o.Fragment,{children:r})})]}),(0,o.jsx)("div",{style:{width:"100%",background:"rgb(41,45,62)",margin:"0px auto",borderRadius:"0px 0px 7px 7px",padding:"7px 7px 7px",position:"relative",WebkitBoxSizing:"border-box",boxSizing:"border-box"},children:(0,o.jsx)(t.XL,{children:(0,o.jsx)(t.e,{prompt:i,theme:"custom",themes:s,showControlButtons:!1,welcomeMessage:l,enableInput:!1,showControlBar:!1})})})]})})}),(0,o.jsx)("br",{})]})}},1543:(e,n,i)=>{i.d(n,{A:()=>r});var t=i(2826),o=i(4848);function r(e){let{prefix:n}=e;return n=n||"",(0,o.jsx)(t.A,{title:"Command Line Interface of DuneCopasi",children:[{input:`${n}
1dune-copasi --help`,output:["USAGE: dune-copasi [options]","","Numerical simulator for diffusion-reaction systems on single or multiple compartments","","Website: <https://dune-copasi.netlify.app>","","OPTIONS:","","  -h / --help          - Display this help.","  --help-full          - Display this help with long descriptions.","  --version            - Display the version of this program.","  --parser-default     - Display the default parser.","  --parser-list        - Display the parsers available for this program.","  --dimension-list     - Display the grid dimensions available for this program.","  --dump-config        - Dumps configuration in the INI format to stdout.","  --config=<string>    - Specifies a config file in INI format. See Configuration Options.","  --{key}={value}      - Overrides key=value sections of the config file. See Configuration Options.","","..."]}]})}},2478:(e,n,i)=>{i.d(n,{A:()=>t});const t="[grid]\ndimension = 2\nextensions = 2 2\norigin = -1 -1\nrefinement_level = 5\n\n[compartments.domain]\ntype = expression\nexpression = 1\n\n[model.scalar_field.u]\ncompartment = domain\ncross_diffusion.u.expression = 0.005\ninitial.expression = exp(-(position_x^2+position_y^2+position_z^2)/(4*0.005)) / (4*3.14159265359*0.005)\nstorage.expression = 1\n\n[model.time_step_operator]\ntime_begin = 1\ntime_end = 4\n"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.