Skip to content

Commit

Permalink
Merge pull request #177 from sandialabs/efjc-isometric-legendre
Browse files Browse the repository at this point in the history
EFJC isometric legendre
  • Loading branch information
mrbuche authored Apr 20, 2023
2 parents c1d29b8 + f716140 commit 81f62b1
Show file tree
Hide file tree
Showing 89 changed files with 17,128 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polymers"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
description = "Polymers Modeling Library"
license = "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ RUN pip install --no-cache-dir maturin && \
pip install --no-cache-dir target/wheels/*.whl
COPY --from=julia /usr/local/julia/ /opt/julia/
ENV PATH "${PATH}:/opt/julia/bin"
RUN julia -e 'using Pkg; Pkg.develop(path="."); Pkg.build("Polymers"); Pkg.test("Polymers")'
RUN julia -e 'using Pkg; Pkg.develop(path="."); Pkg.build("Polymers")'
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Polymers"
uuid = "8aef037c-a721-4e8a-9d81-eb7093daef2c"
authors = ["mrbuche <mrbuche@sandia.gov>"]
version = "0.3.1"
version = "0.3.2"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
2 changes: 2 additions & 0 deletions docs/source/physics/single_chain/efjc/thermodynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ EFJC model thermodynamics
.. toctree::
:maxdepth: 1

Isometric <thermodynamics/isometric>
Isotensional <thermodynamics/isotensional>

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)
Expand All @@ -12,4 +13,5 @@ EFJC model thermodynamics
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. autoattribute:: isometric
.. autoattribute:: isotensional
17 changes: 17 additions & 0 deletions docs/source/physics/single_chain/efjc/thermodynamics/isometric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
EFJC model thermodynamics (isometric)
=====================================

.. toctree::
:maxdepth: 1

Asymptotic <isometric/asymptotic>
Legendre <isometric/legendre>

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. autoattribute:: asymptotic
.. autoattribute:: legendre
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
EFJC model thermodynamics (isometric/asymptotic)
================================================

.. toctree::
:maxdepth: 1

Alternative <asymptotic/alternative>
Reduced <asymptotic/reduced>
Legendre <asymptotic/legendre>

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.asymptotic::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. autoattribute:: alternative
.. autoattribute:: reduced
.. autoattribute:: legendre
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
EFJC model thermodynamics (isometric/asymptotic/alternative)
============================================================

.. toctree::
:maxdepth: 1

Legendre <alternative/legendre>

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.asymptotic.alternative::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. autoattribute:: legendre
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
EFJC model thermodynamics (isometric/asymptotic/alternative/legendre)
=====================================================================

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.asymptotic.alternative.legendre::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. automethod:: force(end_to_end_length, temperature)
.. automethod:: nondimensional_force(nondimensional_end_to_end_length_per_link)
.. automethod:: helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: nondimensional_helmholtz_free_energy(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_relative_helmholtz_free_energy(nondimensional_end_to_end_length_per_link)
.. automethod:: nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
EFJC model thermodynamics (isometric/asymptotic/legendre)
=========================================================

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.asymptotic.legendre::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. automethod:: force(end_to_end_length, temperature)
.. automethod:: nondimensional_force(nondimensional_end_to_end_length_per_link)
.. automethod:: helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: nondimensional_helmholtz_free_energy(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_relative_helmholtz_free_energy(nondimensional_end_to_end_length_per_link)
.. automethod:: nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
EFJC model thermodynamics (isometric/asymptotic/reduced)
========================================================

.. toctree::
:maxdepth: 1

Legendre <reduced/legendre>

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.asymptotic.reduced::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. autoattribute:: legendre
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
EFJC model thermodynamics (isometric/asymptotic/reduced/legendre)
=================================================================

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.asymptotic.reduced.legendre::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. automethod:: force(end_to_end_length, temperature)
.. automethod:: nondimensional_force(nondimensional_end_to_end_length_per_link)
.. automethod:: helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: nondimensional_helmholtz_free_energy(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_relative_helmholtz_free_energy(nondimensional_end_to_end_length_per_link)
.. automethod:: nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
EFJC model thermodynamics (isometric/legendre)
==============================================

.. autoclass:: polymers.physics.single_chain.efjc.thermodynamics.isometric.legendre::EFJC(number_of_links, link_length, hinge_mass, link_stiffness)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: link_stiffness
.. automethod:: force(end_to_end_length, temperature)
.. automethod:: nondimensional_force(nondimensional_end_to_end_length_per_link)
.. automethod:: helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: nondimensional_helmholtz_free_energy(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_relative_helmholtz_free_energy(nondimensional_end_to_end_length_per_link)
.. automethod:: nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link)
2 changes: 2 additions & 0 deletions docs/source/physics/single_chain/swfjc/thermodynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SWFJC model thermodynamics
.. toctree::
:maxdepth: 1

Isometric <thermodynamics/isometric>
Isotensional <thermodynamics/isotensional>

.. autoclass:: polymers.physics.single_chain.swfjc.thermodynamics::SWFJC(number_of_links, link_length, hinge_mass, well_width)
Expand All @@ -12,4 +13,5 @@ SWFJC model thermodynamics
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: well_width
.. autoattribute:: isometric
.. autoattribute:: isotensional
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SWFJC model thermodynamics (isometric)
======================================

.. toctree::
:maxdepth: 1

Legendre <isometric/legendre>

.. autoclass:: polymers.physics.single_chain.swfjc.thermodynamics.isometric::SWFJC(number_of_links, link_length, hinge_mass, well_width)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: well_width
.. autoattribute:: legendre
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
SWFJC model thermodynamics (isometric/legendre)
===============================================

.. autoclass:: polymers.physics.single_chain.swfjc.thermodynamics.isometric.legendre::SWFJC(number_of_links, link_length, hinge_mass, well_width)

.. autoattribute:: number_of_links
.. autoattribute:: link_length
.. autoattribute:: hinge_mass
.. autoattribute:: well_width
.. automethod:: force(end_to_end_length, temperature)
.. automethod:: nondimensional_force(nondimensional_end_to_end_length_per_link)
.. automethod:: helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy(end_to_end_length, temperature)
.. automethod:: relative_helmholtz_free_energy_per_link(end_to_end_length, temperature)
.. automethod:: nondimensional_helmholtz_free_energy(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link, temperature)
.. automethod:: nondimensional_relative_helmholtz_free_energy(nondimensional_end_to_end_length_per_link)
.. automethod:: nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_end_to_end_length_per_link)
.. automethod:: equilibrium_distribution(end_to_end_length)
.. automethod:: nondimensional_equilibrium_distribution(nondimensional_end_to_end_length_per_link)
.. automethod:: equilibrium_radial_distribution(end_to_end_length)
.. automethod:: nondimensional_equilibrium_radial_distribution(nondimensional_end_to_end_length_per_link)
1 change: 1 addition & 0 deletions docs/src/physics/single_chain/efjc/thermodynamics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# EFJC model thermodynamics

* [EFJC model thermodynamics (isometric)](../../../isometric)
* [EFJC model thermodynamics (isotensional)](../../../isotensional)

```@autodocs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# EFJC model thermodynamics (isometric)

* [EFJC model thermodynamics (isometric/asymptotic)](../../../../asymptotic)
* [EFJC model thermodynamics (isometric/legendre)](../../../../legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# EFJC model thermodynamics (isometric/asymptotic)

* [EFJC model thermodynamics (isometric/asymptotic/alternative)](../../../../../alternative)
* [EFJC model thermodynamics (isometric/asymptotic/reduced)](../../../../../reduced)
* [EFJC model thermodynamics (isometric/asymptotic/legendre)](../../../../../legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Asymptotic]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# EFJC model thermodynamics (isometric/asymptotic/alternative)

* [EFJC model thermodynamics (isometric/asymptotic/alternative/legendre)](../../../../../../legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Asymptotic.Alternative]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# EFJC model thermodynamics (isometric/asymptotic/alternative/legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Asymptotic.Alternative.Legendre]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# EFJC model thermodynamics (isometric/asymptotic/legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Asymptotic.Legendre]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# EFJC model thermodynamics (isometric/asymptotic/reduced)

* [EFJC model thermodynamics (isometric/asymptotic/reduced/legendre)](../../../../../../legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Asymptotic.Reduced]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# EFJC model thermodynamics (isometric/asymptotic/reduced/legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Asymptotic.Reduced.Legendre]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# EFJC model thermodynamics (isometric/legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics.Isometric.Legendre]
```
1 change: 1 addition & 0 deletions docs/src/physics/single_chain/swfjc/thermodynamics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SWFJC model thermodynamics

* [SWFJC model thermodynamics (isometric)](../../../isometric)
* [SWFJC model thermodynamics (isotensional)](../../../isotensional)

```@autodocs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SWFJC model thermodynamics (isometric)

* [SWFJC model thermodynamics (isometric/legendre)](../../../../legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Swfjc.Thermodynamics.Isometric]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SWFJC model thermodynamics (isometric/legendre)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Swfjc.Thermodynamics.Isometric.Legendre]
```
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_force(number_of_links: u8, link_length: f64, link_stiffness: f64, end_to_end_length: f64, temperature: f64) -> f64
{
super::force(&number_of_links, &link_length, &link_stiffness, &end_to_end_length, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_nondimensional_force(nondimensional_link_stiffness: f64, nondimensional_end_to_end_length_per_link: f64) -> f64
{
super::nondimensional_force(&nondimensional_link_stiffness, &nondimensional_end_to_end_length_per_link)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_helmholtz_free_energy(number_of_links: u8, link_length: f64, hinge_mass: f64, link_stiffness: f64, end_to_end_length: f64, temperature: f64) -> f64
{
super::helmholtz_free_energy(&number_of_links, &link_length, &hinge_mass, &link_stiffness, &end_to_end_length, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_helmholtz_free_energy_per_link(number_of_links: u8, link_length: f64, hinge_mass: f64, link_stiffness: f64, end_to_end_length: f64, temperature: f64) -> f64
{
super::helmholtz_free_energy_per_link(&number_of_links, &link_length, &hinge_mass, &link_stiffness, &end_to_end_length, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_relative_helmholtz_free_energy(number_of_links: u8, link_length: f64, link_stiffness: f64, end_to_end_length: f64, temperature: f64) -> f64
{
super::relative_helmholtz_free_energy(&number_of_links, &link_length, &link_stiffness, &end_to_end_length, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_relative_helmholtz_free_energy_per_link(number_of_links: u8, link_length: f64, link_stiffness: f64, end_to_end_length: f64, temperature: f64) -> f64
{
super::relative_helmholtz_free_energy_per_link(&number_of_links, &link_length, &link_stiffness, &end_to_end_length, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_nondimensional_helmholtz_free_energy(number_of_links: u8, link_length: f64, hinge_mass: f64, nondimensional_link_stiffness: f64, nondimensional_end_to_end_length_per_link: f64, temperature: f64) -> f64
{
super::nondimensional_helmholtz_free_energy(&number_of_links, &link_length, &hinge_mass, &nondimensional_link_stiffness, &nondimensional_end_to_end_length_per_link, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_nondimensional_helmholtz_free_energy_per_link(number_of_links: u8, link_length: f64, hinge_mass: f64, nondimensional_link_stiffness: f64, nondimensional_end_to_end_length_per_link: f64, temperature: f64) -> f64
{
super::nondimensional_helmholtz_free_energy_per_link(&number_of_links, &link_length, &hinge_mass, &nondimensional_link_stiffness, &nondimensional_end_to_end_length_per_link, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_nondimensional_relative_helmholtz_free_energy(number_of_links: u8, nondimensional_link_stiffness: f64, nondimensional_end_to_end_length_per_link: f64) -> f64
{
super::nondimensional_relative_helmholtz_free_energy(&number_of_links, &nondimensional_link_stiffness, &nondimensional_end_to_end_length_per_link)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isometric_asymptotic_alternative_legendre_nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_link_stiffness: f64, nondimensional_end_to_end_length_per_link: f64) -> f64
{
super::nondimensional_relative_helmholtz_free_energy_per_link(&nondimensional_link_stiffness, &nondimensional_end_to_end_length_per_link)
}
Loading

2 comments on commit 81f62b1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/82020

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.2 -m "<description of version>" 81f62b158456bc645adadec177a04251508053bb
git push origin v0.3.2

Please sign in to comment.