debian/0000755000000000000000000000000012227050167007170 5ustar debian/bin/0000755000000000000000000000000012011170372007730 5ustar debian/bin/cain0000644000000000000000000000007211756634775010617 0ustar #!/bin/sh mkdir -p ~/.cain python /usr/share/cain/Cain.py debian/cain.links0000644000000000000000000000012011756641706011150 0ustar usr/share/cain/help usr/share/doc/cain/help usr/include/cain usr/share/cain/src debian/watch0000644000000000000000000000012011645601251010211 0ustar version=3 opts="uversionmangle=s/_/./" \ http://sf.net/cain/[cC]ain-(\d_\d).zip debian/copyright0000644000000000000000000000374511641774446011150 0ustar This work was packaged for Debian by: Ivo Maintz on Tue, 05 Oct 2010 14:31:33 +0200 It was downloaded from: http://cain.sourceforge.net Upstream Author: Sean Mauch Copyright: License: All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the California Institute of Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The Debian packaging is: Copyright (C) 2010-2011 Ivo Maintz and is licensed under the GPL version 3, see /usr/share/common-licenses/GPL-3 debian/cain-solvers.links0000644000000000000000000000005611756651241012646 0ustar /usr/lib/cain/solvers /usr/share/cain/solvers debian/cain-solvers.install0000644000000000000000000000002611756651231013170 0ustar solvers usr/lib/cain debian/cain.manpages0000644000000000000000000000001211645601251011607 0ustar debian/*1 debian/cain.desktop0000644000000000000000000000033211641774446011507 0ustar [Desktop Entry] Name=Cain Comment=simulations of chemical reactions Exec=/usr/bin/cain Icon=/usr/share/cain/gui/icons/cain.png Terminal=false Type=Application Categories=Development;Science;Biology; StartupNotify=true debian/changelog0000644000000000000000000000563312227045375011056 0ustar cain (1.9-7) unstable; urgency=low * Replace libeigen2-dev by libeigen3-dev. (Thanks for the patch to Anton Gladky ) Closes: #726200 * debian/control: - cme fix dpkg-control - Priority: optional -- Andreas Tille Mon, 14 Oct 2013 21:35:53 +0200 cain (1.9-6) unstable; urgency=low * Enable arch only builds (thanks for the patch to Adam Conrad ) Closes: #685066 -- Andreas Tille Thu, 16 Aug 2012 12:54:18 +0200 cain (1.9-5) unstable; urgency=low [ Ivo Maintz ] * debian/rules: remove lots of superfluos files in help/ and gui/ * fixed broken links in the help LP: #1032304 [ Andreas Tille ] * debian/control: - Build-Depends: zip - Removed quilt from Build-Depends * debian/rules: use xz compression -- Andreas Tille Fri, 10 Aug 2012 14:09:53 +0200 cain (1.9-4) unstable; urgency=low * debian/rules: Enable binary only builds Closes: #674235 -- Andreas Tille Thu, 24 May 2012 09:48:53 +0200 cain (1.9-3) unstable; urgency=low [ Ivo Maintz ] * added a simple manpage [ Andreas Tille ] * debian/upstream: Add publication information * debian/patches/gcc-4.7.patch: Fix build failure with GCC 4.7. (Thanks for the patch to Matthias Klose ) Closes: #672045 * debian/patches/*: DEP3 descriptions for patches * debian/control: Standards-Version: 3.9.3 (no changes needed) * debhelper 9 (control+compat) * debian/{dirs,docs}: deleted because unused * debian/patches/hardening.patch: Propagate hardening flags * debian/rules: Rewritten to use short dh which finally cares for the propagation of hardening flags (when doing so use installation via direct debhelper control files: *.install) * debian/cain-solvers.{install,links}: install solvers into usr/lib/cain/solvers rather than usr/lib/solvers * debian/menu: Use existing menu section -- Andreas Tille Tue, 22 May 2012 07:59:45 +0200 cain (1.9-2) unstable; urgency=low * changed the partitioning of the package -- Ivo Maintz Thu, 13 Oct 2011 13:12:12 +0200 cain (1.9-1) unstable; urgency=low * New upstream release -- Ivo Maintz Wed, 28 Sep 2011 12:02:11 +0200 cain (1.8-1) natty; urgency=low * update from upstream -- Ivo Maintz Fri, 23 Sep 2011 14:18:03 +0200 cain (1.6-3) natty; urgency=low * now the solvers are build, too -- Ivo Maintz Wed, 22 Jun 2011 13:01:39 +0200 cain (1.6-2) natty; urgency=low * recompiled for natty -- Ivo Maintz Thu, 05 May 2011 10:09:41 +0200 cain (1.6-1) unstable; urgency=low * Update from Upstream -- Ivo Maintz Mon, 07 Feb 2011 12:18:23 +0100 cain (1.5-1) unstable; urgency=low * Initial release -- Ivo Maintz Tue, 05 Oct 2010 14:31:33 +0200 debian/README.Debian0000644000000000000000000000103211645601251011224 0ustar cain (1.9-2) unstable; urgency=low * For a minimal footprint of the cain package for the regular users, the following split into packages was decided: cain (platform independent) cain-examples (platform independent) cain-solvers (compiled for every architecture) * The python module of cain does not have the character of a a module that would be used as such by external tools. Consequently, there is no separate python-cain package. -- Ivo Maintz Thu, 13 Oct 2011 13:12:12 +0200 debian/cain.install0000644000000000000000000000033311756641642011503 0ustar gui usr/share/cain help usr/share/cain/ fio usr/share/cain src/* usr/include/cain simulation usr/share/cain state usr/share/cain *.py usr/share/cain/ debian/*.desktop usr/share/applications debian/bin usr debian/cain.10000644000000000000000000000117111641774446010200 0ustar .\"Created with mcedit .TH cain "1" "September 30, 2011" "cain" "" .SH NAME cain \- stochastic and deterministic simulations of chemical reactions .SH SYNOPSIS .B cain .SH DESCRIPTION This manual page explains the .B cain program. .PP \fBcain\fP is a software application for stochastic and deterministic simulations of chemical reactions. .SH OPTIONS There are no command line options yet .SH "SEE ALSO" .TP .BR /usr/share/cain/doc/help help files, also accessible via the cain gui .TP .BR /usr/share/doc/cain/examples a lot of examples .PP See also the documentation on the webpage at .TP debian/source/0000755000000000000000000000000012011170372010460 5ustar debian/source/format0000644000000000000000000000001411641774446011712 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211756631521010373 0ustar 9 debian/patches/0000755000000000000000000000000012227043540010614 5ustar debian/patches/eigen3.patch0000644000000000000000000000206712227043540013014 0ustar Description: Use Debian packaged libeigen Author: Ivo Maintz Date: Wed, 28 Sep 2011 12:02:11 +0200 Last-Update: 2013-10-13 (Anton Gladky , move to Eigen3) --- a/src/stochastic/TauLeapingImplicit.h +++ b/src/stochastic/TauLeapingImplicit.h @@ -13,8 +13,8 @@ #include "../numerical/random/poisson/PoissonGeneratorInvAcNormSure.h" -#include "../third-party/Eigen/LU" -#include "../third-party/Eigen/Array" +#include "/usr/include/eigen3/Eigen/LU" +#include "/usr/include/eigen3/Eigen/Core" namespace stochastic { --- a/src/stochastic/TauLeapingImplicit.ipp +++ b/src/stochastic/TauLeapingImplicit.ipp @@ -153,10 +153,10 @@ //std::cout << "Jacobian =\n" << jacobian << '\n' //<< "f = \n" << f << '\n'; Eigen::VectorXd delta(N); - jacobian.lu().solve(f, &delta); + delta = jacobian.fullPivLu().solve(f); x += delta; //std::cout << "delta =\n" << delta << '\n'; - if (delta.cwise().abs().sum() < tolerance) { + if (delta.cwiseAbs().sum() < tolerance) { break; } } debian/patches/gcc-4.7.patch0000644000000000000000000000135311756627251012716 0ustar Author: Matthias Klose Date: Tue, 22 May 2012 00:23:34 +0000 Description: Fix FTBFS issue when using gcc-4.7 --- cain-1.9.orig/src/stochastic/HistogramsAverageAps.h +++ cain-1.9/src/stochastic/HistogramsAverageAps.h @@ -159,7 +159,7 @@ for (typename array::StaticArrayOfArrays::const_iterator i = _reactionInfluence.begin(reactionIndex); i != _reactionInfluence.end(reactionIndex); ++i) { - sum += _propensitiesFunctor(*i, _state.getPopulations()) - + sum += this->_propensitiesFunctor(*i, _state.getPopulations()) - _discreteGenerator[*i]; } // Record the probabilities for this state. debian/patches/series0000644000000000000000000000010112227043540012021 0ustar cain.patch eigen3.patch gcc-4.7.patch hardening.patch help.patch debian/patches/cain.patch0000644000000000000000000000412711756630021012555 0ustar Description: Fix some build issues - Propagate options into Makefile - fix clean target in Makefile - Add misssing header files - Enable local error logging in user homedir Author: Ivo Maintz Date: Wed, 28 Sep 2011 12:02:11 +0200 --- cain-1.9.orig/Makefile +++ cain-1.9/Makefile @@ -2,7 +2,7 @@ # By default make the solvers. default: - $(MAKE) -C src/solvers $(MAKEFLAGS) $(MAKECMDGOALS) + $(MAKE) -C src/solvers again: @@ -17,6 +17,8 @@ rm -rf Cain.app/Contents/Resources/simulation rm -rf Cain.app/Contents/Resources/solvers rm -rf Cain.app/Contents/Resources/state + rm -f solvers/* + rm -f src/solvers/*.d test: nosetests --with-doctest -v simulation state --- cain-1.9.orig/gui/Application.py +++ cain-1.9/gui/Application.py @@ -7,6 +7,7 @@ import wx from MainFrame import MainFrame from resourcePath import resourcePath +from os.path import expanduser, join class Application(wx.App): """The application class for Cain.""" @@ -14,7 +15,7 @@ def __init__(self): """Construct the base class and redirect the output.""" if not sys.platform in ('win32', 'win64'): - wx.App.__init__(self, redirect=True, filename="ErrorLog.txt") + wx.App.__init__(self, redirect=True, filename=join(expanduser('~'),".cain","ErrorLog.txt")) else: # On windows we might not have write permission for the log file. wx.App.__init__(self) --- cain-1.9.orig/src/ads/indexedPriorityQueue/IndexedPriorityQueueBinaryHeap.h +++ cain-1.9/src/ads/indexedPriorityQueue/IndexedPriorityQueueBinaryHeap.h @@ -9,7 +9,7 @@ #define __ads_indexedPriorityQueue_IndexedPriorityQueueBinaryHeap_h__ #include "IndexedPriorityQueueBase.h" - +#include #include namespace ads { --- cain-1.9.orig/src/ads/indexedPriorityQueue/IndexedPriorityQueueBinaryHeapPair.h +++ cain-1.9/src/ads/indexedPriorityQueue/IndexedPriorityQueueBinaryHeapPair.h @@ -9,6 +9,7 @@ #define __ads_indexedPriorityQueue_IndexedPriorityQueueBinaryHeapPair_h__ #include "IndexedPriorityQueueBase.h" +#include namespace ads { debian/patches/hardening.patch0000644000000000000000000000064711756637264013625 0ustar Description: Propagate hardening flags Author: Andreas Tille Date: Tue, 22 May 2012 07:59:45 +0200 --- cain-1.9.orig/src/solvers/Makefile +++ cain-1.9/src/solvers/Makefile @@ -51,7 +51,7 @@ # Implicit rules. .cc.d: - $(CXX) -MM $(CXXINCLUDE) $< > $@.$$$$; \ + $(CXX) $(CPPFLAGS) -MM $(CXXFLAGS) $(LDFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ $(RM) $@.$$$$ debian/patches/help.patch0000644000000000000000000000364412011173367012576 0ustar Description: b0rken links This patch fixes some broken links in the documentation. . cain (1.9-2) unstable; urgency=low . * changed the partitioning of the package Author: Ivo Maintz Bug-Ubuntu: https://bugs.launchpad.net/bugs/1032304 Last-Update: Fri, 10 Aug 2012 11:40:11 +0200 --- cain-1.9.orig/help/UserSolvers.htm +++ cain-1.9/help/UserSolvers.htm @@ -221,14 +221,14 @@ The methods that require exponential dev is generated by a linear search on the groups followed by selecting a reaction within a group with the method of rejection. This solver implements a slightly modified version of the composition - rejection method presented in [Slepoy 2008]. + rejection method presented in [Slepoy 2008].
  • Binary search, full CMF - Generate O(log M). Modify O(M). The cumulative mass function (CMF) is stored in an array. This allows one to generate a discrete deviate with a binary search on that array. At each time step the CMF is regenerated. This is an implementation - of the logarithmic direct method [Li 2006]. + of the logarithmic direct method [Li 2006].
  • Binary search, sorted CMF - Generate O(log M). Modify O(M). @@ -244,7 +244,7 @@ The methods that require exponential dev - Generate O(log M). Modify O(log M). Instead of storing the full CMF, a partial, recursive CMF is used. This approach is equivalent to the method presented in - [Gibson 2000]. A deviate can be generated + [Gibson 2000]. A deviate can be generated with a binary search. Modifying a propensity affects at most log2 M elements of the partial, recursive CMF.
  • debian/menu0000644000000000000000000000015411756654050010066 0ustar ?package(cain):needs="X11" section="Applications/Science/Chemistry"\ title="cain" command="/usr/bin/cain" debian/rules0000755000000000000000000000312412013150513010235 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 SRC_TMP=$(CURDIR)/SRC_TMP debtmp := $(CURDIR)/debian/tmp pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p') VERSION := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d- -f1) UVERSION := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d- -f1 | sed 's/\./_/g') %: dh $@ --with python2 override_dh_install-indep: dh_install rm -rf debian/$(pkg)/usr/share/cain/help/* debian/$(pkg)/usr/share/cain/gui/help.htm* cd help && zip ../debian/$(pkg)/usr/share/cain/help/cain.htb * -r -q -x *.htb *.htd if [ -d debian/$(pkg)/usr/share/cain/ ] ; then \ find debian/$(pkg)/usr/share/cain/ -type f -executable -exec chmod 644 {} + ; \ fi override_dh_auto_test: echo "no tests implemented" override_dh_builddeb: dh_builddeb -- -Z xz get-orig-source: rm -rf $(SRC_TMP) && mkdir $(SRC_TMP) #[ -f ../cain_$(VERSION).zip ] || wget -O ../cain_$(VERSION).zip http://sf.net/cain/Cain-$(UVERSION).zip # URL did not work [ -f ../cain_$(VERSION).zip ] || wget -O ../cain_$(VERSION).zip http://qa.debian.org/watch/sf.php/cain/Cain-$(UVERSION).zip cd $(SRC_TMP) && unzip ../../cain_$(VERSION).zip mv $(SRC_TMP)/Cain $(SRC_TMP)/cain-$(VERSION) find $(SRC_TMP) -name __MACOSX -type d | xargs -r rm -rf find $(SRC_TMP) -iname .DS_Store -exec rm -f {} + find $(SRC_TMP) -iname .scons* -exec rm -f {} + rm -f $(SRC_TMP)/cain-$(VERSION)/solvers/* rm -rf $(SRC_TMP)/cain-$(VERSION)/src/third-party/* cd $(SRC_TMP) && tar cvzf ../../cain_$(VERSION).orig.tar.gz cain-$(VERSION) rm -rf $(SRC_TMP) debian/control0000644000000000000000000001010212227050167010565 0ustar Source: cain Maintainer: Debian Med Packaging Team Uploaders: Ivo Maintz , Andreas Tille Section: science Priority: optional Build-Depends: debhelper (>= 9), python-all-dev, python (<< 3.0), libeigen3-dev, zip Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/cain/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/cain/trunk/ Homepage: http://cain.sourceforge.net Package: cain Architecture: all Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python (<< 3.0), python-wxgtk2.8, python-matplotlib, python-numpy, python-scipy, python-sympy, cain-solvers Recommends: cain-examples Description: simulations of chemical reactions Cain performs stochastic and deterministic simulations of chemical reactions. It can spawn multiple simulation processes to utilize multi-core computers. It stores models, methods, and simulation output (populations and reaction counts) in an XML format. In addition, SBML models can be imported and exported. The models and methods can be read from input files or edited within the program. . The GUI (Graphical User Interface) is written in Python and uses the wxPython toolkit. Most of the solvers are implemented as command line executables, written in C++, which are driven by Cain. This makes it easy to launch batch jobs. It also simplifies the process of adding new solvers. Cain offers a variety of solvers: * Gillespie's direct method. * Gillespie's first reaction method. * Gibson and Bruck's next reaction method. * Tau-leaping. * Hybrid direct/tau-leaping. * ODE integration. . This package provides the architecture independent files for cain Package: cain-solvers Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libeigen3-dev Description: simulations of chemical reactions Cain performs stochastic and deterministic simulations of chemical reactions. It can spawn multiple simulation processes to utilize multi-core computers. It stores models, methods, and simulation output (populations and reaction counts) in an XML format. In addition, SBML models can be imported and exported. The models and methods can be read from input files or edited within the program. . The GUI (Graphical User Interface) is written in Python and uses the wxPython toolkit. Most of the solvers are implemented as command line executables, written in C++, which are driven by Cain. This makes it easy to launch batch jobs. It also simplifies the process of adding new solvers. Cain offers a variety of solvers: * Gillespie's direct method. * Gillespie's first reaction method. * Gibson and Bruck's next reaction method. * Tau-leaping. * Hybrid direct/tau-leaping. * ODE integration. . This package provides the solver libraries Package: cain-examples Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, cain Description: simulations of chemical reactions Cain performs stochastic and deterministic simulations of chemical reactions. It can spawn multiple simulation processes to utilize multi-core computers. It stores models, methods, and simulation output (populations and reaction counts) in an XML format. In addition, SBML models can be imported and exported. The models and methods can be read from input files or edited within the program. . The GUI (Graphical User Interface) is written in Python and uses the wxPython toolkit. Most of the solvers are implemented as command line executables, written in C++, which are driven by Cain. This makes it easy to launch batch jobs. It also simplifies the process of adding new solvers. Cain offers a variety of solvers: * Gillespie's direct method. * Gillespie's first reaction method. * Gibson and Bruck's next reaction method. * Tau-leaping. * Hybrid direct/tau-leaping. * ODE integration. . This package provides the cain examples debian/cain-examples.links0000644000000000000000000000007511756641571012775 0ustar usr/share/cain/examples usr/share/doc/cain-examples/examples debian/README.Debian-source0000644000000000000000000000061511643416715012537 0ustar the source package have only .zip file format and a invalid version number unzip Cain-1_9.zip cd Cain # remove superfluous files and directories rm -rf ../__MACOSX find . -iname .DS_Store -exec rm -f {} + find . -iname .scons* -exec rm -f {} + # clean the solvers directory rm -f solvers/* # remove third-party files rm -rf src/third-party/* tar cvzf ../cain_1.9.orig.tar.gz . cd .. rm -rf Cain/ debian/upstream0000644000000000000000000000047611754176171010772 0ustar Reference: Author: Sean Mauch and Mark Stalzer Title: Efficient Formulations for Exact Stochastic Simulation of Chemical Systems Journal: IEEE/ACM Trans. Comput. Biol. Bioinformatics Year: 2011 Volume: 8 Number: 1 Pages: 27-35 DOI: 10.1109/TCBB.2009.47 URL: http://dl.acm.org/citation.cfm?id=1916605 debian/cain-examples.install0000644000000000000000000000003011756641561013311 0ustar examples usr/share/cain