From 080610a5bab920c3245a6091be3db3a16a63ade4 Mon Sep 17 00:00:00 2001 From: kmdouglass Date: Wed, 28 Jun 2017 21:15:17 +0200 Subject: [PATCH] Fix to theoretical end-to-end distance calculation for 3D chains. --- CHANGELOG.md | 6 ++++++ PolymerCpp.nix | 2 +- PolymerCpp/helpers.py | 4 ++-- docs/conf.py | 4 ++-- setup.py | 4 ++-- shell.nix | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d0ad8a..5ccc6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## [v0.1.3] +### Fixed +- Fixed a bug in calculating the theoretical end-to-end distance of 3D + wormlike chains. + ## [v0.1.2] ### Fixed - Fixed a typo in the MANIFEST.in file that caused the header files @@ -37,6 +42,7 @@ All notable changes to this project will be documented in this file. - Fixed off-by-one error in the wormlike chain generation code. - Errors in computation of chain statistics +[v0.1.3]: https://github.com/kmdouglass/PolymerCpp/compare/v0.1.2...v0.1.3 [v0.1.2]: https://github.com/kmdouglass/PolymerCpp/compare/v0.1.1...v0.1.2 [v0.1.1]: https://github.com/kmdouglass/PolymerCpp/compare/v0.1.0...v0.1.1 [v0.1.0]: https://github.com/kmdouglass/PolymerCpp/compare/v0.0.1...v0.1.0 diff --git a/PolymerCpp.nix b/PolymerCpp.nix index 82efaf5..080461c 100644 --- a/PolymerCpp.nix +++ b/PolymerCpp.nix @@ -2,7 +2,7 @@ with import {}; pkgs.python35Packages.buildPythonPackage rec { name = "PolymerCpp-${version}"; - version = "0.1.2"; + version = "0.1.3"; src = ./.; diff --git a/PolymerCpp/helpers.py b/PolymerCpp/helpers.py index 70d8734..7e03625 100644 --- a/PolymerCpp/helpers.py +++ b/PolymerCpp/helpers.py @@ -242,13 +242,13 @@ def theory_R_WLC(contour_length, persistence_length, dim=3): if dim == 2: term1 = 4 * persistence_length * contour_length term2 = 2 * persistence_length / contour_length + term3 = 1 - np.exp(-contour_length / 2 / persistence_length) elif dim == 3: term1 = 2 * persistence_length * contour_length term2 = persistence_length / contour_length + term3 = 1 - np.exp(-contour_length / persistence_length) else: raise ValueError('dim must be either 2 or 3. {} was supplied'.format(dim)) - - term3 = 1 - np.exp(-contour_length / 2 / persistence_length) R = np.sqrt(term1 * (1 - term2 * term3)) diff --git a/docs/conf.py b/docs/conf.py index 2e43405..316c795 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -74,9 +74,9 @@ def __getattr__(cls, name): # built documents. # # The short X.Y version. -version = '0.1.2' +version = '0.1.3' # The full version, including alpha/beta/rc tags. -release = '0.1.2' +release = '0.1.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index ad1cd70..bbb5b82 100644 --- a/setup.py +++ b/setup.py @@ -21,12 +21,12 @@ extra_compile_args = ['-std=c++11','-O2', '-fPIC']) config={'name': 'PolymerCpp', - 'version': '0.1.2', + 'version': '0.1.3', 'description': '2D and 3D wormlike chain generator for Python and written in C++', 'author': 'Kyle M. Douglass, Marcel Stefko', 'author_email': 'kyle.m.douglass@gmail.com', 'url': 'https://github.com/kmdouglass/PolymerCpp', - 'download_url': 'https://github.com/kmdouglass/PolymerCpp/archive/v0.1.2.tar.gz', + 'download_url': 'https://github.com/kmdouglass/PolymerCpp/archive/v0.1.3.tar.gz', 'keywords': ['polymer', 'wormlike chain', 'random walk'], 'classifiers': ['Topic :: Scientific/Engineering :: Physics', 'Programming Language :: Python :: 3', diff --git a/shell.nix b/shell.nix index 431a2df..f7f4950 100644 --- a/shell.nix +++ b/shell.nix @@ -4,7 +4,7 @@ with import {}; PolymerCpp = pkgs.python35Packages.buildPythonPackage rec { name = "PolymerCpp-${version}"; - version = "0.1.2"; + version = "0.1.3"; src = ./.;