-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from pkienzle/fix-use-iupac-abundance
Use IUPAC tables for atomic weight and isotopic abundance
- Loading branch information
Showing
16 changed files
with
873 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
include LICENSE.txt | ||
include doc | ||
include periodictable/xsf/* | ||
include periodictable/activation.dat | ||
graft doc | ||
prune doc/sphinx/_build | ||
prune doc/sphinx/build | ||
exclude build dist *.pyc | ||
prune */__pycache__ | ||
prune */*/__pycache__ | ||
prune */*/*/__pycache__ | ||
#recursive-exclude __pycache__ * | ||
#exclude build dist *.pyc __pycache__/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,15 +116,15 @@ A formula string is translated into a formula using | |
* Specific mass can be giving with count follwed by mass units: | ||
|
||
>>> print(formula("5g NaCl // 50mL H2O@1")) | ||
NaCl(H2O)32.4407 | ||
NaCl(H2O)32.4395 | ||
|
||
Density will be required for materials given by volume. Mass will be | ||
stored in the *total_mass* attribute of the resulting formula. | ||
|
||
* Multilayers can be specified by thickness: | ||
|
||
>>> print(formula("1 um Si // 5 nm Cr // 10 nm Au")) | ||
Si119.99CrAu1.41722 | ||
Si119.992CrAu1.41722 | ||
|
||
Density will be required for each layer. Thickness will be stored in | ||
the *total_thickness* attribute of the resulting formula. Thickness can | ||
|
@@ -135,7 +135,7 @@ A formula string is translated into a formula using | |
20:80 by volume with D2O: | ||
|
||
>>> print(formula("20vol% (10 wt% [email protected] // H2O@1) // D2O@1n")) | ||
NaCl(H2O)29.1966(D2O)122.794 | ||
NaCl(H2O)29.1956(D2O)122.79 | ||
|
||
* Empty formulas are supported, e.g., for air or vacuum: | ||
|
||
|
@@ -257,7 +257,7 @@ Note that this is different from a 2:1 mixture by weight: | |
|
||
>>> mix = mix_by_weight(H2O,2,D2O,1) | ||
>>> print(f"{mix} {mix.density:.4g}") | ||
(H2O)2.2234D2O 1.035 | ||
(H2O)2.22339D2O 1.035 | ||
|
||
Except in the simplest of cases, the density of the mixture cannot be | ||
computed from the densities of the components, and the resulting density | ||
|
@@ -273,8 +273,8 @@ compute molar mass and neutron/xray scattering length density: | |
>>> import periodictable | ||
>>> SiO2 = periodictable.formula('SiO2') | ||
>>> hydrated = SiO2 + periodictable.formula('3H2O') | ||
>>> print(f"{hydrated} mass {hydrated.mass}") | ||
SiO2(H2O)3 mass 114.13014 | ||
>>> print(f"{hydrated} mass {hydrated.mass:.3f}") | ||
SiO2(H2O)3 mass 114.128 | ||
>>> rho,mu,inc = periodictable.neutron_sld('SiO2+3H2O',density=1.5,wavelength=4.75) | ||
>>> print(f"{hydrated} neutron sld {rho:.3g}") | ||
SiO2(H2O)3 neutron sld 0.849 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.