From: Michele M. <mat...@eb...> - 2009-02-11 10:09:51
|
Hello list, I would like to know if it's possible to have a python binding for OdeSolver and an example code how to run a timecourse of a model. In particular what I would like to do is: run a model for x time get the species value change one specie value carry on the simulation with the new value for that specie and the last calculated value for all the others. Is possible to do something like that with odeSolver using some python binding? Thanks, Michele. |
From: Michele M. <mat...@eb...> - 2009-02-11 15:54:50
|
Can you tell me how to do that in C/C++? In the worst case scenario I can try to see how to integrate a C code part directly in my application. I need to see if I can achieve the results that I need for my simulation, then I can try to play with swig. If you can send me the swig command you used for perl we can start with really ugly but working python bindings and refine them on the way :) Cheers, Michele. On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: > hi michele, > > things like are in principle possible. Unfortunately the only bindings we > currently have are Perl (experimental) and R bindings. To semi-automate the > generation of the Perl bindings we use SWIG (http://www.swig.org/). > > Since we wanted to avoid to "pollute" the SOSlib Perl namespace with > additional bindings to libSBML types like SBMLDocument_t (they have their > own bindings), the SWIG interface file and typemaps contain a lot of Perl > specific things and I currently don't know how to translate them to their > Python equivalentes. > > I hope to get help with this problem during the SBML hackathon end of > march. > > =;) xtof > > -- > Christoph Flamm > Institut fuer Theoretische Chemie | email: xt...@tb... > Universitaet Wien | phone: ++43-1-4277-527-39 > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > Michele Mattioni writes: > > Hello list, > > > > I would like to know if it's possible to have a python binding for > > OdeSolver and an example code how to run a timecourse of a model. > > > > In particular what I would like to do is: > > > > run a model for x time > > get the species value > > change one specie value > > carry on the simulation with the new value for that specie and the > > last calculated value for all the others. > > > > Is possible to do something like that with odeSolver using some python > > binding? > > > > Thanks, > > Michele. > |
From: Colin G. <c.g...@nc...> - 2009-02-11 16:02:00
|
Hi Michele, An easier way to interface with python is to use the ctypes library (I think it's part of the standard python installation). It would also make your code much more portable. To use ctypes is quite straighforward see www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py for an example of using it with libsbml (of course you should just use the libsbml binding for python that is provided.) To access a C library, you have to be able to build a dynamic version of the library. Christoph, is it possible to create a dynamic version of ODEsolver? HTH, Colin Michele Mattioni wrote: > Can you tell me how to do that in C/C++? > > In the worst case scenario I can try to see how to integrate a C code > part directly in my application. > I need to see if I can achieve the results that I need for my > simulation, then I can try to play with swig. > > If you can send me the swig command you used for perl we can start > with really ugly but working python > bindings and refine them on the way :) > > Cheers, > Michele. > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: >> hi michele, >> >> things like are in principle possible. Unfortunately the only bindings we >> currently have are Perl (experimental) and R bindings. To semi-automate the >> generation of the Perl bindings we use SWIG (http://www.swig.org/). >> >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with >> additional bindings to libSBML types like SBMLDocument_t (they have their >> own bindings), the SWIG interface file and typemaps contain a lot of Perl >> specific things and I currently don't know how to translate them to their >> Python equivalentes. >> >> I hope to get help with this problem during the SBML hackathon end of >> march. >> >> =;) xtof >> >> -- >> Christoph Flamm >> Institut fuer Theoretische Chemie | email: xt...@tb... >> Universitaet Wien | phone: ++43-1-4277-527-39 >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof >> >> Michele Mattioni writes: >> > Hello list, >> > >> > I would like to know if it's possible to have a python binding for >> > OdeSolver and an example code how to run a timecourse of a model. >> > >> > In particular what I would like to do is: >> > >> > run a model for x time >> > get the species value >> > change one specie value >> > carry on the simulation with the new value for that specie and the >> > last calculated value for all the others. >> > >> > Is possible to do something like that with odeSolver using some python >> > binding? >> > >> > Thanks, >> > Michele. >> > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > sbmlsolver-discuss mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > -- Dr Colin Gillespie http://www.mas.ncl.ac.uk/~ncsg3/ |
From: Christoph F. <xt...@tb...> - 2009-02-11 16:27:35
|
hi colin, yes, it is possible, it is done during the generation of the Perl binding. also our compilation-on-the-fly feature required, that we compile the library with the -fPIC option. =;) xtof -- Christoph Flamm Institut fuer Theoretische Chemie | email: xt...@tb... Universitaet Wien | phone: ++43-1-4277-527-39 Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof Colin Gillespie writes: > Hi Michele, > > An easier way to interface with python is to use the ctypes library (I > think it's part of the standard python installation). It would also make > your code much more portable. > > To use ctypes is quite straighforward see > > www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py > > for an example of using it with libsbml (of course you should just use > the libsbml binding for python that is provided.) > > To access a C library, you have to be able to build a dynamic version of > the library. > > Christoph, is it possible to create a dynamic version of ODEsolver? > > HTH, > > Colin > > > > Michele Mattioni wrote: > > Can you tell me how to do that in C/C++? > > > > In the worst case scenario I can try to see how to integrate a C code > > part directly in my application. > > I need to see if I can achieve the results that I need for my > > simulation, then I can try to play with swig. > > > > If you can send me the swig command you used for perl we can start > > with really ugly but working python > > bindings and refine them on the way :) > > > > Cheers, > > Michele. > > > > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: > >> hi michele, > >> > >> things like are in principle possible. Unfortunately the only bindings we > >> currently have are Perl (experimental) and R bindings. To semi-automate the > >> generation of the Perl bindings we use SWIG (http://www.swig.org/). > >> > >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with > >> additional bindings to libSBML types like SBMLDocument_t (they have their > >> own bindings), the SWIG interface file and typemaps contain a lot of Perl > >> specific things and I currently don't know how to translate them to their > >> Python equivalentes. > >> > >> I hope to get help with this problem during the SBML hackathon end of > >> march. > >> > >> =;) xtof > >> > >> -- > >> Christoph Flamm > >> Institut fuer Theoretische Chemie | email: xt...@tb... > >> Universitaet Wien | phone: ++43-1-4277-527-39 > >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > >> > >> Michele Mattioni writes: > >> > Hello list, > >> > > >> > I would like to know if it's possible to have a python binding for > >> > OdeSolver and an example code how to run a timecourse of a model. > >> > > >> > In particular what I would like to do is: > >> > > >> > run a model for x time > >> > get the species value > >> > change one specie value > >> > carry on the simulation with the new value for that specie and the > >> > last calculated value for all the others. > >> > > >> > Is possible to do something like that with odeSolver using some python > >> > binding? > >> > > >> > Thanks, > >> > Michele. > >> > > > > ------------------------------------------------------------------------------ > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > build responsive, highly engaging applications that combine the power of local > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > _______________________________________________ > > sbmlsolver-discuss mailing list > > sbm...@li... > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > -- > Dr Colin Gillespie > http://www.mas.ncl.ac.uk/~ncsg3/ |
From: Michele M. <mat...@eb...> - 2009-02-11 18:06:01
|
Hi Colin, Hi Christoff, thanks for the reply and for the suggestions. I will try to give a go to the ctypes and see if I can easily replicate the examples in the example folder. How can I compile the library with the -fPIC flag? Thanks, Michele. On Wed, Feb 11, 2009 at 4:27 PM, Christoph Flamm <xt...@tb...> wrote: > hi colin, > > yes, it is possible, it is done during the generation of the Perl > binding. also our compilation-on-the-fly feature required, that we compile > the library with the -fPIC option. > > =;) xtof > > -- > Christoph Flamm > Institut fuer Theoretische Chemie | email: xt...@tb... > Universitaet Wien | phone: ++43-1-4277-527-39 > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > Colin Gillespie writes: > > Hi Michele, > > > > An easier way to interface with python is to use the ctypes library (I > > think it's part of the standard python installation). It would also make > > your code much more portable. > > > > To use ctypes is quite straighforward see > > > > www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py > > > > for an example of using it with libsbml (of course you should just use > > the libsbml binding for python that is provided.) > > > > To access a C library, you have to be able to build a dynamic version of > > the library. > > > > Christoph, is it possible to create a dynamic version of ODEsolver? > > > > HTH, > > > > Colin > > > > > > > > Michele Mattioni wrote: > > > Can you tell me how to do that in C/C++? > > > > > > In the worst case scenario I can try to see how to integrate a C code > > > part directly in my application. > > > I need to see if I can achieve the results that I need for my > > > simulation, then I can try to play with swig. > > > > > > If you can send me the swig command you used for perl we can start > > > with really ugly but working python > > > bindings and refine them on the way :) > > > > > > Cheers, > > > Michele. > > > > > > > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: > > >> hi michele, > > >> > > >> things like are in principle possible. Unfortunately the only bindings we > > >> currently have are Perl (experimental) and R bindings. To semi-automate the > > >> generation of the Perl bindings we use SWIG (http://www.swig.org/). > > >> > > >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with > > >> additional bindings to libSBML types like SBMLDocument_t (they have their > > >> own bindings), the SWIG interface file and typemaps contain a lot of Perl > > >> specific things and I currently don't know how to translate them to their > > >> Python equivalentes. > > >> > > >> I hope to get help with this problem during the SBML hackathon end of > > >> march. > > >> > > >> =;) xtof > > >> > > >> -- > > >> Christoph Flamm > > >> Institut fuer Theoretische Chemie | email: xt...@tb... > > >> Universitaet Wien | phone: ++43-1-4277-527-39 > > >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > >> > > >> Michele Mattioni writes: > > >> > Hello list, > > >> > > > >> > I would like to know if it's possible to have a python binding for > > >> > OdeSolver and an example code how to run a timecourse of a model. > > >> > > > >> > In particular what I would like to do is: > > >> > > > >> > run a model for x time > > >> > get the species value > > >> > change one specie value > > >> > carry on the simulation with the new value for that specie and the > > >> > last calculated value for all the others. > > >> > > > >> > Is possible to do something like that with odeSolver using some python > > >> > binding? > > >> > > > >> > Thanks, > > >> > Michele. > > >> > > > > > > ------------------------------------------------------------------------------ > > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > > build responsive, highly engaging applications that combine the power of local > > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > > _______________________________________________ > > > sbmlsolver-discuss mailing list > > > sbm...@li... > > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > > > > -- > > Dr Colin Gillespie > > http://www.mas.ncl.ac.uk/~ncsg3/ > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > sbmlsolver-discuss mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > |
From: Christoph F. <xt...@tb...> - 2009-02-12 12:46:35
|
hi Michele, -fPIC is set by default, since we have the compilation-on-the-fly feature. I will send you the Perl SWIG interface file during the next week. =;) xtof -- Christoph Flamm Institut fuer Theoretische Chemie | email: xt...@tb... Universitaet Wien | phone: ++43-1-4277-527-39 Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof Michele Mattioni writes: > Hi Colin, Hi Christoff, > > thanks for the reply and for the suggestions. > > I will try to give a go to the ctypes and see if I can easily > replicate the examples in the example folder. > > How can I compile the library with the -fPIC flag? > > Thanks, > Michele. > > > On Wed, Feb 11, 2009 at 4:27 PM, Christoph Flamm <xt...@tb...> wrote: > > hi colin, > > > > yes, it is possible, it is done during the generation of the Perl > > binding. also our compilation-on-the-fly feature required, that we compile > > the library with the -fPIC option. > > > > =;) xtof > > > > -- > > Christoph Flamm > > Institut fuer Theoretische Chemie | email: xt...@tb... > > Universitaet Wien | phone: ++43-1-4277-527-39 > > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > > > > Colin Gillespie writes: > > > Hi Michele, > > > > > > An easier way to interface with python is to use the ctypes library (I > > > think it's part of the standard python installation). It would also make > > > your code much more portable. > > > > > > To use ctypes is quite straighforward see > > > > > > www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py > > > > > > for an example of using it with libsbml (of course you should just use > > > the libsbml binding for python that is provided.) > > > > > > To access a C library, you have to be able to build a dynamic version of > > > the library. > > > > > > Christoph, is it possible to create a dynamic version of ODEsolver? > > > > > > HTH, > > > > > > Colin > > > > > > > > > > > > Michele Mattioni wrote: > > > > Can you tell me how to do that in C/C++? > > > > > > > > In the worst case scenario I can try to see how to integrate a C code > > > > part directly in my application. > > > > I need to see if I can achieve the results that I need for my > > > > simulation, then I can try to play with swig. > > > > > > > > If you can send me the swig command you used for perl we can start > > > > with really ugly but working python > > > > bindings and refine them on the way :) > > > > > > > > Cheers, > > > > Michele. > > > > > > > > > > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: > > > >> hi michele, > > > >> > > > >> things like are in principle possible. Unfortunately the only bindings we > > > >> currently have are Perl (experimental) and R bindings. To semi-automate the > > > >> generation of the Perl bindings we use SWIG (http://www.swig.org/). > > > >> > > > >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with > > > >> additional bindings to libSBML types like SBMLDocument_t (they have their > > > >> own bindings), the SWIG interface file and typemaps contain a lot of Perl > > > >> specific things and I currently don't know how to translate them to their > > > >> Python equivalentes. > > > >> > > > >> I hope to get help with this problem during the SBML hackathon end of > > > >> march. > > > >> > > > >> =;) xtof > > > >> > > > >> -- > > > >> Christoph Flamm > > > >> Institut fuer Theoretische Chemie | email: xt...@tb... > > > >> Universitaet Wien | phone: ++43-1-4277-527-39 > > > >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > > >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > >> > > > >> Michele Mattioni writes: > > > >> > Hello list, > > > >> > > > > >> > I would like to know if it's possible to have a python binding for > > > >> > OdeSolver and an example code how to run a timecourse of a model. > > > >> > > > > >> > In particular what I would like to do is: > > > >> > > > > >> > run a model for x time > > > >> > get the species value > > > >> > change one specie value > > > >> > carry on the simulation with the new value for that specie and the > > > >> > last calculated value for all the others. > > > >> > > > > >> > Is possible to do something like that with odeSolver using some python > > > >> > binding? > > > >> > > > > >> > Thanks, > > > >> > Michele. > > > >> > > > > > > > > ------------------------------------------------------------------------------ > > > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > > > build responsive, highly engaging applications that combine the power of local > > > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > > > _______________________________________________ > > > > sbmlsolver-discuss mailing list > > > > sbm...@li... > > > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > > > > > > > -- > > > Dr Colin Gillespie > > > http://www.mas.ncl.ac.uk/~ncsg3/ > > > > ------------------------------------------------------------------------------ > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > build responsive, highly engaging applications that combine the power of local > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > _______________________________________________ > > sbmlsolver-discuss mailing list > > sbm...@li... > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > |
From: Michele M. <mat...@eb...> - 2009-02-12 13:09:10
|
Hi Christoph, when I compile I can generate only a libODES.a . I run ./configure make make install Am I missing something? On Thu, Feb 12, 2009 at 12:46 PM, Christoph Flamm <xt...@tb...> wrote: > hi Michele, > > -fPIC is set by default, since we have the compilation-on-the-fly feature. > > I will send you the Perl SWIG interface file during the next week. > > =;) xtof > > -- > Christoph Flamm > Institut fuer Theoretische Chemie | email: xt...@tb... > Universitaet Wien | phone: ++43-1-4277-527-39 > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > Michele Mattioni writes: > > Hi Colin, Hi Christoff, > > > > thanks for the reply and for the suggestions. > > > > I will try to give a go to the ctypes and see if I can easily > > replicate the examples in the example folder. > > > > How can I compile the library with the -fPIC flag? > > > > Thanks, > > Michele. > > > > > > On Wed, Feb 11, 2009 at 4:27 PM, Christoph Flamm <xt...@tb...> wrote: > > > hi colin, > > > > > > yes, it is possible, it is done during the generation of the Perl > > > binding. also our compilation-on-the-fly feature required, that we compile > > > the library with the -fPIC option. > > > > > > =;) xtof > > > > > > -- > > > Christoph Flamm > > > Institut fuer Theoretische Chemie | email: xt...@tb... > > > Universitaet Wien | phone: ++43-1-4277-527-39 > > > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > > > > > > > Colin Gillespie writes: > > > > Hi Michele, > > > > > > > > An easier way to interface with python is to use the ctypes library (I > > > > think it's part of the standard python installation). It would also make > > > > your code much more portable. > > > > > > > > To use ctypes is quite straighforward see > > > > > > > > www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py > > > > > > > > for an example of using it with libsbml (of course you should just use > > > > the libsbml binding for python that is provided.) > > > > > > > > To access a C library, you have to be able to build a dynamic version of > > > > the library. > > > > > > > > Christoph, is it possible to create a dynamic version of ODEsolver? > > > > > > > > HTH, > > > > > > > > Colin > > > > > > > > > > > > > > > > Michele Mattioni wrote: > > > > > Can you tell me how to do that in C/C++? > > > > > > > > > > In the worst case scenario I can try to see how to integrate a C code > > > > > part directly in my application. > > > > > I need to see if I can achieve the results that I need for my > > > > > simulation, then I can try to play with swig. > > > > > > > > > > If you can send me the swig command you used for perl we can start > > > > > with really ugly but working python > > > > > bindings and refine them on the way :) > > > > > > > > > > Cheers, > > > > > Michele. > > > > > > > > > > > > > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: > > > > >> hi michele, > > > > >> > > > > >> things like are in principle possible. Unfortunately the only bindings we > > > > >> currently have are Perl (experimental) and R bindings. To semi-automate the > > > > >> generation of the Perl bindings we use SWIG (http://www.swig.org/). > > > > >> > > > > >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with > > > > >> additional bindings to libSBML types like SBMLDocument_t (they have their > > > > >> own bindings), the SWIG interface file and typemaps contain a lot of Perl > > > > >> specific things and I currently don't know how to translate them to their > > > > >> Python equivalentes. > > > > >> > > > > >> I hope to get help with this problem during the SBML hackathon end of > > > > >> march. > > > > >> > > > > >> =;) xtof > > > > >> > > > > >> -- > > > > >> Christoph Flamm > > > > >> Institut fuer Theoretische Chemie | email: xt...@tb... > > > > >> Universitaet Wien | phone: ++43-1-4277-527-39 > > > > >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > > > >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > > >> > > > > >> Michele Mattioni writes: > > > > >> > Hello list, > > > > >> > > > > > >> > I would like to know if it's possible to have a python binding for > > > > >> > OdeSolver and an example code how to run a timecourse of a model. > > > > >> > > > > > >> > In particular what I would like to do is: > > > > >> > > > > > >> > run a model for x time > > > > >> > get the species value > > > > >> > change one specie value > > > > >> > carry on the simulation with the new value for that specie and the > > > > >> > last calculated value for all the others. > > > > >> > > > > > >> > Is possible to do something like that with odeSolver using some python > > > > >> > binding? > > > > >> > > > > > >> > Thanks, > > > > >> > Michele. > > > > >> > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > > > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > > > > build responsive, highly engaging applications that combine the power of local > > > > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > > > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > > > > _______________________________________________ > > > > > sbmlsolver-discuss mailing list > > > > > sbm...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > > > > > > > > > > -- > > > > Dr Colin Gillespie > > > > http://www.mas.ncl.ac.uk/~ncsg3/ > > > > > > ------------------------------------------------------------------------------ > > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > > build responsive, highly engaging applications that combine the power of local > > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > > _______________________________________________ > > > sbmlsolver-discuss mailing list > > > sbm...@li... > > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > |
From: Rainer M. <ra...@tb...> - 2009-02-13 05:43:19
|
Hi Michele, Christoph is referring to the CVS version - we recommend to use this one. Unfortunately, we didn't manage to finalize things for a release in a long time (the swig bindings being one of the things that we want to include in the next release), but the CVS version works quite well. Please see http://sourceforge.net/cvs/?group_id=139893 how to obtain the CVS, or just run cvs -z3 -d:pserver:ano...@sb...:/cvsroot/sbmlsolver co -P SBML_odeSolver After checking out, please run the script ./autogen.sh first (you might need additional stuff from the autotools for that). It generates the configure script. Then proceed as usual with ./configure make make install sosLib is then compiled with -fPIC option. HOWEVER, I just have tried this and no .so file is created. I don't know if with -fPIC the .a file can be used in the same way as a shared lib, or why that was apparently enough for creating the perl bindings. Below I have outlined a possible temporary solution to create a libODES.so file, that works for me (ubuntu linux, 32bit) until we manage to include that in the normal configure/make process. Rainer Temporary solution to create a shared lib (.so): After compiling with make, go the src file and call gcc with -shared options manually: cd src gcc -shared -o libODES.so ASTIndexNameNode.o arithmeticCompiler.o charBuffer.o compiler.o cvodeData.o cvodeSolver.o daeSolver.o drawGraph.o integratorInstance.o integratorSettings.o interpol.o modelSimplify.o nullSolver.o odeConstruct.o odeModel.o odeSolver.o processAST.o sbml.o sbmlResults.o sensSolver.o solverError.o util.o -L/usr/local/lib -L/usr/local/grace/lib -L/usr/lib/graphviz -lsundials_ida -lsundials_kinsol -lsundials_cvodes -lsundials_nvecserial -lsbml -lxml2 -lgrace_np -lgvc -lm -ldl -lm -lstdc++ Note, that the library paths "/usr/local/lib" might need to be changed for your installation paths. Also if you compiled without the graphviz and xmgrace functionality, please remove the according arguments, i.e. graphviz: drawGraph.o -L/usr/lib/graphviz -lgvc. xmgrace: -L/usr/local/grace/lib -lgrace_np If you compiled libSBML with another XML library (not default libXML2), please replace the argument -lxml2 with that. You should then get a libODES.so file, and should copy it to the isntallation directory, in my case /usr/local/lib sudo cp libODES.so /usr/local/lib/ Then test, if the examples work with that: cd ../examples make clean make Hope that works for you. On Thu, 2009-02-12 at 13:09 +0000, Michele Mattioni wrote: > Hi Christoph, > > when I compile I can generate only a libODES.a . > I run > ./configure > make > make install > > Am I missing something? > > > On Thu, Feb 12, 2009 at 12:46 PM, Christoph Flamm <xt...@tb...> wrote: > > hi Michele, > > > > -fPIC is set by default, since we have the compilation-on-the-fly feature. > > > > I will send you the Perl SWIG interface file during the next week. > > > > =;) xtof > > > > -- > > Christoph Flamm > > Institut fuer Theoretische Chemie | email: xt...@tb... > > Universitaet Wien | phone: ++43-1-4277-527-39 > > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > > Michele Mattioni writes: > > > Hi Colin, Hi Christoff, > > > > > > thanks for the reply and for the suggestions. > > > > > > I will try to give a go to the ctypes and see if I can easily > > > replicate the examples in the example folder. > > > > > > How can I compile the library with the -fPIC flag? > > > > > > Thanks, > > > Michele. > > > > > > > > > On Wed, Feb 11, 2009 at 4:27 PM, Christoph Flamm <xt...@tb...> wrote: > > > > hi colin, > > > > > > > > yes, it is possible, it is done during the generation of the Perl > > > > binding. also our compilation-on-the-fly feature required, that we compile > > > > the library with the -fPIC option. > > > > > > > > =;) xtof > > > > > > > > -- > > > > Christoph Flamm > > > > Institut fuer Theoretische Chemie | email: xt...@tb... > > > > Universitaet Wien | phone: ++43-1-4277-527-39 > > > > Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > > > A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > > > > > > > > > > Colin Gillespie writes: > > > > > Hi Michele, > > > > > > > > > > An easier way to interface with python is to use the ctypes library (I > > > > > think it's part of the standard python installation). It would also make > > > > > your code much more portable. > > > > > > > > > > To use ctypes is quite straighforward see > > > > > > > > > > www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py > > > > > > > > > > for an example of using it with libsbml (of course you should just use > > > > > the libsbml binding for python that is provided.) > > > > > > > > > > To access a C library, you have to be able to build a dynamic version of > > > > > the library. > > > > > > > > > > Christoph, is it possible to create a dynamic version of ODEsolver? > > > > > > > > > > HTH, > > > > > > > > > > Colin > > > > > > > > > > > > > > > > > > > > Michele Mattioni wrote: > > > > > > Can you tell me how to do that in C/C++? > > > > > > > > > > > > In the worst case scenario I can try to see how to integrate a C code > > > > > > part directly in my application. > > > > > > I need to see if I can achieve the results that I need for my > > > > > > simulation, then I can try to play with swig. > > > > > > > > > > > > If you can send me the swig command you used for perl we can start > > > > > > with really ugly but working python > > > > > > bindings and refine them on the way :) > > > > > > > > > > > > Cheers, > > > > > > Michele. > > > > > > > > > > > > > > > > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: > > > > > >> hi michele, > > > > > >> > > > > > >> things like are in principle possible. Unfortunately the only bindings we > > > > > >> currently have are Perl (experimental) and R bindings. To semi-automate the > > > > > >> generation of the Perl bindings we use SWIG (http://www.swig.org/). > > > > > >> > > > > > >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with > > > > > >> additional bindings to libSBML types like SBMLDocument_t (they have their > > > > > >> own bindings), the SWIG interface file and typemaps contain a lot of Perl > > > > > >> specific things and I currently don't know how to translate them to their > > > > > >> Python equivalentes. > > > > > >> > > > > > >> I hope to get help with this problem during the SBML hackathon end of > > > > > >> march. > > > > > >> > > > > > >> =;) xtof > > > > > >> > > > > > >> -- > > > > > >> Christoph Flamm > > > > > >> Institut fuer Theoretische Chemie | email: xt...@tb... > > > > > >> Universitaet Wien | phone: ++43-1-4277-527-39 > > > > > >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 > > > > > >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof > > > > > >> > > > > > >> Michele Mattioni writes: > > > > > >> > Hello list, > > > > > >> > > > > > > >> > I would like to know if it's possible to have a python binding for > > > > > >> > OdeSolver and an example code how to run a timecourse of a model. > > > > > >> > > > > > > >> > In particular what I would like to do is: > > > > > >> > > > > > > >> > run a model for x time > > > > > >> > get the species value > > > > > >> > change one specie value > > > > > >> > carry on the simulation with the new value for that specie and the > > > > > >> > last calculated value for all the others. > > > > > >> > > > > > > >> > Is possible to do something like that with odeSolver using some python > > > > > >> > binding? > > > > > >> > > > > > > >> > Thanks, > > > > > >> > Michele. > > > > > >> > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > > > > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > > > > > build responsive, highly engaging applications that combine the power of local > > > > > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > > > > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > > > > > _______________________________________________ > > > > > > sbmlsolver-discuss mailing list > > > > > > sbm...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > > > > > > > > > > > > > -- > > > > > Dr Colin Gillespie > > > > > http://www.mas.ncl.ac.uk/~ncsg3/ > > > > > > > > ------------------------------------------------------------------------------ > > > > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > > > > software. With Adobe AIR, Ajax developers can use existing skills and code to > > > > build responsive, highly engaging applications that combine the power of local > > > > resources and data with the reach of the web. Download the Adobe AIR SDK and > > > > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > > > > _______________________________________________ > > > > sbmlsolver-discuss mailing list > > > > sbm...@li... > > > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > > > > > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > sbmlsolver-discuss mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss |
From: Michele M. <mat...@eb...> - 2009-02-13 09:37:06
|
On Fri, Feb 13, 2009 at 5:43 AM, Rainer Machne <ra...@tb...> wrote: > Hi Michele, > > Christoph is referring to the CVS version - we recommend to use this > one. > > Unfortunately, we didn't manage to finalize things for a release in a > long time (the swig bindings being one of the things that we want to > include in the next release), but the CVS version works quite well. > > > Please see http://sourceforge.net/cvs/?group_id=139893 how to obtain the > CVS, or just run > > cvs -z3 > -d:pserver:ano...@sb...:/cvsroot/sbmlsolver > co -P SBML_odeSolver > > After checking out, please run the script > > ./autogen.sh > > first (you might need additional stuff from the autotools for that). > > It generates the configure script. Then proceed as usual with > > ./configure > make > make install > > sosLib is then compiled with -fPIC option. > > HOWEVER, I just have tried this and no .so file is created. I don't know > if with -fPIC the .a file can be used in the same way as a shared lib, > or why that was apparently enough for creating the perl bindings. > That's exaclty where I was stucked :) I was a little bit worried that no .so was showing up but it seems it's a common problem :) > Below I have outlined a possible temporary solution to create a > libODES.so file, that works for me (ubuntu linux, 32bit) until we manage > to include that in the normal configure/make process. > > Rainer > > Temporary solution to create a shared lib (.so): > > After compiling with make, go the src file and call gcc with -shared > options manually: > > cd src > > gcc -shared -o libODES.so ASTIndexNameNode.o arithmeticCompiler.o > charBuffer.o compiler.o cvodeData.o cvodeSolver.o daeSolver.o > drawGraph.o integratorInstance.o integratorSettings.o interpol.o > modelSimplify.o nullSolver.o odeConstruct.o odeModel.o odeSolver.o > processAST.o sbml.o sbmlResults.o sensSolver.o solverError.o util.o > -L/usr/local/lib -L/usr/local/grace/lib -L/usr/lib/graphviz > -lsundials_ida -lsundials_kinsol -lsundials_cvodes -lsundials_nvecserial > -lsbml -lxml2 -lgrace_np -lgvc -lm -ldl -lm -lstdc++ > > Note, that the library paths "/usr/local/lib" might need to be changed > for your installation paths. Also if you compiled without the graphviz > and xmgrace functionality, please remove the according arguments, i.e. > graphviz: drawGraph.o -L/usr/lib/graphviz -lgvc. > xmgrace: -L/usr/local/grace/lib -lgrace_np > The magic command worked and now I have my shared library that can be loaded with ctypes as suggested by Colin. I'm trying to replicate the examples. I'll keep you posted. Thanks for the help. Cheers, Michele. |