Skip to content

Commit

Permalink
Fix to theoretical end-to-end distance calculation for 3D chains.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdouglass committed Jun 28, 2017
1 parent 3b5fe36 commit 080610a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion PolymerCpp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ with import <nixpkgs> {};

pkgs.python35Packages.buildPythonPackage rec {
name = "PolymerCpp-${version}";
version = "0.1.2";
version = "0.1.3";

src = ./.;

Expand Down
4 changes: 2 additions & 2 deletions PolymerCpp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': '[email protected]',
'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',
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ with import <nixpkgs> {};

PolymerCpp = pkgs.python35Packages.buildPythonPackage rec {
name = "PolymerCpp-${version}";
version = "0.1.2";
version = "0.1.3";

src = ./.;

Expand Down

0 comments on commit 080610a

Please sign in to comment.