Skip to content

Commit

Permalink
Merge pull request #119 from MathCancer/development
Browse files Browse the repository at this point in the history
bug fixes for 1.10.4
  • Loading branch information
MathCancer authored Jul 19, 2022
2 parents 5bbd35d + c63f3d9 commit bc3b32f
Show file tree
Hide file tree
Showing 12 changed files with 551 additions and 120 deletions.
4 changes: 2 additions & 2 deletions CITATION.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
If you use PhysiCell in your project, please cite PhysiCell and the version
number, such as below:

We implemented and solved the model using PhysiCell (Version 1.10.3) [1].
We implemented and solved the model using PhysiCell (Version 1.10.4) [1].

[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu-
Expand All @@ -11,7 +11,7 @@ We implemented and solved the model using PhysiCell (Version 1.10.3) [1].
Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM
as below:

We implemented and solved the model using PhysiCell (Version 1.10.3) [1],
We implemented and solved the model using PhysiCell (Version 1.10.4) [1],
with BioFVM [2] to solve the transport equations.

[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
Expand Down
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems

**Version:** 1.10.3
**Version:** 1.10.4

**Release date:** 25 June 2022
**Release date:** 18 July 2022

## Overview:
PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments.
Expand Down Expand Up @@ -63,30 +63,31 @@ Visit http://MathCancer.org/blog for the latest tutorials and help.
**Quick Start:** Look at QuickStart.md in the documentation folder.

**User Guide:** Look at UserGuide.pdf in the documentation folder.

**Setup and Training:** See last year's workshop and hackathon at https://github.com/PhysiCell-Training/ws2021

**Old Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/
**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/

**Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell)

See changes.md for the full change log.

* * *
## Release summary:
Version 1.10.3 primarily fixes bugs and further refines the signal and behavior dictionaries, particularly with access to custom variables. It also allows users to designate custom variables as _conserved quantities_ that are divided evenly among daughter cells as division (e.g., melanosomes). Lastly, this release continues updates to PhysiBoSS and libRoadrunner to leverage newer core features and improve compatibiltiy, while also improving support for newer Mac (M1 and M2) architectures.
Version 1.10.4 primarily fixes bugs in file output and the ode-energy sample, and refines thread safety in cell phagocytosis.

The 1.10.0 release introduced major new phenotype functionality, including standardized support for cell-cell interactions (phagocytosis, cell attack that increases a tracked damage variable, and cell fusion), cell transformations, advanced chemotaxis, and cell adhesion affinities for preferential adhesion. This release also includes new, auto-generated "dictionaries" of signals and behaviors to facilitate writing cell behavioral models and intracellular models, as well as standardized Hill and linear response functions for use in intracellular models. Lastly, this release includes a number of bugfixes, most notably pseudorandom number generators with improved thread safety.

A blog post and tutorial on the new phenotype elements can be found at http://www.mathcancer.org/blog/introducing-cell-interactions-and-transformations.

A blog post and tutorial on the new signal and behavior dictionaries can be found at http://www.mathcancer.org/blog/introducing-cell-signal-and-behavior-dictionaries.

**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details.

**NOTE 2:** Windows users need to follow an updated (from v1.8) MinGW64 installation procedure. This will install an updated version of g++, plus libraries that are needed for some of the intracellular models. See the [Quickstart](documentation/Quickstart.md) for details.

### Major new features and changes in the 1.10.z versions
#### 1.10.4
+ None in this version. See 1.10.0
#### 1.10.3
+ None in this version. See 1.10.0
#### 1.10.2
Expand Down Expand Up @@ -198,6 +199,8 @@ A blog post and tutorial on the new signal and behavior dictionaries can be foun
+ With default parameters, bacteria kill off cells ot form abscesses, until death attracts macrophages to activate immune response to kill the invaders, after which the tissue can regrow.

### Minor new features and changes:
#### 1.10.4
+ None in this version.
#### 1.10.3
+ Added `attachment_rate` and `detachment_rate` to `phenotype.mechanics` for use in a future standard attachment and detachment model.
+ Modernized output format:
Expand Down Expand Up @@ -240,6 +243,8 @@ A blog post and tutorial on the new signal and behavior dictionaries can be foun
+ `create_cell( Cell_Definition )` now uses "`is_movable`" from the cell definition.

### Beta features (not fully supported):
#### 1.10.4
+ None in this version.
#### 1.10.3
+ Each time outputs two cell interaction graphs (as text files):
+ neighbor graph records which cells are within interaction distance for each cell agent, with format;
Expand Down Expand Up @@ -269,11 +274,16 @@ None in this version. See 1.10.0.
+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output)

### Bugfixes:
#### 1.10.4
+ Fixed vectorized outputs in MultiCellDS that incorrectly assumed linear data ordering in std::vector. Thank you Randy Heiland!
+ Fixed errors in the ode-energy-sample project. Thank you Randy Heiland, Furkan Kurtoglu, and John Metzcar!
+ Improved thread safety in phagocytosis. Thank you Michael Getz!

#### 1.10.3
+ Fixed bug in `get_single_behavior` and `get_single_base_behavior` where querying any cycle exit rate or cycle entry mistakenly returned -1.
+ Corrected declaration of `standard_add_basement_membrane_interactions` in `PhysiCell_standard_models.h` to properly use phenotype by reference. Thank you Inês Gonçalves!
+ Removed the OpenMP pragma in `void Microenvironment::apply_dirichlet_conditions( void )` (around line 272) that tends to perform more poorly than serial code.

#### 1.10.2
+ Fixed error in `double get_single_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found.

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.3
1.10.4
19 changes: 19 additions & 0 deletions beta/get_physicell.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Python script to download the latest release of PhysiCell

import requests

response = requests.get("https://api.github.com/repos/MathCancer/PhysiCell/releases/latest")
release_name_str = response.json()["name"]
print(release_name_str)
print(release_name_str.split())
vnum = release_name_str.split()[1]
print("vnum=",vnum) # e.g., vnum= 1.10.4

remote_url = 'https://github.com/MathCancer/PhysiCell/releases/download/' + vnum + '/PhysiCell_V.' + vnum + '.zip'
print("remote_url=",remote_url)
local_file = 'PhysiCell.zip'
data = requests.get(remote_url)
with open(local_file, 'wb')as file:
file.write(data.content)
print("downloaded version ",vnum," to ",local_file)

49 changes: 25 additions & 24 deletions beta/setup_libroadrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def reminder_dynamic_link_path_linux():
print("\n* To make this permanent, add this line to the bottom of the respective shell startup file, e.g., .bashrc, .bash_profile, or .zshenv in your home directory.")
print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")

# print("--------- print reminder!!!!!!!!!!!!!!\n\n")
if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "addons", "libRoadrunner", "roadrunner")):
print('\nlibroadrunner already installed.\n')

Expand All @@ -40,22 +39,19 @@ def reminder_dynamic_link_path_linux():
rr_file = ""
url = ""

mac_silicon = False
if os_type.lower() == 'darwin':
reminder_dynamic_link_path_macos()
if "ARM64" in platform.uname().version:
# pass
# reminder_dynamic_link_path()
# print('... for the arm64 processor.')
# url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/libs/macos12_arm64/libroadrunner_c_api.dylib"
rr_file = "roadrunner_macos_arm64.tar.gz"
url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/roadrunner_macos_arm64.tar.gz"
mac_silicon = True
else:
rr_file = "roadrunner-osx-10.9-cp36m.tar.gz"
url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.4.18/" + rr_file + "/download"
# url = "https://raw.github.com/PhysiCell-Tools/intracellular_libs/blob/main/ode/libs/macos/roadrunner-osx-10.9-cp36m.tar.gz"

# rr_file = "roadrunner-osx-10.9-cp36m.tar.gz"
# url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/libs/macos/roadrunner-osx-10.9-cp36m.tar.gz"
elif os_type.lower().startswith("win"):
rr_file = "roadrunner-win64-vs14-cp35m.zip"
url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.4.18/" + rr_file + "/download"
Expand All @@ -67,11 +63,12 @@ def reminder_dynamic_link_path_linux():
print("Your operating system seems to be unsupported. Please submit a ticket at https://sourceforge.net/p/physicell/tickets/ ")
sys.exit(1)

# print("-------- past if block...")
# reminder_dynamic_link_path()
# fname = url.split('/')[-2]
fname = url.split('/')[-1]
print("fname = ",fname)
print("url=",url)
if mac_silicon:
fname = url.split('/')[-1]
else:
fname = url.split('/')[-2]
print("fname=",fname)

# home = os.path.expanduser("~")
print('libRoadRunner will now be installed into this location:')
Expand Down Expand Up @@ -115,8 +112,13 @@ def reminder_dynamic_link_path_linux():
if os_type.lower().startswith("win"):
rrlib_dir = my_file[:-4]
else: # darwin or linux
rrlib_dir = my_file[:-7]
rrlib_dir = my_file[:-6]
if mac_silicon:
# idx_end = my_file.rindex('/')
# rrlib_dir = my_file[:idx_end]
rrlib_dir = my_file[:-7]
# rrlib_dir = my_file
else:
rrlib_dir = my_file[:-7]
print('rrlib_dir = ',rrlib_dir)

def download_cb(blocknum, blocksize, totalsize):
Expand All @@ -133,12 +135,10 @@ def download_cb(blocknum, blocksize, totalsize):

urllib.request.urlretrieve(url, my_file, download_cb)

# sys.exit(-1)

new_dir_name = "roadrunner"
os.chdir(dir_name)
print('installing (uncompressing) the file...')
if os_type.lower().startswith("win"): # on Windows
if os_type.lower().startswith("win"):
try:
with zipfile.ZipFile(rr_file) as zf:
zf.extractall('.')
Expand All @@ -148,23 +148,24 @@ def download_cb(blocknum, blocksize, totalsize):
exit(1)
else: # Darwin or Linux
try:
print("-- attempt to extract from the tar file...", rr_file)
print("untarring ",rr_file)
tar = tarfile.open(rr_file)
tar.extractall()
tar.close()
if 'darwin' in os_type.lower():
if "ARM64" in platform.uname().version: # on the new Mac M1, arm64 processor
# if False:
# print("--- TODO: rename ARM64 lib dir")
# sys.exit(-1)
pass # it already uncompresses and creates the 'roadrunner' dir
if mac_silicon:
os.rename("roadrunner_macos_arm64", new_dir_name)
else:
os.rename("roadrunner-osx-10.9-cp36m", new_dir_name)
else:
os.rename("libroadrunner", new_dir_name)
except:
print('error untarring the file')
exit(1)
if mac_silicon:
print()
# pass
else:
print('error untarring the file')
exit(1)

print('Done.\n')

Expand Down
Loading

0 comments on commit bc3b32f

Please sign in to comment.