Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 91 additions & 133 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# modelCMT (cortical microtubule dynamics)
# corticalsim3D (cortical microtubule dynamics)

![alt text](https://github.com/HiBandan/modelCMT/blob/main/logo/logomodelCMT-3.0.png)
![alt text](assets/logo/logomodelCMT-1.0.png)

This is a program for simulating cortical microtubule dynamics (CMT) on experimentally extracted microscopic images of cell

This is a program for simulating cortical microtubule dynamics (CMT) on experimentally extracted microscopic images of cell

Application:
Application:

https://www.sciencedirect.com/science/article/pii/S0960982218309242

Expand All @@ -15,131 +14,90 @@ https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005959

Testing and contributing is very welcome, especially if you can contribute with new algorithms and features.

## WINDOWS

### install gcc/g++

download Mingw: https://nuwen.net/mingw.html

run mingw-xx.exe -> this will create a folder MinGw

copy MinGw to C:\

add environment variable: C:\MinGW or C:\MinGW\bin

### install eigen:

download eigen: https://drive.google.com/file/d/1VFLlKJI9EaSP9VUaeV8vmPQYkqdIIJPg/view?usp=sharing

extract "eigen-3.4.0" folder and rename it to "Eigen"

copy "Eigen" folder to C:\Program Files

### install boost:

download boost: https://drive.google.com/file/d/1apu5_am2kJj7HvXJNPhn30k_ryi3gJDf/view?usp=sharing

extract "boost_1_77_0" folder and rename it to "Boost"

copy "Boost" to C:\Program Files

### get the source code

Option 1: Download the package from the Github: https://github.com/HiBandan/modelCMT/archive/refs/heads/main.zip


Option 2: Clone from terminal:

git clone https://github.com/HiBandan/modelCMT.git

### install Code::Blocks:
https://code-blocks.en.uptodown.com/windows

### run

open (with Code::Blocks): modelCMT_WINDOWS.cbp

Projects -> modelCMT.cbp -> add files
-> modules/cppFiles (all files except 'inline.cpp')
-> modules/headFiles (all files)
-> modules/paramFiles (all files)

settings -> compiler -> search directories (compiler) -> add

-> C:\Program Files\Eigen
-> C:\Program Files\Boost

project ->

set program’s arguments: ./modules/paramFiles/parameters_ARRAY.txt
build options -> search directories -> compiler -> add -> modules/cppFiles
build options -> search directories -> compiler -> add -> modules/headFiles
build options -> linker settings -> add -> boost_system
build options -> linker settings -> add -> boost_filesystem
build options -> linker settings -> add -> libboost_filesystem

run

## LINUX

### install gcc/g++

sudo apt update
sudo apt install build-essential

### install eigen:

download eigen: https://drive.google.com/file/d/1VFLlKJI9EaSP9VUaeV8vmPQYkqdIIJPg/view?usp=sharing

extract "eigen-3.4.0" folder and rename it to "Eigen"

copy "Eigen" folder to /usr/local/include

### install boost:

download boost: https://drive.google.com/file/d/1apu5_am2kJj7HvXJNPhn30k_ryi3gJDf/view?usp=sharing

extract "boost_1_77_0" folder and rename it to "Boost"

copy "Boost" to /usr/local/include

### get the source code

Option 1: Download the package from the Github: https://github.com/HiBandan/modelCMT/archive/refs/heads/main.zip

Option 2: Clone from terminal:

git clone https://github.com/HiBandan/modelCMT.git

### install Code::Blocks:

sudo add-apt-repository ppa:damien-moore/codeblocks-stable

sudo apt update

sudo apt install codeblocks codeblocks-contrib

### run

open (with code-block): modelCMT_LINUX.cbp

Projects -> modelCMT.cbp -> add files
-> modules/cppFiles (all files except 'inline.cpp')
-> modules/headFiles (all files)
-> modules/paramFiles (all files)

settings -> compiler -> search directories (compiler) -> add

-> /usr/local/include/Eigen
-> /usr/local/include/Boost

project ->

set program’s arguments: ./modules/paramFiles/parameters_ARRAY.txt
build options -> search directories -> compiler -> add -> modules/cppFiles
build options -> search directories -> compiler -> add -> modules/headFiles
build options -> linker settings -> add -> boost_system
build options -> linker settings -> add -> boost_filesystem
build options -> linker settings -> add -> libboost_filesystem

run
# Installation

NOTE: You need a compiler that supports the C++ 14 standard as a minimum.

## Install the dependencies

`corticalsim3D` depends on Eigen and Boost (however, the latter will be dropped soon). In addition, you will need [Meson](https://mesonbuild.com/index.html) to build the executables, as well as a fairly recent C++ compiler (GCC or Clang) supporting the C++ 14 standard. The following instructions outline the process of installing the dependencies on different platforms, as well as compiling and installing the `corticalsim3D` package itself.

### Windows

Most dependencies need to be installed manually on Windows.

1. GCC

1. Download [MinGW](https://www.mingw-w64.org/)
1. Run `mingw-xx.exe` (this will create a folder called `MinGw`)
1. Copy the `MinGw` folder to `C:\`
1. Add `C:\MinGW` and `C:\MinGW\bin` to the system path

1. Eigen

1. Download [Eigen](https://libeigen.gitlab.io/)
1. Extract `eigen-3.4.0` folder and rename it to `Eigen`
1. Copy the `Eigen` folder to `C:\Program Files`

1. Boost

Download and install [Boost](https://www.boost.org/releases/latest/).

<span style="color: red;">NOTE</span>: The Boost dependency will be deprecated and removed soon.

1. Meson

Use the official [Meson installer for Windows](https://github.com/mesonbuild/meson/releases). The installer also bundles the Ninja dependency, so you don't have to install that separately.

### Linux

Please use your package manager to install all the dependencies. Most Linux distributions provide packages for GCC, Meson, Ninja, Boost and Eigen.

Instructions for Ubuntu (*to be confirmed, may be incomplete*):

```bash
sudo apt update && apt upgrade
sudo apt install gcc libboost-all-dev libeigen3-dev meson ninja-build
```

## Compile

1. First, clone the `corticalsim3D` repository:

```bash
git clone https://github.com/NLeSC/corticalsim3D
```

NOTE: It is recommended that you do **_not_** enter the `corticalsim3D` directory. The next steps assume an out-of-source build setup, meaning that the directory (where the package will be compiled) will be outside the source tree. This has several advantages, such as precluding the possibility of accidentally committing build artefacts to the repository.

1. Configure the build with `meson`:

```bash
meson setup build corticalsim3D
```

This command uses the Meson build system to bootstrap everything that we need for the compilation into a directory called `build` from the sources located in the `corticalsim3D` directory.

1. Enter the build directory and compile the source:

```bash
cd build
meson compile
```

This will generate an executable file called `corticalsim3D` in the current directory (`build`).

## Run

Run the `corticalsim3D` executable with a parameter file as the first argument. Two example parameter files are provided in the `corticalsim3D/config` directory: `parameters_ARRAY.txt` and `parameters_FLY.txt`. The

```bash
./corticalsim3d ../corticalsim3D/config/parameters_ARRAY.txt
```

# TODO

- [ ] Reproduce the installation instructions for Windows and update them as necessary.
- [ ] Add specific installation instructions for dependencies for different Linux distributions (Ubuntu, Debian, Arch...).
- [ ] Add installation instructions for MacOSX.
- [ ] Meson: Option to install the executable into a custom directory
58 changes: 0 additions & 58 deletions config/modelCMT_LINUX.cbp

This file was deleted.

63 changes: 0 additions & 63 deletions config/modelCMT_WINDOWS.cbp

This file was deleted.

4 changes: 2 additions & 2 deletions config/parameters_ARRAY.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#########################
### Input-Output path ###
#########################
inputDir ./inputData
outputDir ./inputData
inputDir ../corticalsim3D/data
outputDir ../corticalsim3D/data
createSubdir 0
##################################
### changing parameters on fly ###
Expand Down
17 changes: 17 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
project('corticalsim', 'cpp')

# Compiler flags
# add_global_arguments('-O2', language : 'cpp')

# Directories containing header files
incdir = include_directories('include')

# Directories containing source files
subdir('src')

# Dependencies
eigen = dependency('Eigen3', modules: ['Eigen3::Eigen'])
boost = dependency('boost', modules : ['filesystem'])

# Executable(s)
executable('corticalsim3d', sources, include_directories: incdir, dependencies: [eigen, boost])
12 changes: 12 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sources = files('eig3.cpp',
'IO-analysis.cpp',
'meshImport.cpp',
'parameters.cpp',
'queue.cpp',
'microtubule.cpp',
'system.cpp',
'geometry-generic.cpp',
'geometry-special.cpp',
'main.cpp'
)