Skip to content

Commit e786f99

Browse files
authored
Merge pull request #161 from sandialabs/dev
julia mods done, tests next
2 parents ae833cb + 7db1ac2 commit e786f99

File tree

19 files changed

+2654
-335
lines changed

19 files changed

+2654
-335
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![website](https://img.shields.io/badge/GitHub-website-6e5494?logo=github)](https://sandialabs.github.io/Polymers)
44
[![examples](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/binder.svg)](https://mybinder.org/v2/gh/sandialabs/Polymers/main)
5-
[![chat](https://img.shields.io/badge/Discord-chat-%237289da.svg?logo=discord&color=5865F2&logoColor=FFFFFF)](https://discord.gg/9gy8tTktD5)
65

76
The library is implemented entirely in Rust, including the Python API. The Julia API calls the Rust library.
87

@@ -32,7 +31,7 @@ pip install target/wheels/*.whl
3231

3332
[![docs (stable)](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/julia-docs-stable.svg)](https://sandialabs.github.io/Polymers/julia/docs/stable)
3433
[![docs (latest)](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/julia-docs-latest.svg)](https://sandialabs.github.io/Polymers/julia/docs/latest)
35-
[![Pkg](https://img.shields.io/github/v/release/sandialabs/Polymers?color=cb3c33&label=Pkg&logo=Julia&logoColor=cb3c33)](https://juliapackages.com/p/polymers)
34+
[![Pkg](https://img.shields.io/github/v/release/sandialabs/Polymers?color=cb3c33&label=Pkg&logo=Julia&logoColor=cb3c33)](#)
3635

3736
The library can be installed as a Julia package:
3837

docs/source/_templates/breadcrumbs.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
<a style="text-decoration: none; padding: 0" href="https://mybinder.org/v2/gh/sandialabs/Polymers/main">
88
<iconify-icon icon="file-icons:binder" height="1.6em"></iconify-icon>
99
</a>
10-
<a style="text-decoration: none; padding: 0" href="https://discord.gg/9gy8tTktD5">
11-
<iconify-icon icon="fa-brands:discord" height="1.6em"></iconify-icon>
12-
</a>
1310
</li>
1411
{% endblock %}

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![docs (stable)](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/julia-docs-stable.svg)](https://sandialabs.github.io/Polymers/julia/docs/stable)
44
[![docs (latest)](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/julia-docs-latest.svg)](https://sandialabs.github.io/Polymers/julia/docs/latest)
5-
[![Pkg](https://img.shields.io/github/v/release/sandialabs/Polymers?color=cb3c33&label=Pkg&logo=Julia&logoColor=cb3c33)](https://juliapackages.com/p/polymers)
5+
[![Pkg](https://img.shields.io/github/v/release/sandialabs/Polymers?color=cb3c33&label=Pkg&logo=Julia&logoColor=cb3c33)](#)
66

77
This is the documentation for Julia API, which calls the Rust library.
88

pages/_includes/header_custom.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66
<a style="text-decoration: none" href="https://mybinder.org/v2/gh/sandialabs/Polymers/main">
77
<iconify-icon icon="file-icons:binder" height="2em"></iconify-icon>
88
</a>
9-
<a style="text-decoration: none" href="https://discord.gg/9gy8tTktD5">
10-
<iconify-icon icon="fa-brands:discord" height="2em"></iconify-icon>
11-
</a>
129
&nbsp;
1310
</span>

src/physics/single_chain/efjc/thermodynamics/isotensional/asymptotic/alternative/legendre/mod.jl

Lines changed: 74 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,20 @@ function relative_helmholtz_free_energy(
129129
temperature::Union{Float64,Vector,Matrix,Array},
130130
)::Union{Float64,Vector,Matrix,Array}
131131
return broadcast(
132-
(number_of_links_i, link_length_i, link_stiffness_i, force_i, temperature_i) -> ccall(
133-
(
134-
:physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_relative_helmholtz_free_energy,
135-
string(PROJECT_ROOT, "target/debug/libpolymers"),
132+
(number_of_links_i, link_length_i, link_stiffness_i, force_i, temperature_i) ->
133+
ccall(
134+
(
135+
:physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_relative_helmholtz_free_energy,
136+
string(PROJECT_ROOT, "target/debug/libpolymers"),
137+
),
138+
Float64,
139+
(UInt8, Float64, Float64, Float64, Float64),
140+
number_of_links_i,
141+
link_length_i,
142+
link_stiffness_i,
143+
force_i,
144+
temperature_i,
136145
),
137-
Float64,
138-
(UInt8, Float64, Float64, Float64, Float64),
139-
number_of_links_i,
140-
link_length_i,
141-
link_stiffness_i,
142-
force_i,
143-
temperature_i,
144-
),
145146
number_of_links,
146147
link_length,
147148
link_stiffness,
@@ -280,17 +281,18 @@ function nondimensional_relative_helmholtz_free_energy(
280281
nondimensional_force::Union{Float64,Vector,Matrix,Array},
281282
)::Union{Float64,Vector,Matrix,Array}
282283
return broadcast(
283-
(number_of_links_i, nondimensional_link_stiffness_i, nondimensional_force_i) -> ccall(
284-
(
285-
:physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_nondimensional_relative_helmholtz_free_energy,
286-
string(PROJECT_ROOT, "target/debug/libpolymers"),
284+
(number_of_links_i, nondimensional_link_stiffness_i, nondimensional_force_i) ->
285+
ccall(
286+
(
287+
:physics_single_chain_efjc_thermodynamics_isotensional_asymptotic_alternative_legendre_nondimensional_relative_helmholtz_free_energy,
288+
string(PROJECT_ROOT, "target/debug/libpolymers"),
289+
),
290+
Float64,
291+
(UInt8, Float64, Float64),
292+
number_of_links_i,
293+
nondimensional_link_stiffness_i,
294+
nondimensional_force_i,
287295
),
288-
Float64,
289-
(UInt8, Float64, Float64),
290-
number_of_links_i,
291-
nondimensional_link_stiffness_i,
292-
nondimensional_force_i,
293-
),
294296
number_of_links,
295297
link_length,
296298
nondimensional_link_stiffness,
@@ -335,65 +337,65 @@ function EFJC(
335337
hinge_mass::Float64,
336338
link_stiffness::Float64,
337339
)
338-
return EFJC(
339-
number_of_links,
340-
link_length,
341-
hinge_mass,
342-
link_stiffness,
343-
(force, temperature) -> helmholtz_free_energy(
340+
return EFJC(
344341
number_of_links,
345342
link_length,
346343
hinge_mass,
347344
link_stiffness,
348-
force,
349-
temperature,
350-
),
351-
(force, temperature) -> helmholtz_free_energy_per_link(
352-
link_length,
353-
link_stiffness,
354-
hinge_mass,
355-
force,
356-
temperature,
357-
),
358-
(force, temperature) -> relative_helmholtz_free_energy(
359-
number_of_links,
360-
link_length,
361-
link_stiffness,
362-
force,
363-
temperature,
364-
),
365-
(force, temperature) -> relative_helmholtz_free_energy_per_link(
366-
link_length,
367-
link_stiffness,
368-
force,
369-
temperature,
370-
),
371-
(nondimensional_force, temperature) -> nondimensional_helmholtz_free_energy(
372-
number_of_links,
373-
link_length,
374-
hinge_mass,
375-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
376-
nondimensional_force,
377-
temperature,
378-
),
379-
(nondimensional_force, temperature) ->
380-
nondimensional_helmholtz_free_energy_per_link(
345+
(force, temperature) -> helmholtz_free_energy(
346+
number_of_links,
347+
link_length,
348+
hinge_mass,
349+
link_stiffness,
350+
force,
351+
temperature,
352+
),
353+
(force, temperature) -> helmholtz_free_energy_per_link(
354+
link_length,
355+
link_stiffness,
356+
hinge_mass,
357+
force,
358+
temperature,
359+
),
360+
(force, temperature) -> relative_helmholtz_free_energy(
361+
number_of_links,
362+
link_length,
363+
link_stiffness,
364+
force,
365+
temperature,
366+
),
367+
(force, temperature) -> relative_helmholtz_free_energy_per_link(
368+
link_length,
369+
link_stiffness,
370+
force,
371+
temperature,
372+
),
373+
(nondimensional_force, temperature) -> nondimensional_helmholtz_free_energy(
374+
number_of_links,
381375
link_length,
382376
hinge_mass,
383-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
377+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
384378
nondimensional_force,
385379
temperature,
386380
),
387-
nondimensional_force -> nondimensional_relative_helmholtz_free_energy(
388-
number_of_links,
389-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
390-
nondimensional_force,
391-
),
392-
nondimensional_force -> nondimensional_relative_helmholtz_free_energy_per_link(
393-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
394-
nondimensional_force,
395-
),
396-
)
381+
(nondimensional_force, temperature) ->
382+
nondimensional_helmholtz_free_energy_per_link(
383+
link_length,
384+
hinge_mass,
385+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
386+
nondimensional_force,
387+
temperature,
388+
),
389+
nondimensional_force -> nondimensional_relative_helmholtz_free_energy(
390+
number_of_links,
391+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
392+
nondimensional_force,
393+
),
394+
nondimensional_force -> nondimensional_relative_helmholtz_free_energy_per_link(
395+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
396+
nondimensional_force,
397+
),
398+
)
397399
end
398400

399401
end

src/physics/single_chain/efjc/thermodynamics/isotensional/asymptotic/alternative/mod.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,11 @@ function EFJC(
548548
end_to_end_length_per_link(link_length, link_stiffness, force, temperature),
549549
nondimensional_force -> nondimensional_end_to_end_length(
550550
number_of_links,
551-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
551+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
552552
nondimensional_force,
553553
),
554554
nondimensional_force -> nondimensional_end_to_end_length_per_link(
555-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
555+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
556556
nondimensional_force,
557557
),
558558
(force, temperature) -> gibbs_free_energy(
@@ -587,24 +587,24 @@ function EFJC(
587587
number_of_links,
588588
link_length,
589589
hinge_mass,
590-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
590+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
591591
nondimensional_force,
592592
temperature,
593593
),
594594
(nondimensional_force, temperature) -> nondimensional_gibbs_free_energy_per_link(
595595
link_length,
596596
hinge_mass,
597-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
597+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
598598
nondimensional_force,
599599
temperature,
600600
),
601601
nondimensional_force -> nondimensional_relative_gibbs_free_energy(
602602
number_of_links,
603-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
603+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
604604
nondimensional_force,
605605
),
606606
nondimensional_force -> nondimensional_relative_gibbs_free_energy_per_link(
607-
link_stiffness*link_length^2/BOLTZMANN_CONSTANT/temperature,
607+
link_stiffness * link_length^2 / BOLTZMANN_CONSTANT / temperature,
608608
nondimensional_force,
609609
),
610610
)

0 commit comments

Comments
 (0)