Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stefan Kesselheim
jax-md
Commits
2c5c4ab1
Unverified
Commit
2c5c4ab1
authored
Feb 21, 2020
by
sschoenholz
Committed by
GitHub
Feb 21, 2020
Browse files
Merge pull request #62 from google/radial_distribution
Added utility to compute bulk modulus.
parents
31615a0d
873d1338
Changes
1
Hide whitespace changes
Inline
Side-by-side
jax_md/quantity.py
View file @
2c5c4ab1
...
...
@@ -138,3 +138,7 @@ def pair_correlation(displacement_or_metric, rs, sigma):
def
box_size_at_number_density
(
particle_count
,
number_density
,
spatial_dimension
):
return
np
.
power
(
particle_count
/
number_density
,
1
/
spatial_dimension
)
def
bulk_modulus
(
elastic_tensor
):
return
np
.
einsum
(
'iijj->'
,
elastic_tensor
)
/
elastic_tensor
.
shape
[
0
]
**
2
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment