diff --git a/Makefile b/Makefile deleted file mode 100644 index 3df49b3d6716d97edac4b4b4f31b66f12f55e8db..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1,512 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment, -#** also known as GENESIS 3 base code. -#** copyright (C) 2003- 2006 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ -####################################################################### -# NOTE: -# This Makefile is compatible with _GNU Make_. -# This does not work with nmake or borland make. -# You may have to specify some variables when calling gnu make as -# described in the comments below. The defaults should work on most -# Unix clones. -######################################################################## - -# Linux compilation: -# We recommend two levels of compilation: either full debug, with gdb, -# unit tests and all the rest, or an optimized version for production -# simulations, without any unit tests or assertions. If you want some -# intermediate levels, edit the flags. -###################################################################### -# -# ADDITIONAL COMMANDLINE VARIABLES FOR MAKE -# -###################################################################### -# The variable BUILD determines if it should be optimized (release) -# or a debug version (default). -# make can be run with a command line parameter like below: -# make clean BUILD=debug -# make BUILD=debug -# another option is to define BUILD as an environment variable: -# export BUILD=debug -# make clean -# make -# -# There are some more variables which just need to be defined for -# controlling the compilation and the value does not matter. These are: -# -# USE_GSL - use GNU Scientific Library for integration in kinetic simulations -# -# USE_READLINE - use the readline library which provides command history and -# better command line editing capabilities -# -# GENERATE_WRAPPERS - useful for python interface developers. The binary created -# with this option looks for a directory named 'generated' in the -# working directory and creates a wrapper class ( one .h file -# and a .cpp file ) and partial code for the swig interface file -# (pymoose.i). These files with some modification can be used for -# generating the python interface using swig. -# -# USE_MPI - compile with support for parallel computing through MPICH library - - -# Default values for flags. The operator ?= assigns the given value only if the -# variable is not already defined. - -USE_HDF5?=1 -USE_CUDA?=0 -USE_NEUROKIT?=0 -PYTHON?=2 -# BUILD (= debug, release) -ifndef BUILD -BUILD=release -endif - -#If using mac uncomment the following lines -# PLATFORM=mac -#export PLATFORM - -# Get the processor architecture - i686 or x86_64 -# All these should be taken care of in a script, not in the -# Makefile. But we are -ifndef MACHINE -MACHINE=i686 -endif -# We are assuming all non-win32 systems to be POSIX compliant -# and thus have the command uname for getting Unix system name -ifneq ($(OSTYPE),win32) -MACHINE=$(shell uname -m) -PLATFORM := $(shell uname -s) -endif - -USE_NUMPY=1 -# Debug mode: - -ifeq ($(BUILD),debug) -CXXFLAGS = -g -O0 -fpermissive -fno-strict-aliasing -fPIC -fno-inline-functions -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER -USE_GSL = true -endif -# Optimized mode: -ifeq ($(BUILD),release) -CXXFLAGS = -O3 -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER -USE_GSL = true -endif -# Profiling mode: -ifeq ($(BUILD),profile) -CXXFLAGS = -O3 -pg -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER -USE_GSL = true -endif -# Profiling mode with gperftoools -ifeq ($(BUILD),gperf) -CXXFLAGS = -O3 -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER -LDFLAGS += -lprofiler -ltcmalloc -USE_GSL = true -endif -# Threading mode: -ifeq ($(BUILD),thread) -CXXFLAGS = -O3 -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER -USE_GSL = true -endif - -# MPI mode: -ifeq ($(BUILD),mpi) -CXXFLAGS = -g -fpermissive -fno-strict-aliasing -fPIC -fno-inline-functions -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER -USE_MPI = 1 -USE_GSL = true -endif - -# optimized MPI mode: -ifeq ($(BUILD),ompi) -CXXFLAGS = -O3 -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER -USE_MPI = 1 -USE_GSL = true -endif - -# optimised mode but with unit tests. -ifeq ($(BUILD),odebug) -CXXFLAGS = -O3 -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER -USE_GSL = true -endif - -# including SMOLDYN -ifdef USE_SMOLDYN -CXXFLAGS = -g -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER -USE_GSL = true -endif - -# Use a strict compilation -ifeq ($(BUILD),developer) - CXXFLAGS=-g \ - -Wall -Werror -Wno-unused-variable -Wno-unused-function \ - -DDO_UNIT_TESTS -DDEVELOPER -DDEBUG - USE_GSL = true -endif -########################################################################## -# -# MAC OS X compilation, Debug mode: -ifeq ($(PLATFORM),Darwin) -CXXFLAGS += -DMACOSX # GCC compiler also sets __APPLE__ for Mac OS X which can be used instead -CXXFLAGS += -Wno-deprecated -force_cpusubtype_ALL -mmacosx-version-min=10.4 -endif -# Use the options below for compiling on GCC4.1 -# GNU C++ 4.1 and newer might need -ffriend-injection -# -#CXXFLAGS = -g -Wall -pedantic -DDO_UNIT_TESTS -ffriend-injection -DUSE_GENESIS_PARSER - -# Insert the svn revision no. into the code as a preprocessor macro. -# Only for release versions we want to pass SVN=0 to make. -# No more SVN so pass zero -SVN=0 -ifndef SVN -SVN?=1 -endif -empty := -space := $(empty) $(empty) -ifneq ($(SVN),0) -# Some versions of svnrevision return "Unversioned directory" which causes confusion to gcc -SVN_REVISION := $(shell svnversion) -SVN_REVISION := $(subst $(space),_,$(SVN_REVISION)) -# SVN_REVISION := $(subst :,_,$(SVN_REVISION)) -ifneq ($(SVN_REVISION),export) -CXXFLAGS+=-DSVN_REVISION=\"$(SVN_REVISION)\" -endif -endif - - -# Libraries are defined below. -SUBLIBS = -# Notice that pthread is no more included -LIBS = -L/usr/lib -L/usr/local/lib - -#LIBS = -lm - -# For 64 bit Linux systems add paths to 64 bit libraries -ifeq ($(PLATFORM),Linux) -CXXFLAGS += -DLINUX -ifeq ($(MACHINE),x86_64) -LIBS+= -L/lib64 -L/usr/lib64 -endif -endif - -########################################################################## -# -# Developer options (Don't try these unless you are writing new code!) -########################################################################## -# For parallel (MPI) version: -ifdef USE_MUSIC -USE_MPI = 1 # Automatically enable MPI if USE_MUSIC is on -CXXFLAGS += -DUSE_MUSIC -LIBS += -lmusic -endif - -# The -DMPICH_IGNORE_CXX_SEEK flag is because of a bug in the -# MPI-2 standard. Enabled by default because it use crops up -# often enough. You won't need if if you are not using MPICH, or -# if your version of MPICH has fixed the issue. -ifdef USE_MPI -# CXXFLAGS += -DUSE_MPI -CXXFLAGS += -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK -endif - -#use this for readline library -#CXXFLAGS = -g -Wall -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER -DUSE_READLINE - - -# To use GSL, pass USE_GSL=true ( anything on the right will do) in make command line -ifdef USE_GSL -LIBS+= $(shell gsl-config --libs) -#LIBS+= -L/usr/lib -Wl,--no-as-needed -lgsl -lgslcblas -lm -#LIBS+= -L/usr/lib -lgsl -lgslcblas -lm -CXXFLAGS+= -DUSE_GSL -else -LIBS+= -lm -endif - -#Saeed -# To use CUDA, pass USE_CUDA=1 in make command line -ifeq ($(USE_CUDA),1) -LIBS+= -L/usr/local/cuda/lib64 -LhsolveCuda/cudaLibrary -lcuda -lcudart -lm -lmooseCudaLibrary -HCUDA_DIR = hsolveCuda -HCUDA_LIB = hsolveCuda/_hsolveCuda.o -endif - -# To disable numpy pass USE_NUMPY=0 -ifeq ($(USE_NUMPY),1) -CXXFLAGS+=-DUSE_NUMPY -endif - -# To compile examples, pass EXAMPLES=true ( anything on the right will do) in make command line -ifdef EXAMPLES -EXAMPLES_DIR = examples -EXAMPLES_LIB = examples/_trials.o -endif - -# To use Smoldyn, pass USE_SMOLDYN=true ( anything on the right will do) in make command line -ifdef USE_SMOLDYN -#LIBS+= -L/usr/local/lib -lsmoldyn -CXXFLAGS+= -DUSE_SMOLDYN -SMOLDYN_DIR = smol -SMOLDYN_LIB = smol/_smol.o /usr/local/lib/libsmoldyn.a -LIBS += -lsmoldyn -endif - -# To compile with readline support pass USE_READLINE=true in make command line -ifdef USE_READLINE -LIBS+= -lreadline -CXXFLAGS+= -DUSE_READLINE -endif - -# To compile with curses support (terminal aware printing) pass USE_CURSES=true in make command line -ifdef USE_CURSES -LIBS += -lcurses -CXXFLAGS+= -DUSE_CURSES -endif - -ifdef USE_MUSIC - MUSIC_DIR = music - MUSIC_LIB = music/music.o -endif - -# Here we automagically change compilers to deal with MPI. -ifdef USE_MPI - CXX = mpicxx --std=c++11 -# CXX = /usr/local/mvapich2/bin/mpicxx -# PARALLEL_DIR = parallel -# PARALLEL_LIB = parallel/parallel.o -else - CXX = g++ --std=c++11 -# CXX = CC # Choose between Solaris CC and g++ on a Solaris machine -endif - -ifeq ($(USE_HDF5),1) - CXXFLAGS+= -DUSE_HDF5 -DH5_NO_DEPRECATED_SYMBOLS -I/usr/local/hdf5/include -I/usr/include/hdf5/serial - LIBS+= -lhdf5 -lhdf5_hl -L/usr/local/hdf5/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial/ -endif - -LD = ld - -SUBDIR = \ - basecode \ - msg \ - shell \ - randnum\ - scheduling\ - mpi \ - builtins\ - utility \ - external/muparser \ - biophysics \ - synapse \ - intfire \ - kinetics \ - ksolve \ - mesh \ - hsolve \ - diffusion \ - device \ - signeur \ - benchmarks \ - $(SMOLDYN_DIR) \ - $(SBML_DIR) \ - $(HCUDA_DIR) \ - $(EXAMPLES_DIR) \ - -# Used for 'make clean' -CLEANSUBDIR = $(SUBDIR) $(PARALLEL_DIR) pymoose - -OBJLIBS = \ - basecode/_basecode.o \ - msg/_msg.o \ - shell/_shell.o \ - randnum/_randnum.o \ - scheduling/_scheduling.o \ - mpi/_mpi.o \ - builtins/_builtins.o \ - utility/_utility.o \ - external/muparser/_muparser.o \ - biophysics/_biophysics.o \ - synapse/_synapse.o \ - intfire/_intfire.o \ - kinetics/_kinetics.o \ - ksolve/_ksolve.o \ - hsolve/_hsolve.o \ - mesh/_mesh.o \ - diffusion/_diffusion.o \ - device/_device.o \ - signeur/_signeur.o \ - benchmarks/_benchmarks.o \ - $(SMOLDYN_LIB) \ - $(SBML_LIB) \ - $(HCUDA_LIB) \ - $(EXAMPLES_LIB) \ - - -ifeq ($(USE_NEUROKIT),1) - NEUROKIT_COMMAND = cd ./python/moogli; python setup.py build; cd ../../; cp ./python/moogli/build/*/_moogli.so ./python/moogli/; -# else -# NEUROKIT_COMMAND = "" -endif - - -export CXX -export CXXFLAGS -export LD -export LIBS -export USE_GSL -#export USE_SBML - -all: moose pymoose - -neurokit: ./python/moogli/setup.py - $(NEUROKIT_COMMAND) - -moose: libs $(OBJLIBS) $(PARALLEL_LIB) - $(CXX) $(CXXFLAGS) $(OBJLIBS) $(PARALLEL_LIB) $(LIBS) -o moose - @echo "Moose compilation finished" - -libmoose.so: libs - $(CXX) -G $(LIBS) -o libmoose.so - @echo "Created dynamic library" - -# Get the python version -ifneq ($(OSTYPE),win32) -ifeq ($(PYTHON),3) -PYTHON_VERSION := $(subst ., ,$(lastword $(shell python3 --version 2>&1))) -PYTHON_CFLAGS := $(shell python3-config --cflags) -PYTHON_LDFLAGS := $(shell python3-config --ldflags) -else # Python 2.x -PYTHON_VERSION := $(subst ., ,$(lastword $(shell python --version 2>&1))) -ifneq ($(BUILD),debug) -PYTHON_CFLAGS := $(shell python-config --cflags) -PYTHON_LDFLAGS := $(shell python-config --ldflags) -else -PYTHON_CFLAGS := $(shell python-config --includes) \ - -fno-strict-aliasing -fwrapv \ - -Wstrict-prototypes \ - -Wformat -Wformat-security -Werror=format-security \ - -fstack-protector --param=ssp-buffer-size=4 - -PYTHON_LDFLAGS := -L/usr/lib/$(INSTALLED_PYTHON) \ - -Xlinker -export-dynamic -Wl,-O0 -Wl,-Bsymbolic-functions -endif # ifneq ($(BUILD),debug) -endif # ifeq ($(PYTHON),3) -PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION}) -PYTHON_VERSION_MINOR := $(word 2,${PYTHON_VERSION}) -INSTALLED_PYTHON := python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} -endif - -# For developer build and strict checking -ifeq ($(BUILD),developer) - PYTHON_CFLAGS := $(PYTHON_CFLAGS) -Wall -Werror -Wno-unused-function -Wno-unused-variable -endif # ifeq(${BUILD},developer) - -ifndef PYTHON_CFLAGS -PYTHON_CFLAGS := -I/usr/include/$(INSTALLED_PYTHON) -fno-strict-aliasing \ - -fwrapv \ - -fstack-protector \ - #-Wstrict-prototypes \ # This option is obsolete for g++-4.8 - --param=ssp-buffer-size=4 \ - -Wformat -Wformat-security -Werror=format-security - -PYTHON_LDFLAGS := -L/usr/lib/$(INSTALLED_PYTHON) -Xlinker -export-dynamic -Wl,-O0 -Wl,-Bsymbolic-functions -endif -# There are some unix/gcc specific paths here. Should be cleaned up in future. -pymoose: python/moose/_moose.so -pymoose: CXXFLAGS += -DPYMOOSE $(PYTHON_CFLAGS) -# fix: add include dir for numpy headers required by pymoose/moosemodule.cpp -pymoose: CXXFLAGS += -I$(shell /usr/bin/python -c 'from numpy import get_include; print get_include()') -pymoose: OBJLIBS += pymoose/_pymoose.o -pymoose: LDFLAGS += $(PYTHON_LDFLAGS) -export CXXFLAGS -python/moose/_moose.so: libs $(OBJLIBS) - $(MAKE) -C pymoose - $(CXX) -shared $(LDFLAGS) $(CXXFLAGS) -o $@ $(OBJLIBS) $(LIBS) - @echo "pymoose module built." - -# This will generate an object file without main -libs: - @for i in $(SUBDIR) $(PARALLEL_DIR); do \ - $(MAKE) -C $$i || exit $$?; \ - done - @echo "All Libs compiled" - -clean: - @(for i in $(CLEANSUBDIR) ; do $(MAKE) -C $$i clean; done) - -rm -rf moose core.* DOCS/html python/moose/*.so python/moose/*.pyc - -############ INSTALL (works for sudo make install and deb packaging using dpkg-buildpackage) -## get the default python module install location -## no need to know this, the default for public modules is /usr/share/pyshared -pydir_cmd := python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" -pydistpkg_dir := $(shell $(pydir_cmd)) -## /usr/share/pyshared/ is a directory which is independent of python version, -## but modules need to be registered with update-python-modules, giving a list of files -## debhelper (dpkg-buildpackage) will also copy to this location and do the registration. -## For make install, I stick to the default python .../dist-packages directory. -pydistpkg_dirB := /usr/share/pyshared/ - -username=$(shell basename $(HOME)) - -install_prefix=/usr -## Note that $(DESTDIR) is provided by dpkg-buildpackage to specify the local install for deb packaging -## if doing sudo make install, $(DESTDIR) will be undefined and will cause no trouble -install: - ## discard symbols from object files - strip python/moose/_moose.so - - ## delete older .../share/moose, - before rm means ignore errors (eg not found) - -rm -rf $(DESTDIR)$(install_prefix)/share/moose - ## -p creates parent directories also if they don't exist - mkdir -p $(DESTDIR)$(install_prefix)/share/moose - ## copy filtering out the .svn (hidden) files - rsync -r --exclude=.svn Demos/* $(DESTDIR)$(install_prefix)/share/moose/Demos - rsync -r --exclude=.svn gui/* $(DESTDIR)$(install_prefix)/share/moose/gui - test -d $(DESTDIR)$(install_prefix)/share/doc || mkdir -p $(DESTDIR)$(install_prefix)/share/doc - rsync -r --exclude=.svn Docs/* $(DESTDIR)$(install_prefix)/share/doc/moose - # rsync -r --exclude=.svn Demos/* $(DESTDIR)$(install_prefix)/share/moose/ - ## pymoose module goes to python's dist-packages - ## delete older .../dist-packages/moose, - before rm means ignore errors (eg not found) - -rm -rf $(DESTDIR)$(pydistpkg_dir)/moose - -rm -rf $(DESTDIR)$(pydistpkg_dirB)/moose - ## make directory in case non-existent (needed for deb pkg building) - mkdir -p $(DESTDIR)$(pydistpkg_dir) - rsync -r --exclude=.svn --exclude=moose_py3k.py python/* $(DESTDIR)$(pydistpkg_dir)/ - - ## shell command moosegui for the moose GUI. - chmod a+x $(DESTDIR)$(install_prefix)/share/moose/gui/MooseGUI.py - ## -rm instructs make to ignore errors from make eg. file not found - -rm -f $(DESTDIR)$(install_prefix)/bin/moosegui - mkdir -p $(DESTDIR)$(install_prefix)/bin - ln -s $(DESTDIR)$(install_prefix)/share/moose/gui/MooseGUI.py $(DESTDIR)$(install_prefix)/bin/moosegui - - ## byte compile the module, gui, Demos (since, later running as user cannot create .pyc in root-owned dirs) - python -c "import compileall; compileall.compile_dir('$(DESTDIR)$(pydistpkg_dir)/moose',force=1)" - python -c "import compileall; compileall.compile_dir('$(DESTDIR)$(install_prefix)/share/moose/gui',force=1)" - python -c "import compileall; compileall.compile_dir('$(DESTDIR)$(install_prefix)/share/moose/Demos',force=1)" - - ## see standards.freedesktop.org for specifications for where to put menu entries and icons - ## copy the .desktop files to /usr/share/applications for link to show up in main menu - mkdir -p $(DESTDIR)$(install_prefix)/share/applications - cp gui/MooseGUI.desktop $(DESTDIR)$(install_prefix)/share/applications/ - cp gui/MooseSquidAxon.desktop $(DESTDIR)$(install_prefix)/share/applications/ - ## copy the .desktop files to the desktop too to get icons - cp gui/MooseGUI.desktop $$HOME/Desktop/ - chmod a+x $$HOME/Desktop/MooseGUI.desktop - chown $(username) $(HOME)/Desktop/MooseGUI.desktop - chgrp $(username) $(HOME)/Desktop/MooseGUI.desktop - cp gui/MooseSquidAxon.desktop $$HOME/Desktop/ - chmod a+x $$HOME/Desktop/MooseSquidAxon.desktop - chgrp $(username) $(HOME)/Desktop/MooseSquidAxon.desktop - chown $(username) $(HOME)/Desktop/MooseSquidAxon.desktop - ## copy icon to /usr/share/icons/hicolor/<size>/apps (hicolor is the fallback theme) - mkdir -p $(DESTDIR)$(install_prefix)/share/icons/hicolor/scalable/apps - cp gui/icons/moose_icon.png $(DESTDIR)$(install_prefix)/share/icons/hicolor/scalable/apps/ - cp gui/icons/squid.png $(DESTDIR)$(install_prefix)/share/icons/hicolor/scalable/apps/ - ## need to update the icon cache to show the icon - update-icon-caches $(DESTDIR)$(install_prefix)/share/icons/hicolor/ - -.PHONY: install diff --git a/basecode/Makefile b/basecode/Makefile deleted file mode 100644 index 0639a32c38bce0311fda0e32251dbd5b44eab69a..0000000000000000000000000000000000000000 --- a/basecode/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment, -#** also known as GENESIS 3 base code. -#** copyright (C) 2004 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ -# $Id: $ -# -# $Log: $ -# - -TARGET = _basecode.o - - -# CXXFLAGS += -I.. -I../kinetics -I../biophysics - -OBJ = \ - consts.o \ - Element.o \ - DataElement.o \ - GlobalDataElement.o \ - LocalDataElement.o \ - Eref.o \ - Finfo.o \ - DestFinfo.o \ - Cinfo.o \ - SrcFinfo.o \ - ValueFinfo.o \ - SharedFinfo.o \ - FieldElementFinfo.o \ - FieldElement.o \ - Id.o \ - ObjId.o \ - global.o \ - SetGet.o \ - OpFuncBase.o \ - EpFunc.o \ - HopFunc.o \ - SparseMatrix.o \ - doubleEq.o \ - testAsync.o \ - main.o \ - -HEADERS = \ - header.h \ - Cinfo.h \ - Conv.h \ - Dinfo.h \ - MsgDigest.h \ - Element.h \ - DataElement.h \ - GlobalDataElement.h \ - LocalDataElement.h \ - Eref.h \ - global.h \ - Finfo.h \ - DestFinfo.h \ - Id.h \ - ObjId.h \ - ../msg/Msg.h \ - OpFuncBase.h \ - OpFunc.h \ - EpFunc.h \ - HopFunc.h \ - ProcInfo.h \ - SrcFinfo.h \ - ValueFinfo.h \ - LookupValueFinfo.h \ - LookupElementValueFinfo.h \ - SharedFinfo.h \ - FieldElementFinfo.h \ - FieldElement.h \ - MsgFuncBinding.h \ - -default: $(TARGET) - -$(OBJ) : $(HEADERS) ../shell/Shell.h -Element.o: FuncOrder.h -testAsync.o: SparseMatrix.h SetGet.h ../scheduling/Clock.h ../biophysics/IntFire.h ../synapse/SynEvent.h ../synapse/SynHandlerBase.h ../synapse/SimpleSynHandler.h ../synapse/Synapse.h ../randnum/RNG.h -SparseMsg.o: SparseMatrix.h -SetGet.o: SetGet.h ../shell/Neutral.h -HopFunc.o: HopFunc.h ../mpi/PostMaster.h -global.o: global.h ../randnum/RNG.h - -.cpp.o: - $(CXX) $(CXXFLAGS) -I../msg -I.. $< -c - -.PHONY: pymoose - -pymoose: CXXFLAGS += -DPYMOOSE - -$(TARGET): $(OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/benchmarks/Makefile b/benchmarks/Makefile deleted file mode 100644 index 0eb5aef3628e1e1c1d3186dab04ebbb7b861de48..0000000000000000000000000000000000000000 --- a/benchmarks/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _benchmarks.o - -OBJ = \ - benchmarks.o \ - kineticMarks.o \ - -HEADERS = \ - ../basecode/header.h \ - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -kineticMarks.o: ../shell/Shell.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/biophysics/Makefile b/biophysics/Makefile deleted file mode 100644 index 6659630cea1751622c725f27a6a9142bf277384f..0000000000000000000000000000000000000000 --- a/biophysics/Makefile +++ /dev/null @@ -1,123 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _biophysics.o - -OBJ = \ - IntFire.o \ - SpikeGen.o \ - RandSpike.o \ - CompartmentDataHolder.o \ - CompartmentBase.o \ - Compartment.o \ - SymCompartment.o \ - GapJunction.o \ - ChanBase.o \ - ChanCommon.o \ - HHChannelBase.o \ - HHChannel.o \ - HHGate.o \ - HHGate2D.o \ - HHChannel2D.o \ - CaConcBase.o \ - CaConc.o \ - MgBlock.o \ - Nernst.o \ - Neuron.o \ - Spine.o \ - ReadCell.o \ - SwcSegment.o \ - ReadSwc.o \ - SynChan.o \ - NMDAChan.o \ - testBiophysics.o \ - IzhikevichNrn.o \ - DifShellBase.o \ - DifShell.o \ - DifBufferBase.o \ - DifBuffer.o \ - Leakage.o \ - VectorTable.o \ - MarkovRateTable.o \ - MarkovChannel.o \ - MarkovGslSolver.o \ - MatrixOps.o \ - MarkovSolverBase.o \ - MarkovSolver.o \ - VClamp.o \ - - - # MMpump.o \ - # LeakyIaF.o \ - # GapJunction.o \ - # Nernst.o \ - # GHK.o \ - # NMDAChan.o \ - -# GSL_LIBS = -L/usr/lib -lgsl - -HEADERS = \ - ../basecode/header.h \ - ../utility/numutil.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -IntFire.o: IntFire.h -SpikeGen.o: SpikeGen.h -RandSpike.o: RandSpike.h ../randnum/randnum.h -CompartmentDataHolder.o: CompartmentDataHolder.h -CompartmentBase.o: CompartmentBase.h CompartmentDataHolder.h -Compartment.o: CompartmentBase.h Compartment.h -SymCompartment.o: CompartmentBase.h Compartment.h SymCompartment.h -ChanBase.o: ChanBase.h -ChanCommon.o: ChanBase.h ChanCommon.h -SynChan.o: SynChan.h ChanBase.h ChanCommon.h -NMDAChan.o: NMDAChan.h SynChan.h ChanBase.h ChanCommon.h -Leakage.o: Leakage.h ChanBase.h ChanCommon.h -GapJunction.o: GapJunction.h -HHChannelBase.o: ChanBase.h HHChannelBase.h HHGate.h -HHChannel.o: ChanBase.h HHChannel.h HHGate.h -HHGate.o: HHGate.h -HHChannel2D.o: ChanBase.h HHChannel2D.h HHGate2D.h -HHGate2D.o: HHGate2D.h -CaConcBase.o: CaConcBase.h -CaConc.o: CaConcBase.h CaConc.h -MgBlock.o: MgBlock.h ChanBase.h -Nernst.o: Nernst.h -Neuron.o: Neuron.h SwcSegment.h Spine.h -Spine.o: Neuron.h SwcSegment.h Spine.h -ReadCell.o: CompartmentBase.h Compartment.h SymCompartment.h ReadCell.h ../shell/Shell.h ../utility/utility.h -SwcSegment.o: SwcSegment.h ../utility/Vec.h -ReadSwc.o: CompartmentBase.h Compartment.h SymCompartment.h SwcSegment.h ReadSwc.h ../shell/Shell.h ../utility/Vec.h -IzhikevichNrn.o: IzhikevichNrn.h -DifShellBase.o: DifShellBase.h -DifShell.o: DifShellBase.h DifShell.h -DifBufferBase.o: DifBufferBase.h -DifBuffer.o: DifBufferBase.h DifBuffer.h -MMPump.o: MMPump.h -testBiophysics.o: IntFire.h CompartmentBase.h Compartment.h HHChannel.h HHGate.h -VectorTable.o : VectorTable.h -MarkovGslSolver.o : MarkovGslSolver.h -MatrixOps.o : MatrixOps.h -MarkovRateTable.o : VectorTable.h ../builtins/Interpol2D.h MarkovRateTable.h -MarkovSolverBase.o : MarkovSolver.h MatrixOps.h MarkovRateTable.h -MarkovSolver.o : MarkovSolverBase.h MarkovSolver.h -MarkovChannel.o : VectorTable.h ../builtins/Interpol2D.h MarkovRateTable.h ChanBase.h MarkovChannel.h -VClamp.o: VClamp.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../external/muparser/include -I .. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS) - -clean: - rm -f *.o $(TARGET) core core.* diff --git a/biophysics/ReadSwc.cpp b/biophysics/ReadSwc.cpp index 3fde18ec6c22e432c8d6d7fb405d57aab376b4c1..69ca680a553654da3d6b16ee7ed783abd618ca4b 100644 --- a/biophysics/ReadSwc.cpp +++ b/biophysics/ReadSwc.cpp @@ -53,7 +53,9 @@ ReadSwc::ReadSwc( const string& fname ) cleanZeroLength(); parseBranches(); } - cout << "ReadSwc: " << fname << " : " << (valid ? "OK" : "FAILED" )<< + if ( verbose || !valid || (badSegs > 0) ) + cout << "ReadSwc: " << fname << + " : " << (valid ? "OK" : "FAILED" )<< ", # Branches = " << branches_.size() << ". # Segs = " << segs_.size() << ", bad = " << badSegs << diff --git a/builtins/Makefile b/builtins/Makefile deleted file mode 100644 index 7ff1cebed8784468dcd0aec5a15ea65db4f1220f..0000000000000000000000000000000000000000 --- a/builtins/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _builtins.o - -OBJ = \ - Arith.o \ - Group.o \ - Mstring.o \ - Func.o \ - Function.o \ - Variable.o \ - InputVariable.o \ - TableBase.o \ - Table.o \ - Interpol.o \ - StimulusTable.o \ - TimeTable.o \ - Stats.o \ - SpikeStats.o \ - Interpol2D.o \ - HDF5WriterBase.o \ - HDF5DataWriter.o \ - StreamerBase.o \ - Streamer.o \ - NSDFWriter.o \ - testNSDF.o \ - testBuiltins.o \ - -HEADERS = \ - ../basecode/header.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -Arith.o: Arith.h -Group.o: Group.h -Mstring.o: Mstring.h -Func.o: Func.h -Function.o: Function.h -Variable.o: Variable.h -TableBase.o: TableBase.h -Table.o: TableBase.h Table.h -Interpol.o: TableBase.h Interpol.h -StimulusTable.o: TableBase.h StimulusTable.h -TimeTable.o: TimeTable.h TableBase.h -Stats.o: Stats.h -SpikeStats.o: Stats.h SpikeStats.h -Interpol2D.o: Interpol2D.h -HDF5WriterBase.o: HDF5WriterBase.h -HDF5DataWriter.o: HDF5DataWriter.h HDF5WriterBase.h -testBuiltins.o: Group.h Arith.h Stats.h ../msg/DiagonalMsg.h ../basecode/SetGet.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I.. -I../scheduling -I../basecode -I../msg -I../external/muparser/include $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/device/Makefile b/device/Makefile deleted file mode 100644 index 159d88056dade350936d92f016e3221df7d2e321..0000000000000000000000000000000000000000 --- a/device/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -TARGET = _device.o - -OBJ = PulseGen.o \ - DiffAmp.o \ - PIDController.o \ - RC.o - -HEADERS = \ - ../basecode/header.h \ - -default: $(TARGET) - -$(OBJ): $(HEADERS) -PulseGen.o: PulseGen.h -DiffAmp.o: DiffAmp.h -PIDController.o: PIDController.h -RC.o: RC.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS) - -clean: - rm -f *.o $(TARGET) core core.* diff --git a/diffusion/Makefile b/diffusion/Makefile deleted file mode 100644 index 458a5ba9e8026e4675a8e9b2ce525da713047389..0000000000000000000000000000000000000000 --- a/diffusion/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _diffusion.o - -OBJ = \ - FastMatrixElim.o \ - DiffPoolVec.o \ - Dsolve.o \ - testDiffusion.o \ - -HEADERS = \ - ../basecode/header.h \ - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -FastMatrixElim.o: ../basecode/SparseMatrix.h FastMatrixElim.h -Dsolve.o: ../basecode/SparseMatrix.h ../kinetics/PoolBase.h ../kinetics/lookupVolumeFromMesh.h ../mesh/ChemCompt.h ../ksolve/XferInfo.h ../ksolve/ZombiePoolInterface.h -DiffPoolVec.o: DiffPoolVec.h ../ksolve/ZombiePoolInterface.h -testDiffusion.o: Dsolve.h ../ksolve/ZombiePoolInterface.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(GSL_FLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../ksolve $< -c - -$(TARGET): $(OBJ) $(GSL_OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(GSL_OBJ) $(GSL_LIBS) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/examples/Makefile b/examples/Makefile deleted file mode 100644 index 1e7f10aba87a81427787ebda1f04f6ab3a10f31b..0000000000000000000000000000000000000000 --- a/examples/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _trials.o - -OBJ = \ - Example.o \ - Ex.o \ - -HEADERS = \ - ../basecode/header.h \ - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -Example.o: Example.h ../basecode/ElementValueFinfo.h -Ex.o: Ex.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/external/muparser/Makefile b/external/muparser/Makefile deleted file mode 100644 index 6b8bb423a78aec4c2840cea4ff9d2181a6bdffb4..0000000000000000000000000000000000000000 --- a/external/muparser/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# Makefile for including muParser into moose. -# Author: Subhasis Ray -# -TARGET = _muparser.o - -OBJ = \ - src/muParserBase.o \ - src/muParserBytecode.o \ - src/muParserCallback.o \ - src/muParser.o \ - src/muParserDLL.o \ - src/muParserError.o \ - src/muParserInt.o \ - src/muParserTokenReader.o \ - -HEADERS = \ - include/muParser.h \ - include/muParserBase.h \ - include/muParserBytecode.h \ - include/muParserCallback.h \ - include/muParserDef.h \ - include/muParserError.h \ - include/muParserFixes.h \ - include/muParserStack.h \ - include/muParserToken.h \ - include/muParserTokenReader.h \ - include/muParserTemplateMagic.h \ - - -default: $(TARGET) - -$(OBJ): $(HEADERS) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -I. -I../../ -Iinclude $< -c -o $@ - -$(TARGET): $(OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) - -clean: - -rm -f *.o $(TARGET) core core.* - diff --git a/external/tinyxml/Makefile b/external/tinyxml/Makefile deleted file mode 100644 index 45639837dea61df6d90bf23b3e5a7ee081d3a4d3..0000000000000000000000000000000000000000 --- a/external/tinyxml/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Makefile for including muParser into moose. -# Author: Subhasis Ray -# -TARGET = _tinyxml2.o - -OBJ = \ - tinyxml2.o - -HEADERS = \ - tinyxml2.h \ - - -default: $(TARGET) - -$(OBJ): $(HEADERS) - -.cpp.o: - $(CXX) $(CXXFLAGS) -I. $< -c - -$(TARGET): $(OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) - -clean: - -rm -f *.o $(TARGET) core core.* - diff --git a/hsolve/Makefile b/hsolve/Makefile deleted file mode 100644 index da4e33a3a96c04e163d07ea2c2c454f08f9787cd..0000000000000000000000000000000000000000 --- a/hsolve/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment, -#** also known as GENESIS 3 base code. -#** copyright (C) 2004 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU General Public License version 2 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _hsolve.o - -OBJ = \ - HSolveStruct.o \ - HinesMatrix.o \ - HSolvePassive.o \ - RateLookup.o \ - HSolveActive.o \ - HSolveActiveSetup.o \ - HSolveInterface.o \ - HSolve.o \ - HSolveUtils.o \ - testHSolve.o \ - ZombieCompartment.o \ - ZombieCaConc.o \ - ZombieHHChannel.o \ - -HEADERS = \ - ../basecode/header.h - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -HSolveStruct.o: HSolveStruct.h -HinesMatrix.o: HinesMatrix.h TestHSolve.h -HSolvePassive.o: HSolvePassive.h HinesMatrix.h HSolveStruct.h HSolveUtils.h TestHSolve.h ../biophysics/Compartment.h -RateLookup.o: RateLookup.h -HSolveActive.o: HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h -HSolveActiveSetup.o: HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h HSolveUtils.h ../biophysics/HHChannelBase.h ../biophysics/HHChannel.h ../biophysics/ChanBase.h ../biophysics/ChanCommon.h ../biophysics/HHGate.h ../biophysics/CaConc.h -HSolveInterface.o: HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h -HSolve.o: ../biophysics/Compartment.h ZombieCompartment.h ../biophysics/CaConc.h ZombieCaConc.h ../biophysics/HHGate.h ../biophysics/ChanBase.h ../biophysics/ChanCommon.h ../biophysics/HHChannelBase.h ../biophysics/HHChannel.h ZombieHHChannel.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h -ZombieCompartment.o: ../biophysics/CompartmentBase.h ZombieCompartment.h ../biophysics/Compartment.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h -ZombieCaConc.o: ZombieCaConc.h ../biophysics/CaConc.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h -ZombieHHChannel.o: ZombieHHChannel.h ../biophysics/HHChannelBase.h ../biophysics/HHChannel.h ../biophysics/ChanBase.h ../biophysics/ChanCommon.h ../biophysics/HHGate.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I.. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS) - -clean: - rm -f *.o $(TARGET) core core.* diff --git a/intfire/Makefile b/intfire/Makefile deleted file mode 100644 index 22261ff9da1a87687e980907a90c5b0172697c0d..0000000000000000000000000000000000000000 --- a/intfire/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _intfire.o - -OBJ = \ - IntFireBase.o \ - LIF.o \ - QIF.o \ - ExIF.o \ - AdExIF.o \ - AdThreshIF.o \ - IzhIF.o \ - testIntFire.o \ - -# GSL_LIBS = -L/usr/lib -lgsl - -HEADERS = \ - ../basecode/header.h \ - ../utility/numutil.h \ - IntFireBase.h \ - ../biophysics/CompartmentBase.h \ - ../biophysics/Compartment.h - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -LIF.o: LIF.h -QIF.o: QIF.h -ExIF.o: ExIF.h -AdExIF.o: AdExIF.h -AdThreshIF.o: AdThreshIF.h -IzhIF.o: IzhIF.h -testIntFire.o: LIF.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS) - -clean: - rm -f *.o $(TARGET) core core.* diff --git a/kinetics/Makefile b/kinetics/Makefile deleted file mode 100644 index 9b1f6375d239b8b1ad2ba39eaac061ad0db25d7f..0000000000000000000000000000000000000000 --- a/kinetics/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _kinetics.o - -OBJ = \ - PoolBase.o \ - Pool.o \ - BufPool.o \ - ReacBase.o \ - Reac.o \ - EnzBase.o \ - CplxEnzBase.o \ - Enz.o \ - MMenz.o \ - Species.o \ - ReadKkit.o \ - WriteKkit.o \ - ReadCspace.o \ - lookupVolumeFromMesh.o \ - testKinetics.o \ - -HEADERS = \ - ../basecode/header.h \ - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -Pool.o: PoolBase.h Pool.h lookupVolumeFromMesh.h -BufPool.o: PoolBase.h Pool.h BufPool.h lookupVolumeFromMesh.h -ReacBase.o: ReacBase.h lookupVolumeFromMesh.h -Reac.o: ReacBase.h Reac.h lookupVolumeFromMesh.h -EnzBase.o: EnzBase.h lookupVolumeFromMesh.h -CplxEnzBase.o: EnzBase.h CplxEnzBase.h lookupVolumeFromMesh.h -Enz.o: EnzBase.h CplxEnzBase.h Enz.h lookupVolumeFromMesh.h -MMenz.o: EnzBase.h MMenz.h lookupVolumeFromMesh.h -Boundary.o: Boundary.h -Species.o: Species.h -ReadKkit.o: lookupVolumeFromMesh.h ReadKkit.h PoolBase.h Pool.h ../shell/Shell.h -WriteKkit.o: lookupVolumeFromMesh.h PoolBase.h -ReadCspace.o: lookupVolumeFromMesh.h ReadCspace.h ../shell/Shell.h -lookupVolumeFromMesh.o: lookupVolumeFromMesh.h -testKinetics.o: ReadKkit.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/ksolve/Makefile b/ksolve/Makefile deleted file mode 100644 index 49b51df4a418ed42d20c7aa9c64bcd06d63c0806..0000000000000000000000000000000000000000 --- a/ksolve/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _ksolve.o - -OBJ = \ - KinSparseMatrix.o \ - ZombiePool.o \ - ZombieBufPool.o \ - ZombieReac.o \ - ZombieEnz.o \ - ZombieMMenz.o \ - ZombieFunction.o \ - VoxelPoolsBase.o \ - VoxelPools.o \ - GssaVoxelPools.o \ - RateTerm.o \ - FuncTerm.o \ - Stoich.o \ - Ksolve.o \ - SteadyStateGsl.o \ - Gsolve.o \ - ZombiePoolInterface.o \ - testKsolve.o \ - -HEADERS = \ - ../basecode/header.h \ - ../basecode/SparseMatrix.h \ - ../basecode/ElementValueFinfo.h \ - RateTerm.h \ - ../external/muparser/include/muParser.h \ - FuncTerm.h \ - KinSparseMatrix.h \ - XferInfo.h \ - ZombiePoolInterface.h \ - Stoich.h \ - ../kinetics/Pool.h \ - ../kinetics/lookupVolumeFromMesh.h \ - - -# The GSL library (GNU Scientific Library) provides a range of -# numerical functions, which allow us to use various advanced integration -# methods. The GslIntegrator accesses these. This library is licenced -# under the GPL, so only GPL-compliant uses of MOOSE will be able to -# use it. Should be fine for academic use. -# Optional: Comment out the following three items if not using GSL -ifeq ($(USE_GSL),1) -GSL_OBJ = \ - - -GSL_LIBS = -L/usr/lib -lgsl -lgslcblas -GSL_FLAGS = -DUSE_GSL -endif - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -KinSparseMatrix.o: KinSparseMatrix.h ../basecode/SparseMatrix.h -ZombiePool.o: ../kinetics/PoolBase.h ZombiePoolInterface.h ZombiePool.h ../kinetics/lookupVolumeFromMesh.h -ZombieBufPool.o: ../kinetics/PoolBase.h ZombiePoolInterface.h ZombiePool.h ZombieBufPool.h ../kinetics/lookupVolumeFromMesh.h -ZombieBufPool.o: ../kinetics/PoolBase.h ZombiePoolInterface.h ZombiePool.h -VoxelPoolsBase.o: VoxelPoolsBase.h ../randnum/RNG.h -VoxelPools.o: VoxelPoolsBase.h VoxelPools.h OdeSystem.h RateTerm.h Stoich.h -GssaVoxelPools.o: VoxelPoolsBase.h GssaVoxelPools.h ../basecode/SparseMatrix.h \ - ../randnum/RNG.h KinSparseMatrix.h GssaSystem.h RateTerm.h Stoich.h -RateTerm.o: RateTerm.h -FuncTerm.o: FuncTerm.h -Stoich.o: RateTerm.h FuncTerm.h FuncRateTerm.h Stoich.h ../kinetics/PoolBase.h ../kinetics/ReacBase.h ../kinetics/EnzBase.h ../kinetics/CplxEnzBase.h ../basecode/SparseMatrix.h KinSparseMatrix.h ../scheduling/Clock.h ZombiePoolInterface.h -ZombieReac.o: RateTerm.h FuncTerm.h Stoich.h ../kinetics/ReacBase.h ../kinetics/lookupVolumeFromMesh.h ../basecode/SparseMatrix.h KinSparseMatrix.h ZombieReac.h -ZombieEnz.o: RateTerm.h FuncTerm.h Stoich.h ../kinetics/EnzBase.h ../kinetics/CplxEnzBase.h ../kinetics/lookupVolumeFromMesh.h ../basecode/SparseMatrix.h KinSparseMatrix.h ZombieEnz.h -ZombieMMenz.o: RateTerm.h FuncTerm.h Stoich.h ../kinetics/EnzBase.h ../kinetics/lookupVolumeFromMesh.h ../basecode/SparseMatrix.h KinSparseMatrix.h ZombieMMenz.h -ZombieFunction.o: RateTerm.h FuncTerm.h Stoich.h ../builtins/Function.h ZombieFunction.h -Ksolve.o: RateTerm.h Stoich.h Ksolve.h VoxelPoolsBase.h VoxelPools.h OdeSystem.h ZombiePoolInterface.h -SteadyStateGsl.o: SteadyStateGsl.h ../basecode/SparseMatrix.h KinSparseMatrix.h RateTerm.h FuncTerm.h Stoich.h ../randnum/randnum.h -Gsolve.o: RateTerm.h FuncTerm.h FuncRateTerm.h Stoich.h Gsolve.h VoxelPoolsBase.h VoxelPools.h GssaSystem.h ZombiePoolInterface.h ../basecode/SparseMatrix.h KinSparseMatrix.h -ZombiePoolInterface.o: VoxelPoolsBase.h ZombiePoolInterface.h ../mesh/VoxelJunction.h Stoich.h ../shell/Shell.h -testKsolve.o: ../shell/Shell.h - -#KineticHub.o: KineticHub.h - -ifeq ($(USE_GSL),1) -#Optional: Comment out the following two items if not using GSL. -$(GSL_OBJ) : $(HEADERS) -#StateScanner.o: StateScanner.h -endif # !USE_GSL - -.cpp.o: - $(CXX) $(CXXFLAGS) $(GSL_FLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../msg -I../kinetics -I../mesh -I../external/muparser/include -I../builtins $< -c - -$(TARGET): $(OBJ) $(GSL_OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(GSL_OBJ) $(GSL_LIBS) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/mesh/Makefile b/mesh/Makefile deleted file mode 100644 index 9e211655654da3faa2c5d294e44000b7ddcde74a..0000000000000000000000000000000000000000 --- a/mesh/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _mesh.o - -OBJ = \ - ChemCompt.o \ - MeshCompt.o \ - MeshEntry.o \ - CubeMesh.o \ - CylBase.o \ - CylMesh.o \ - NeuroNode.o \ - NeuroMesh.o \ - SpineEntry.o \ - SpineMesh.o \ - PsdMesh.o \ - testMesh.o \ - -HEADERS = \ - ../basecode/header.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -MeshEntry.o: MeshEntry.h -Boundary.o: Boundary.h -ChemCompt.o: VoxelJunction.h ChemCompt.h MeshEntry.h Boundary.h -MeshCompt.o: VoxelJunction.h ChemCompt.h MeshCompt.h MeshEntry.h Boundary.h -CylBase.o: ../utility/Vec.h CylBase.h -CylMesh.o: ../utility/Vec.h VoxelJunction.h ChemCompt.h CylBase.h CylMesh.h MeshEntry.h Boundary.h -CubeMesh.o: VoxelJunction.h ChemCompt.h CubeMesh.h MeshEntry.h Boundary.h -NeuroNode.o: CylBase.h NeuroNode.h -NeuroMesh.o: ../basecode/SparseMatrix.h ChemCompt.h CylBase.h NeuroNode.h NeuroMesh.h -SpineMesh.o: ../basecode/SparseMatrix.h VoxelJunction.h ChemCompt.h CylBase.h NeuroNode.h NeuroMesh.h ../utility/Vec.h SpineEntry.h SpineMesh.h -SpineEntry.o: VoxelJunction.h ChemCompt.h CylBase.h ../utility/Vec.h SpineEntry.h -PsdMesh.o: ../basecode/SparseMatrix.h VoxelJunction.h ChemCompt.h CylBase.h ../utility/Vec.h SpineEntry.h SpineMesh.h -testMesh.o: ../basecode/SparseMatrix.h CylBase.h NeuroNode.h MeshEntry.h ChemCompt.h CylMesh.h Boundary.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* - diff --git a/mpi/Makefile b/mpi/Makefile deleted file mode 100644 index a127fb78de6ffe176ee224b266771deb17c782a3..0000000000000000000000000000000000000000 --- a/mpi/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2013 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _mpi.o - -OBJ = \ - PostMaster.o \ - testMpi.o \ - -HEADERS = \ - ../basecode/header.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -Postmaster.o: PostMaster.h -testMpi.o: PostMaster.h - - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/msg/Makefile b/msg/Makefile deleted file mode 100644 index 1a373925f150d72886420d1b1fbd243d038334b0..0000000000000000000000000000000000000000 --- a/msg/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _msg.o - -OBJ = \ - Msg.o \ - DiagonalMsg.o \ - OneToAllMsg.o \ - OneToOneMsg.o \ - SingleMsg.o \ - SparseMsg.o \ - OneToOneDataIndexMsg.o \ - testMsg.o \ - -HEADERS = \ - ../basecode/header.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -DiagonalMsg.o: DiagonalMsg.h -OneToAll.o: OneToAll.h -OneToOne.o: OneToOne.h -OneToOneDataIndex.o: OneToOneDataIndex.h -SingleMsg.o: SingleMsg.h -SparseMsg.o: SparseMsg.h -testMsg.o: DiagonalMsg.h OneToAllMsg.h OneToOneMsg.h SingleMsg.h SparseMsg.h OneToOneDataIndexMsg.h ../basecode/SetGet.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/msg/SparseMsg.cpp b/msg/SparseMsg.cpp index 46d3fb5e1fb4b0a3da80bb34fc7ecaf0b54c1596..0be80c0044c083b9c04266882ab5407b28fd9d4d 100644 --- a/msg/SparseMsg.cpp +++ b/msg/SparseMsg.cpp @@ -301,13 +301,12 @@ void SparseMsg::updateAfterFill() SparseMatrix< unsigned int > temp( matrix_); temp.transpose(); for ( unsigned int i = 0; i < temp.nRows(); ++ i ) { - const unsigned int* colIndex; - const unsigned int* entry; - unsigned int num = temp.getRow( i, &entry, &colIndex ); if ( i >= startData && i < endData ) { - // Inefficient. Better to do it in one pass after getting - // the max num - e2_->resizeField( i - startData, num + 1 ); + const unsigned int* colIndex; + const unsigned int* entry; + // SparseMatrix::getRow returns # of entries. + unsigned int num = temp.getRow( i, &entry, &colIndex ); + e2_->resizeField( i - startData, num ); } } e1()->markRewired(); diff --git a/pymoose/Makefile b/pymoose/Makefile deleted file mode 100644 index 1c8abeca9e00a0b2bd0c0b36cf9fb222ebfbdd5d..0000000000000000000000000000000000000000 --- a/pymoose/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Makefile -# -# Author: Subhasis Ray -# Created: 2011-03-10 12:10:32 (+0530) -TARGET = _pymoose.o -# CXXFLAGS += -I../basecode -I../msg -I../shell -CXXFLAGS += -DQUIET_MODE -NUMPY_WARNING_FLAG = -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -.PHONY: clean - -HEADERS = moosemodule.h ../basecode/global.h PyRun.h - -OBJ = moosemodule.o mfield.o vec.o melement.o test_moosemodule.o PyRun.o - -$(TARGET): $(OBJ) $(HEADERS) ../basecode/main.cpp ../utility/_utility.o ../basecode/_basecode.o - $(LD) -r -o $(TARGET) $(OBJ) $(LDFLAGS) - -.cpp.o: $(HEADERS) - $(CXX) $(CXXFLAGS) $(NUMPY_WARNING_FLAG) -I.. -I../basecode $< -c -clean: - -rm -f *.o - diff --git a/pymoose/mfield.cpp b/pymoose/mfield.cpp index dd452890f2114c2bac81721c1b357952320b9c03..18bd3f73c3391d375ce409058fd88c474abd8bdd 100644 --- a/pymoose/mfield.cpp +++ b/pymoose/mfield.cpp @@ -319,7 +319,7 @@ PyObject * moose_DestField_call(PyObject * self, PyObject * args, PyObject * arg = PyTuple_GetItem(args, ii); Py_INCREF(arg); PyTuple_SetItem(newargs, ii+1, arg); - Py_DECREF(arg); + // Py_DECREF(arg); } // Call ObjId._setDestField with the new arguments PyObject * ret = moose_ObjId_setDestField(((_Field*)self)->owner, newargs); diff --git a/python/moose/SBML/readSBML.py b/python/moose/SBML/readSBML.py index 255d96783e4d576b8cbc1430b1d2ba10898b08f3..4dcc89cc2a1d657aa522f091841a2ee941b7bad4 100644 --- a/python/moose/SBML/readSBML.py +++ b/python/moose/SBML/readSBML.py @@ -499,7 +499,8 @@ def createReaction(model, specInfoMap, modelAnnotaInfo, globparameterIdValue,gro for ritem in range(0, model.getNumReactions()): reactionCreated = False groupName = "" - + rName = "" + rId = "" reac = model.getReaction(ritem) group = "" reacAnnoInfo = {} diff --git a/python/moose/SBML/writeSBML.py b/python/moose/SBML/writeSBML.py index 1727d6e6aa969ed570e8fbccaba339cd0187f071..5cdb25bc8e0ce9af4d016bb47d0d0364cd15aa58 100644 --- a/python/moose/SBML/writeSBML.py +++ b/python/moose/SBML/writeSBML.py @@ -20,7 +20,7 @@ Last-Updated: Tue Apr 4 14:20:00 2017(+0530) ''' import sys import re -from collections import Counter +#from collections import Counter import moose from moose.SBML.validation import validateModel from moose.chemUtil.chemConnectUtil import * @@ -499,11 +499,13 @@ def parmUnit(rct_order, cremodel_): return unit_stream +def Counter(items): + return dict((i, items.count(i)) for i in items) + def getSubprd(cremodel_, mobjEnz, type, neighborslist): if type == "sub": reacSub = neighborslist reacSubCou = Counter(reacSub) - # print " reacSubCou ",reacSubCou,"()",len(reacSubCou) noofSub = len(reacSubCou) rate_law = " " diff --git a/python/moose/chemUtil/chemConnectUtil.py b/python/moose/chemUtil/chemConnectUtil.py index 93d8be9d1442970c5ac748184f6743ba6810fc6b..a89516833e5a3899552942174108174d6363d608 100644 --- a/python/moose/chemUtil/chemConnectUtil.py +++ b/python/moose/chemUtil/chemConnectUtil.py @@ -1,6 +1,6 @@ import moose import numpy as np -from collections import Counter +#from collections import Counter def xyPosition(objInfo,xory): try: @@ -177,5 +177,6 @@ def countitems(mitems,objtype): items = [] items = moose.element(mitems).neighbors[objtype] uniqItems = set(items) - countuniqItems = Counter(items) + #countuniqItems = Counter(items) + countuniqItems = dict((i, items.count(i)) for i in items) return(uniqItems,countuniqItems) \ No newline at end of file diff --git a/python/moose/genesis/writeKkit.py b/python/moose/genesis/writeKkit.py index 2bd33e212590cad4216ca54e733b45bde7ad60b3..1e5496010c34da8beea25b19f3d3aaeb09bc59d8 100644 --- a/python/moose/genesis/writeKkit.py +++ b/python/moose/genesis/writeKkit.py @@ -51,7 +51,7 @@ def mooseWriteKkit( modelpath, filename, sceneitems={}): '\n\t sudo apt install python-maplotlib', "") return False else: - + error = " " ignoreColor= ["mistyrose","antiquewhite","aliceblue","azure","bisque","black","blanchedalmond","blue","cornsilk","darkolivegreen","darkslategray","dimgray","floralwhite","gainsboro","ghostwhite","honeydew","ivory","lavender","lavenderblush","lemonchiffon","lightcyan","lightgoldenrodyellow","lightgray","lightyellow","linen","mediumblue","mintcream","navy","oldlace","papayawhip","saddlebrown","seashell","snow","wheat","white","whitesmoke","aquamarine","lightsalmon","moccasin","limegreen","snow","sienna","beige","dimgrey","lightsage"] matplotcolor = {} for name,hexno in matplotlib.colors.cnames.items(): @@ -88,19 +88,21 @@ def mooseWriteKkit( modelpath, filename, sceneitems={}): cmin,cmax,xmin1,xmax1,ymin1,ymax1 = findMinMax(sceneitems) for k,v in list(sceneitems.items()): anno = moose.element(k.path+'/info') - x1 = calPrime(v['x']) - y1 = calPrime(v['y']) - sceneitems[k]['x'] = x1 - sceneitems[k]['y'] = y1 + # x1 = calPrime(v['x']) + # y1 = calPrime(v['y']) + # sceneitems[k]['x'] = x1 + # sceneitems[k]['y'] = y1 f = open(filename, 'w') writeHeader (f,maxVol) gtId_vol = writeCompartment(modelpath,compt,f) writePool(modelpath,f,gtId_vol,sceneitems) + error = "" reacList = writeReac(modelpath,f,sceneitems) enzList = writeEnz(modelpath,f,sceneitems) - writeSumtotal(modelpath,f) + error = writeSumtotal(modelpath,f,error) + error = writeStimulus(modelpath,f,error) f.write("simundump xgraph /graphs/conc1 0 0 99 0.001 0.999 0\n" "simundump xgraph /graphs/conc2 0 0 100 0 1 0\n") tgraphs = moose.wildcardFind(modelpath+'/##[ISA=Table2]') @@ -125,7 +127,7 @@ def mooseWriteKkit( modelpath, filename, sceneitems={}): writeNotes(modelpath,f) writeFooter2(f) print('Written to file '+filename) - return True + return error,True else: print(("Warning: writeKkit:: No model found on " , modelpath)) return False @@ -341,15 +343,45 @@ def trimPath(mobj): s = splitpath.replace("_dash_",'-') return s -def writeSumtotal( modelpath,f): +def writeSumtotal( modelpath,f, error): funclist = moose.wildcardFind(modelpath+'/##[ISA=Function]') + s = "" for func in funclist: + fInfound = True + fOutfound = True funcInputs = moose.element(func.path+'/x[0]') - s = "" - for funcInput in funcInputs.neighbors["input"]: - s = s+ "addmsg /kinetics/" + trimPath(funcInput)+ " /kinetics/" + trimPath(moose.element(func.parent)) + " SUMTOTAL n nInit\n" - f.write(s) + if not len(funcInputs.neighbors["input"]): + fInfound = False + error = error +'\n/'+ (moose.element(func)).parent.name+ '/'+moose.element(func).name + ' function doesn\'t have input which is not allowed in genesis. \n This function is not written down into genesis file\n' + + if not len(func.neighbors["valueOut"]): + error = error +'Function'+func.path+' has not been connected to any output, this function is not written to genesis file' + fOutfound = False + else: + for srcfunc in func.neighbors["valueOut"]: + if srcfunc.className in ["ZombiePool","ZombieBufPool","Pool","BufPool"]: + functionOut = moose.element(srcfunc) + else: + error = error +'Function output connected to '+srcfunc.name+ ' which is a '+ srcfunc.className+' which is not allowed in genesis, this function '+(moose.element(func)).path+' is not written to file' + fOutfound = False + + if fInfound and fOutfound: + srcPool = [] + for funcInput in funcInputs.neighbors["input"]: + if funcInput not in srcPool: + srcPool.append(funcInput) + s = "addmsg /kinetics/" + trimPath(funcInput)+ " /kinetics/"+ trimPath(functionOut)+ " SUMTOTAL n nInit\n" + f.write(s) + else: + error = error + '\n Genesis doesn\'t allow same moluecule connect to function mutiple times. \n Pool \''+ moose.element(funcInput).name + '\' connected to '+ (moose.element(func)).path + return error + +def writeStimulus(modelpath,f,error): + + if len(moose.wildcardFind(modelpath+'/##[ISA=StimulusTable]')): + error = error +'\n StimulusTable is not written into genesis. This is in Todo List' + return error def storePlotMsgs( tgraphs,f): s = "" if tgraphs: diff --git a/python/moose/merge/merge.py b/python/moose/merge/merge.py index ee940162b2f47fd0417dee223d777d7d8e9891c6..a8507808f29489d294e2966b7dcc24fb9fa86833 100644 --- a/python/moose/merge/merge.py +++ b/python/moose/merge/merge.py @@ -46,6 +46,7 @@ import mtypes from moose.chemUtil.chemConnectUtil import * from moose.chemUtil.graphUtils import * +from moose.genesis import mooseWriteKkit def mergeChemModel(src,des): @@ -54,9 +55,12 @@ def mergeChemModel(src,des): B = des loadedA = False loadedB = False + modelA = moose.element('/') + modelB = moose.element('/') if os.path.isfile(A): modelA,loadedA = loadModels(A) + elif moose.exists(A): modelA = A loadedA = True @@ -122,9 +126,10 @@ def mergeChemModel(src,des): poolListinb = updatePoolList(dictComptB) E_Duplicated,E_Notcopiedyet,E_Daggling = enzymeMerge(dictComptB,dictComptA,key,poolListinb) - path, sfile = os.path.split(src) - path, dfile = os.path.split(des) - print("\n %s (src) model is merged to %s (des)" %(sfile, dfile)) + spath, sfile = os.path.split(src) + dpath, dfile = os.path.split(des) + print("\nThe content of %s (src) model is merged to %s (des)." %(sfile, dfile)) + # Here any error or warning during Merge is written it down if funcExist: print( "\nIn model \"%s\" pool already has connection from a function, these function from model \"%s\" is not allowed to connect to same pool,\n since no two function are allowed to connect to same pool:"%(dfile, sfile)) for fl in list(funcExist): @@ -169,7 +174,33 @@ def mergeChemModel(src,des): if E_Daggling: print ("Enzyme:") for ed in list(E_Daggling): - print ("%s " %str(ed.name)) + print ("%s " %str(ed.name)) + ## Model is saved + print ("\n ") + savemodel = raw_input("Do you want to save the model? \"YES\" \"NO\" ") + if savemodel.lower() == 'yes' or savemodel.lower() == 'y': + mergeto = raw_input("Enter File name ") + if mergeto and mergeto.strip(): + filenameto = 'merge.g' + else: + if str(mergeto).rfind('.') != -1: + mergeto = mergeto[:str(mergeto).rfind('.')] + if str(mergeto).rfind('/'): + mergeto = mergeto+'merge' + + filenameto = mergeto+'.g' + + error,written = moose.mooseWriteKkit(modelB, filenameto) + if written == False: + print('Could not save the Model, check the files') + else: + if error == "": + print(" \n The merged model is saved into \'%s\' " %(filenameto)) + else: + print('Model is saved but these are not written\n %s' %(error)) + else: + print ('\nMerged model is available under moose.element(\'%s\')' %(modelB)) + print (' If you are in python terminal you could save \n >moose.mooseWriteKkit(\'%s\',\'filename.g\')' %(modelB)) def functionMerge(comptA,comptB,key): funcNotallowed, funcExist = [], [] @@ -264,6 +295,8 @@ def loadModels(filepath): subtype = mtypes.getSubtype(filepath, modeltype) if subtype == 'kkit' or modeltype == "cspace": + if moose.exists(modelpath): + moose.delete(modelpath) moose.loadModel(filepath,modelpath) loaded = True @@ -636,4 +669,20 @@ if __name__ == "__main__": if not os.path.exists(src): print("Filename or path does not exist",des) exit(0) - mergered = mergeChemModel(src,des) \ No newline at end of file + else: + mergered = mergeChemModel(src,des) + ''' + try: + sys.argv[3] + except IndexError: + print ("Merge to save not specified") + mergeto = "merge" + else: + mergeto = sys.argv[3] + if str(mergeto).rfind('.') != -1: + mergeto = mergeto[:str(mergeto).rfind('.')] + if str(mergeto).rfind('/'): + mergeto = mergeto+'merge' + + mergered = mergeChemModel(src,des,mergeto) + ''' \ No newline at end of file diff --git a/python/moose/plot_utils.py b/python/moose/plot_utils.py index 94c8577e7491f4550f72774303f10e7a9872af1e..25346524a0d190594ae23a435070e0e973439292 100644 --- a/python/moose/plot_utils.py +++ b/python/moose/plot_utils.py @@ -310,6 +310,7 @@ def plot_tables(data_dict, xvec = None, **kwargs): plt.figure(figsize=(10, 1.5*len(data_dict))) if not subplot: ax = plt.subplot( 1, 1, 1 ) + kwargs[ 'ax' ] = ax for i, k in enumerate(data_dict): pu.info("+ Plotting for %s" % k) @@ -325,8 +326,9 @@ def plot_tables(data_dict, xvec = None, **kwargs): yvec = data_dict[k].vector plotVector(yvec, xvec, label=k, **kwargs) else: - ax = plt.subplot(len(data_dict), 1, i) - yvec = data_dict[k] + ax = plt.subplot(len(data_dict), 1, i+1) + kwargs[ 'ax' ] = ax + yvec = data_dict[k].vector plotVector(yvec, xvec, label=k, **kwargs) if subplot: try: diff --git a/python/rdesigneur/rmoogli.py b/python/rdesigneur/rmoogli.py index c1b0d3aad7038c60bc26bf0c3dbfb68ba86c7a51..e1e34a7883770f76a7b6364bfc687ac8b139320e 100644 --- a/python/rdesigneur/rmoogli.py +++ b/python/rdesigneur/rmoogli.py @@ -65,7 +65,9 @@ def interlude( view ): view.mooGroup.set("color", val, view.mapper) view.yaw( rotation ) #print moogliDt, len( val ), runtime - if moose.element("/clock").currentTime >= runtime: + currt = moose.element("/clock").currentTime + view.timecb.set_title( 'T = {:.3f} s'.format( currt ) ) + if currt >= runtime: view.stop() # This func is used for later viewers, that don't handle advancing time. @@ -146,13 +148,34 @@ def makeMoogli( rd, mooObj, moogliEntry, fieldInfo ): moogliEntry[5], moogliEntry[6])) cb.set_num_labels(3) + + # Use the text title on a colorbar to display the current time!! + # Spectacularly ugly hack, but I was unable to find other ways to put + # text in a predefined place in a moogli view. + timecb = moogli.widgets.ColorBar( id="timecb", + title = "T = 0 s", + text_color=moogli.colors.BLACK, + position=moogli.geometry.Vec3f(0.1, -0.01, 0.0), + size=moogli.geometry.Vec3f(0.01, 0.02, 0.0), + text_font="/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf", + orientation=0.0, + text_character_size=16, + label_formatting_precision=1, + colormap=moogli.colors.MatplotlibColorMap(matplotlib.cm.rainbow), + color_resolution=2, + scalar_range=moogli.geometry.Vec2f( 0.0, 1.0 ) + ) + timecb.set_num_labels( 0 ) + view.attach_color_bar(cb) + view.attach_color_bar(timecb) view.rd = rd view.mooObj = displayObj view.mooGroup = updateGroup view.mooField = mooField view.mooScale = fieldInfo[2] view.mapper = mapper + view.timecb = timecb viewer.attach_view(view) return viewer diff --git a/randnum/Makefile b/randnum/Makefile deleted file mode 100644 index 259bbb4c7882c99a7c45a5970251d0a9f49ac921..0000000000000000000000000000000000000000 --- a/randnum/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -CXXFLAGS += -I.. -# the line below are for easy inclusion of libxml++ -#CXXFLAGS += $(shell pkg-config libxml++-2.6 --CXXFLAGS) - -TARGET = _randnum.o - -OBJ = \ - mt19937ar.o \ - RandGenerator.o \ - UniformRng.o \ - Uniform.o \ - Exponential.o \ - ExponentialRng.o \ - Binomial.o \ - Normal.o \ - Poisson.o \ - Gamma.o \ - PoissonRng.o \ - NormalRng.o \ - BinomialRng.o \ - GammaRng.o \ - -HEADERS = \ - ../basecode/header.h \ - randnum.h \ - Probability.h \ - RandGenerator.h \ - UniformRng.h \ - Uniform.h \ - Exponential.h \ - ExponentialRng.h \ - Binomial.h \ - Gamma.h \ - Poisson.h \ - PoissonRng.h \ - Normal.h \ - NormalRng.h \ - BinomialRng.h \ - GammaRng.h \ - -default: $(TARGET) - -.cpp.o: - $(CXX) $(CXXFLAGS) $< -c -# $(CXX) $(CXXFLAGS) $(shell pkg-config libxml++-2.6 --CXXFLAGS) $< -c - -$(TARGET): $(OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/scheduling/Makefile b/scheduling/Makefile deleted file mode 100644 index 2061a090a4a12a018e047a11c1db4c2416c0b4e9..0000000000000000000000000000000000000000 --- a/scheduling/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2009 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _scheduling.o - -OBJ = \ - Clock.o \ - testScheduling.o \ - -HEADERS = \ - ../basecode/header.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -Clock.o: Clock.h -testScheduling.o: Clock.h - - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/shell/Makefile b/shell/Makefile deleted file mode 100644 index 543301438d3e165da180a7ee2109b498a1bd4023..0000000000000000000000000000000000000000 --- a/shell/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _shell.o - -OBJ = \ - Shell.o \ - ShellCopy.o \ - ShellThreads.o \ - LoadModels.o \ - SaveModels.o \ - Neutral.o \ - Wildcard.o \ - testShell.o \ - -HEADERS = \ - ../basecode/header.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -#Shell.o: Shell.h Neutral.h ../scheduling/Clock.h ../sbml/MooseSbmlWriter.h ../sbml/MooseSbmlReader.h -Shell.o: Shell.h Neutral.h ../scheduling/Clock.h -ShellCopy.o: Shell.h Neutral.h ../scheduling/Clock.h -ShellSetGet.o: Shell.h -ShellThreads.o: Shell.h Neutral.h ../scheduling/Clock.h -LoadModels.o: Shell.h Neutral.h ../biophysics/SwcSegment.h ../biophysics/ReadSwc.h -SaveModels.o: Shell.h Neutral.h -Neutral.o: Neutral.h ../basecode/ElementValueFinfo.h -Wildcard.o: Wildcard.h Shell.h Neutral.h ../basecode/ElementValueFinfo.h -testShell.o: Wildcard.h Shell.h Neutral.h ../builtins/Arith.h ../basecode/SparseMatrix.h ../msg/SparseMsg.h ../msg/SingleMsg.h ../basecode/SetGet.h ../basecode/HopFunc.h ../basecode/OpFuncBase.h ../basecode/OpFunc.h - -#../kinetics/ReadKkit.h ../biophysics/ReadCell.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I.. -I../basecode -I../msg $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) - -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/signeur/Makefile b/signeur/Makefile deleted file mode 100644 index ad8c507467241ca0853937796d8b21b8e10b9b8f..0000000000000000000000000000000000000000 --- a/signeur/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** Copyright (C) 2003-2012 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -CXXFLAGS += -I.. -# the line below are for easy inclusion of libxml++ -#CXXFLAGS += $(shell pkg-config libxml++-2.6 --cflags) - -TARGET = _signeur.o - -OBJ = \ - Adaptor.o \ - testSigNeur.o - - -HEADERS = \ - ../basecode/header.h \ - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -Adaptor.o: Adaptor.h -testSigNeur.o: Adaptor.h - -.cpp.o: - $(CXX) $(CXXFLAGS) -I.. -I../basecode $< -c - -$(TARGET): $(OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) -clean: - -rm -f *.o $(TARGET) core core.* diff --git a/synapse/Makefile b/synapse/Makefile deleted file mode 100644 index bbf82b990c89bb574aab8b2fd4ff27857a97a6d1..0000000000000000000000000000000000000000 --- a/synapse/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** copyright (C) 2007 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -TARGET = _synapse.o - -OBJ = \ - SynHandlerBase.o \ - SimpleSynHandler.o \ - STDPSynHandler.o \ - GraupnerBrunel2012CaPlasticitySynHandler.o \ - Synapse.o \ - STDPSynapse.o \ - RollingMatrix.o \ - SeqSynHandler.o \ - testSynapse.o \ - -# GSL_LIBS = -L/usr/lib -lgsl - -HEADERS = \ - ../basecode/header.h \ - ../utility/numutil.h \ - - -default: $(TARGET) - -$(OBJ) : $(HEADERS) -SynHandlerBase.o: SynHandlerBase.h Synapse.h -SimpleSynHandler.o: SynHandlerBase.h Synapse.h SimpleSynHandler.h SynEvent.h -STDPSynHandler.o: SynHandlerBase.h STDPSynapse.h STDPSynHandler.h SynEvent.h -GraupnerBrunel2012CaPlasticitySynHandler.o: SynHandlerBase.h Synapse.h GraupnerBrunel2012CaPlasticitySynHandler.h SynEvent.h -Synapse.o: Synapse.h SynHandlerBase.h -STDPSynapse.o: STDPSynapse.h SynHandlerBase.h -RollingMatrix.o: RollingMatrix.h -SeqSynHandler.o: SynHandlerBase.h Synapse.h SimpleSynHandler.h SeqSynHandler.h RollingMatrix.h SynEvent.h -testSynapse.o: SynHandlerBase.h Synapse.h SimpleSynHandler.h SeqSynHandler.h RollingMatrix.h SynEvent.h - -.cpp.o: - $(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg -I .. -I../external/muparser/include $< -c - -$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS) - -clean: - rm -f *.o $(TARGET) core core.* diff --git a/synapse/SeqSynHandler.cpp b/synapse/SeqSynHandler.cpp index f31f91171120706a2c54f1ffc7ecadbe151409af..dc826cefd49306dda29088158185a4d762f28599 100644 --- a/synapse/SeqSynHandler.cpp +++ b/synapse/SeqSynHandler.cpp @@ -140,6 +140,19 @@ const Cinfo* SeqSynHandler::initCinfo() &SeqSynHandler::setPlasticityScale, &SeqSynHandler::getPlasticityScale ); + + static ValueFinfo< SeqSynHandler, double > sequencePower( + "sequencePower", + "Exponent for the outcome of the sequential calculations. " + "This is needed because linear summation of terms in the kernel" + "means that a brief stong sequence match is no better than lots" + "of successive low matches. In other words, 12345 is no better" + "than 11111. Using an exponent lets us select the former." + "Defaults to 1.0.", + &SeqSynHandler::setSequencePower, + &SeqSynHandler::getSequencePower + ); + static ReadOnlyValueFinfo< SeqSynHandler, vector< double > > weightScaleVec( "weightScaleVec", @@ -169,6 +182,7 @@ const Cinfo* SeqSynHandler::initCinfo() &synapseOrderOption, // Field &seqActivation, // ReadOnlyField &plasticityScale, // Field + &sequencePower, // Field &weightScaleVec, // ReadOnlyField &kernel, // ReadOnlyField &history // ReadOnlyField @@ -201,6 +215,7 @@ SeqSynHandler::SeqSynHandler() baseScale_( 0.0 ), sequenceScale_( 1.0 ), plasticityScale_( 0.0 ), + sequencePower_( 1.0 ), seqActivation_( 0.0 ), synapseOrderOption_( -1 ) // sequential ordering { @@ -421,6 +436,16 @@ void SeqSynHandler::setPlasticityScale( double v ) plasticityScale_ = v; } +double SeqSynHandler::getSequencePower() const +{ + return sequencePower_; +} + +void SeqSynHandler::setSequencePower( double v ) +{ + sequencePower_ = v; +} + vector< double >SeqSynHandler::getWeightScaleVec() const { return weightScaleVec_; @@ -525,7 +550,7 @@ void SeqSynHandler::vProcess( const Eref& e, ProcPtr p ) seqActivation_ = 0.0; for ( vector< double >::iterator y = correlVec.begin(); y != correlVec.end(); ++y ) - seqActivation_ += *y; + seqActivation_ += pow( *y, sequencePower_ ); // We'll use the seqActivation_ to send a special msg. seqActivation_ *= sequenceScale_; diff --git a/synapse/SeqSynHandler.h b/synapse/SeqSynHandler.h index 45217ba0c4c6e052de5ae11cbc47d35714554a8b..7489da865d144ee3929137a35adf57d387c246db 100644 --- a/synapse/SeqSynHandler.h +++ b/synapse/SeqSynHandler.h @@ -66,6 +66,8 @@ class SeqSynHandler: public SynHandlerBase double getSeqActivation() const; // summed activation of syn chan void setPlasticityScale( double v ); double getPlasticityScale() const; + void setSequencePower( double v ); + double getSequencePower() const; vector< double > getWeightScaleVec() const; vector< double > getKernel() const; vector< double > getHistory() const; @@ -109,6 +111,15 @@ class SeqSynHandler: public SynHandlerBase */ double plasticityScale_; + /** + * Exponent to use for the outcome of the sequential calculations. + * This is needed because linear summation of terms in the kernel + * means that a brief stong sequence match is no better than lots + * of successive low matches. In other words, 12345 is no better + * than 11111. + */ + double sequencePower_; + /////////////////////////////////////////// // Some readonly fields double seqActivation_; // global activation if sequence recognized diff --git a/utility/Makefile b/utility/Makefile deleted file mode 100644 index 87af0b7dc6bf3ae2edd3e7517cc15831d4e4679c..0000000000000000000000000000000000000000 --- a/utility/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -#/********************************************************************** -#** This program is part of 'MOOSE', the -#** Messaging Object Oriented Simulation Environment. -#** Copyright (C) 2003-2012 Upinder S. Bhalla. and NCBS -#** It is made available under the terms of the -#** GNU Lesser General Public License version 2.1 -#** See the file COPYING.LIB for the full notice. -#**********************************************************************/ - -CXXFLAGS += -I.. -# the line below are for easy inclusion of libxml++ -#CXXFLAGS += $(shell pkg-config libxml++-2.6 --cflags) - -TARGET = _utility.o - -OBJ = \ - strutil.o \ - types.o \ - setupenv.o \ - numutil.o \ - Annotator.o \ - cnpy.o \ - Vec.o \ - - -HEADERS = \ - strutil.h \ - numutil.h \ - ../basecode/header.h \ - cnpy.hpp \ - -default: $(TARGET) - -strutil.o: strutil.h -Annotator.o: Annotator.h -Vec.o: Vec.h ../basecode/doubleEq.h -cnpy.o : cnpy.hpp - -.cpp.o: - $(CXX) $(CXXFLAGS) -I.. -I../basecode $< -c - -$(TARGET): $(OBJ) $(HEADERS) - $(LD) -r -o $(TARGET) $(OBJ) -clean: - -rm -f *.o $(TARGET) core core.*