Skip to content

Commit

Permalink
updated readme for smoldyn mac instructions and added intel smoldyn i…
Browse files Browse the repository at this point in the history
…nstaller
  • Loading branch information
AlexPatrie committed Jan 8, 2024
1 parent 7e44041 commit d6a50e5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 9 deletions.
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Core implementations of `process-bigraph.composite.Process()` aligning with BioS
tools.


## Getting Started (PyPI)
## Installation

The easiest way to download this tool is via the Python Package Index. You may download
core-processes with:
Expand All @@ -19,23 +19,33 @@ install the dependencies required for your use.

### Using `biosimulator_processes.smoldyn_process.SmoldynProcess()`:

#### PLEASE NOTE:
#### Mac Users PLEASE NOTE:
Due to the multi-lingual nature of Smoldyn, which is primarily
developed in C++, the installation process for utilizing
the `SmoldynProcess` process implementation requires separate handling. This is particularly
relevant for macOS and Windows users, where setting up the Python bindings can be more complex.

Please follow the detailed installation instructions provided below to ensure proper setup
of Smoldyn for your system.
For your convienience, we have created an installation shell script that will install the correct distribution of
Smoldyn based on your Mac processor along with the codebase of this repo. To install Smoldyn and this repo on your
Mac, please adhere to the following instructions:

To download Smoldyn, please follow these steps:
1. Clone this repo from Github:

1. Visit the [Smoldyn Download Page](https://www.smoldyn.org/download.html).
2. Choose the version appropriate for your operating system.
3. Follow the instructions or links provided on the page to complete the download.
git clone https://github.com/vivarium-collective/biosimulator-processes.git

For more detailed instructions and information, refer to the official Smoldyn documentation.
2. Provide adminstrative access to the `scripts` directory within the cloned repo:

cd biosimulator-processes
chmod +x scripts

3. Look for the install-with-smoldyn-for-mac-<YOUR MAC PROCESSOR> shell script where <YOUR MAC PROCESSOR> corresponds
to your machine's processor:

ls scripts

4. Run the appropriate shell script (for example, using mac silicon):

scripts/install-with-smoldyn-for-mac-silicon.sh

### Quick Start Example:
#### TODO: Add quickstart example of instance declarations.
Expand Down
32 changes: 32 additions & 0 deletions scripts/install-with-smoldyn-for-mac-intel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# The following script serves as a utility for installing this repository with the Smoldyn requirement on a Intel Mac

set -e

# set installation parameters
dist_url=https://www.smoldyn.org/smoldyn-2.72-mac-Intel.tgz
tarball_name=smoldyn-2.72-mac.tgz
dist_dir=${tarball_name%.tgz}

# uninstall existing version
pip uninstall smoldyn || return

# download the appropriate distribution from smoldyn
wget $dist_url

# extract the source from the tarball
tar -xzvf $tarball_name

# delete the tarball
rm $tarball_name

# install smoldyn from the source
cd $dist_dir
sudo -H ./install.sh

# install the repo
cd ..
pip install -e .


0 comments on commit d6a50e5

Please sign in to comment.