Giter VIP home page Giter VIP logo

hilltau's People

Contributors

hrani avatar upibhalla avatar

Watchers

 avatar  avatar  avatar

hilltau's Issues

yet another different behavior compared to CppCode v/s PythonCode

Json File : eqn_with_constants.json
{ "FileType": "HillTau",
"Constants": { "molBase": 100, "KA": 1, "tau": 1.0, "eqBase":0.0002, "eqScale": 2.0},
"Groups": {
"output_g": {
"Species": {"mol": "molBase" },
"Reacs": {
"output": {"subs": ["mol", "input"],
"KA": "KA", "tau": "tau" }
},
"Eqns": { "eq": "eqBase + eqScale * input + mol + output" }
}
}
}
pytho-vs-cpp.txt
To get equation from json file, we query via e,t = modelpath.eqnInfo.items()

CppCode: returns
name = eq
mol = ['input', 'mol', 'output']
eqnstr = 0.0002 + 2.0 * input + mol + output

In cppCode the constants are replace with values in the 'eqnstr' and consts are not populated

PythonCode: returns
name = eq
mol = ['input', 'mol', 'output']
eqnstr = eqBase + eqScale * input + mol + output
consts = ['eqBase', 'eqScale']
eqnstr = returns exact equation which is written in json file and consts list is populated

different behavior PythonCode/hillTau.py v/s CppCode/hillTau.py

Difference behaviour is observed with using PythonCode v/s CppCode
E.g aut6.json
"S6K_g": {
"Species": { "S6K": 0.2733 },
"Reacs": {
"gS6K": {
"tau": 203.0, "KA": 0.01, "baseline": 0.01997,
"subs": [ "S6K", "glu", "glu" ]
},
}
},
"glu_g": {
"Species": { "glu": 0.0 }
},

Species glu is placed under glu_g when we use PythonCode/hillTau.py
But when we use CppCode/hillTau.py species glu is placed under S6K_g group which is wrong
One can check this
for molname, mol in ( modelpath.molInfo.items() ):
print ("species ",molname,mol.grp)

species glu S6K_g (when path is CppCode)
species glu glu_g (when path is PythonCode)

need to restrict duplicate names within the json file

"Groups": {
"input_g": {
"Species": {"mol1": 0.0 }
},
"output_g": {
"Species": {"mol": 1.0,"mol1":1.0}
}
mol1 is duplicate name which exist in different groups while reading HillTau script over writes the first group species name and stores only second one.
We need to restrict this by warning error, else user is unaware as this happens silently

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.