Skip to content

Commit

Permalink
Merge pull request #162 from sandialabs/dev
Browse files Browse the repository at this point in the history
julia tests and related bug fixes
  • Loading branch information
mrbuche authored Mar 1, 2023
2 parents e786f99 + 8d0e59b commit 4011c9b
Show file tree
Hide file tree
Showing 40 changed files with 8,147 additions and 139 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.1.1"
version = "0.1.2"
edition = "2021"
description = "Polymers Modeling Library"
license = "BSD-3-Clause"
Expand Down
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.1.1"
version = "0.1.2"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_a
super::relative_gibbs_free_energy(&number_of_links, &link_length, &link_stiffness, &force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_relative_gibbs_free_energy_per_link(link_length: f64, force: f64, link_stiffness: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_relative_gibbs_free_energy_per_link(link_length: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
{
super::relative_gibbs_free_energy_per_link(&link_length, &link_stiffness, &force, &temperature)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_helmholtz_free_energy(number_of_links: u8, link_length: f64, hinge_mass: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_helmholtz_free_energy(number_of_links: u8, link_length: f64, hinge_mass: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
{
super::helmholtz_free_energy(&number_of_links, &link_length, &hinge_mass, &link_stiffness, &force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_helmholtz_free_energy_per_link(link_length: f64, hinge_mass: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_helmholtz_free_energy_per_link(link_length: f64, hinge_mass: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
{
super::helmholtz_free_energy_per_link(&link_length, &hinge_mass, &link_stiffness, &force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_relative_helmholtz_free_energy(number_of_links: u8, link_length: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_relative_helmholtz_free_energy(number_of_links: u8, link_length: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
{
super::relative_helmholtz_free_energy(&number_of_links, &link_length, &link_stiffness, &force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_relative_helmholtz_free_energy_per_link(link_length: f64, force: f64, link_stiffness: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_relative_helmholtz_free_energy_per_link(link_length: f64, link_stiffness: f64, force: f64, temperature: f64) -> f64
{
super::relative_helmholtz_free_energy_per_link(&link_length, &link_stiffness, &force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_nondimensional_helmholtz_free_energy(number_of_links: u8, link_length: f64, hinge_mass: f64, nondimensional_link_stiffness: f64, nondimensional_force: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_nondimensional_helmholtz_free_energy(number_of_links: u8, link_length: f64, hinge_mass: f64, nondimensional_link_stiffness: f64, nondimensional_force: f64, temperature: f64) -> f64
{
super::nondimensional_helmholtz_free_energy(&number_of_links, &link_length, &hinge_mass, &nondimensional_link_stiffness, &nondimensional_force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_nondimensional_helmholtz_free_energy_per_link(link_length: f64, hinge_mass: f64, nondimensional_link_stiffness: f64, nondimensional_force: f64, temperature: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_nondimensional_helmholtz_free_energy_per_link(link_length: f64, hinge_mass: f64, nondimensional_link_stiffness: f64, nondimensional_force: f64, temperature: f64) -> f64
{
super::nondimensional_helmholtz_free_energy_per_link(&link_length, &hinge_mass, &nondimensional_link_stiffness, &nondimensional_force, &temperature)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_nondimensional_relative_helmholtz_free_energy(number_of_links: u8, nondimensional_link_stiffness: f64, nondimensional_force: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_nondimensional_relative_helmholtz_free_energy(number_of_links: u8, nondimensional_link_stiffness: f64, nondimensional_force: f64) -> f64
{
super::nondimensional_relative_helmholtz_free_energy(&number_of_links, &nondimensional_link_stiffness, &nondimensional_force)
}
#[no_mangle]
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_link_stiffness: f64, nondimensional_force: f64) -> f64
pub extern fn physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_nondimensional_relative_helmholtz_free_energy_per_link(nondimensional_link_stiffness: f64, nondimensional_force: f64) -> f64
{
super::nondimensional_relative_helmholtz_free_energy_per_link(&nondimensional_link_stiffness, &nondimensional_force)
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,38 @@ struct EFJC
The stiffness of each link in the chain ``k_0`` in units of J/(mol⋅nm^2).
"""
link_stiffness::Float64
"""
The Helmholtz free energy ``\\psi`` as a function of the applied force ``f`` and temperature ``T``.
"""
helmholtz_free_energy::Function
"""
The Helmholtz free energy per link ``\\psi/N_b`` as a function of the applied force ``f`` and temperature ``T``.
"""
helmholtz_free_energy_per_link::Function
"""
The relative helmholtz free energy ``\\Delta\\psi\\equiv\\psi(f,T)-\\psi(0,T)`` as a function of the applied force ``f`` and temperature ``T``.
"""
relative_helmholtz_free_energy::Function
"""
The relative helmholtz free energy per link ``\\Delta\\psi/N_b`` as a function of the applied force ``f`` and temperature ``T``.
"""
relative_helmholtz_free_energy_per_link::Function
"""
The nondimensional helmholtz free energy ``N_b\\vartheta=\\beta\\psi`` as a function of the applied nondimensional force ``\\eta`` and temperature ``T``.
"""
nondimensional_helmholtz_free_energy::Function
"""
The nondimensional helmholtz free energy per link ``\\vartheta\\equiv\\beta\\psi/N_b`` as a function of the applied nondimensional force ``\\eta`` and temperature ``T``.
"""
nondimensional_helmholtz_free_energy_per_link::Function
"""
The nondimensional relative helmholtz free energy ``N_b\\Delta\\vartheta=\\beta\\Delta\\psi`` as a function of the applied nondimensional force ``\\eta``.
"""
nondimensional_relative_helmholtz_free_energy::Function
"""
The nondimensional relative helmholtz free energy per link ``\\Delta\\vartheta\\equiv\\beta\\Delta\\psi/N_b`` as a function of the applied nondimensional force ``\\eta``.
"""
nondimensional_relative_helmholtz_free_energy_per_link::Function
end

"""
Expand Down Expand Up @@ -294,7 +326,6 @@ function nondimensional_relative_helmholtz_free_energy(
nondimensional_force_i,
),
number_of_links,
link_length,
nondimensional_link_stiffness,
nondimensional_force,
)
Expand Down Expand Up @@ -337,6 +368,7 @@ function EFJC(
hinge_mass::Float64,
link_stiffness::Float64,
)
BOLTZMANN_CONSTANT::Float64 = 8.314462618
return EFJC(
number_of_links,
link_length,
Expand All @@ -352,8 +384,8 @@ function EFJC(
),
(force, temperature) -> helmholtz_free_energy_per_link(
link_length,
link_stiffness,
hinge_mass,
link_stiffness,
force,
temperature,
),
Expand Down Expand Up @@ -386,15 +418,17 @@ function EFJC(
nondimensional_force,
temperature,
),
nondimensional_force -> nondimensional_relative_helmholtz_free_energy(
number_of_links,
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
nondimensional_force,
),
nondimensional_force -> nondimensional_relative_helmholtz_free_energy_per_link(
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
nondimensional_force,
),
(nondimensional_force, temperature) ->
nondimensional_relative_helmholtz_free_energy(
number_of_links,
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
nondimensional_force,
),
(nondimensional_force, temperature) ->
nondimensional_relative_helmholtz_free_energy_per_link(
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
nondimensional_force,
),
)
end

Expand Down
Loading

7 comments on commit 4011c9b

@mrbuche
Copy link
Collaborator Author

@mrbuche mrbuche commented on 4011c9b Mar 1, 2023

Choose a reason for hiding this comment

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

@JuliaRegistrator register branch=main

@mrbuche
Copy link
Collaborator Author

@mrbuche mrbuche commented on 4011c9b Mar 1, 2023

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/78772

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.1.2 -m "<description of version>" 4011c9ba0e70d090aa4a9c50677c3cb316363926
git push origin v0.1.2

Also, note the warning: Version 0.1.2 skips over 0.1.1
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

@mrbuche
Copy link
Collaborator Author

@mrbuche mrbuche commented on 4011c9b Mar 1, 2023

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 updated: JuliaRegistries/General/78772

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.1.2 -m "<description of version>" 4011c9ba0e70d090aa4a9c50677c3cb316363926
git push origin v0.1.2

Also, note the warning: Version 0.1.2 skips over 0.1.1
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

@mrbuche
Copy link
Collaborator Author

@mrbuche mrbuche commented on 4011c9b Mar 1, 2023

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 updated: JuliaRegistries/General/78772

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.1.2 -m "<description of version>" 4011c9ba0e70d090aa4a9c50677c3cb316363926
git push origin v0.1.2

Please sign in to comment.