Skip to content

Commit

Permalink
Add more equipartition regressions (#124)
Browse files Browse the repository at this point in the history
Add regressions for the random divisions and the predefined molecule
groups in the equipartition checks.

Refs #59
  • Loading branch information
ptmerz committed Apr 23, 2021
1 parent 5651811 commit e6d54c6
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 4 deletions.
34 changes: 32 additions & 2 deletions physical_validation/tests/test_kinetic_energy_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ def run_kinetic_energy_equipartition_check(

result = {}
print("\n## Validating kinetic energy equipartition (strict)")
result["strict"] = pv.kinetic_energy.equipartition(
# Run once calculating only the rotational, translational and internal
# degrees of freedom for the entire system, and plotting the results
pv.kinetic_energy.equipartition(
simulation_data,
strict=True,
molec_groups=None,
Expand All @@ -122,8 +124,23 @@ def run_kinetic_energy_equipartition_check(
bootstrap_seed=7,
data_is_uncorrelated=True,
)
# Run again including molec_groups and random divisions, but no plots
# to speed up execution
result["strict"] = pv.kinetic_energy.equipartition(
simulation_data,
strict=True,
molec_groups=[[0], []],
random_divisions=1,
random_groups=2,
random_division_seed=14,
verbosity=2,
bootstrap_seed=7,
data_is_uncorrelated=True,
)
print("\n## Validating kinetic energy equipartition (non-strict)")
result["non-strict"] = pv.kinetic_energy.equipartition(
# Run once calculating only the rotational, translational and internal
# degrees of freedom for the entire system, and plotting the results
pv.kinetic_energy.equipartition(
simulation_data,
strict=False,
molec_groups=None,
Expand All @@ -134,6 +151,19 @@ def run_kinetic_energy_equipartition_check(
bootstrap_seed=7,
data_is_uncorrelated=True,
)
# Run again including molec_groups and random divisions, but no plots
# to speed up execution
result["non-strict"] = pv.kinetic_energy.equipartition(
simulation_data,
strict=False,
molec_groups=[[0], []],
random_divisions=1,
random_groups=2,
random_division_seed=19,
verbosity=2,
bootstrap_seed=7,
data_is_uncorrelated=True,
)

# Regression fixture can only check dicts of strings
# Use 6 digits to keep reproducibility reasonable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,90 @@ p = 0.865841
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.824824
Equipartition: Testing group-wise kinetic energies (strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.746394
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.688716
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.644841
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.865841
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.824824
Testing randomly divided group 0
Equipartition: Testing group-wise kinetic energies (strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.96101
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.082419
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.387798
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.785126
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.772364
Testing randomly divided group 1
Equipartition: Testing group-wise kinetic energies (strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.810328
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.159323
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.913282
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.655927
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.703896
Testing predifined divided group 0
Equipartition: Testing group-wise kinetic energies (strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.810328
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.159323
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.913282
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.655927
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.703896
Testing predifined divided group 1
Equipartition: Testing group-wise kinetic energies (strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.96101
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.082419
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.387798
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.785126
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
p = 0.772364

## Validating kinetic energy equipartition (non-strict)
Equipartition: Testing group-wise kinetic energies (non-strict)
Expand All @@ -42,3 +126,112 @@ T(sigma) = 303.22 +- 16.23 K
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 297.35 +- 4.72 K
T(sigma) = 293.71 +- 12.57 K
Equipartition: Testing group-wise kinetic energies (non-strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 298.20 +- 4.15 K
T(sigma) = 308.64 +- 13.18 K
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 302.58 +- 10.89 K
T(sigma) = 306.93 +- 14.92 K
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 297.48 +- 4.36 K
T(sigma) = 299.80 +- 12.87 K
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 298.10 +- 10.32 K
T(sigma) = 303.22 +- 16.23 K
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 297.35 +- 4.72 K
T(sigma) = 293.71 +- 12.57 K
Testing randomly divided group 0
Equipartition: Testing group-wise kinetic energies (non-strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 297.17 +- 5.94 K
T(sigma) = 296.33 +- 15.00 K
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 307.15 +- 15.39 K
T(sigma) = 293.07 +- 20.47 K
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 295.51 +- 6.51 K
T(sigma) = 300.44 +- 11.96 K
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 302.47 +- 14.23 K
T(sigma) = 297.86 +- 16.74 K
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 294.11 +- 7.06 K
T(sigma) = 288.10 +- 11.78 K
Testing randomly divided group 1
Equipartition: Testing group-wise kinetic energies (non-strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 299.24 +- 5.56 K
T(sigma) = 306.73 +- 14.17 K
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 298.01 +- 15.93 K
T(sigma) = 320.28 +- 20.67 K
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 299.45 +- 6.11 K
T(sigma) = 302.41 +- 12.31 K
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 293.73 +- 14.18 K
T(sigma) = 286.74 +- 17.58 K
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 300.59 +- 6.64 K
T(sigma) = 307.24 +- 12.32 K
Testing predifined divided group 0
Equipartition: Testing group-wise kinetic energies (non-strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 299.24 +- 5.56 K
T(sigma) = 306.73 +- 14.17 K
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 298.01 +- 15.93 K
T(sigma) = 320.28 +- 20.67 K
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 299.45 +- 6.11 K
T(sigma) = 302.41 +- 12.31 K
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 293.73 +- 14.18 K
T(sigma) = 286.74 +- 17.58 K
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 300.59 +- 6.64 K
T(sigma) = 307.24 +- 12.32 K
Testing predifined divided group 1
Equipartition: Testing group-wise kinetic energies (non-strict)
* tot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 297.17 +- 5.94 K
T(sigma) = 296.33 +- 15.00 K
* tra:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 307.15 +- 15.39 K
T(sigma) = 293.07 +- 20.47 K
* rni:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 295.51 +- 6.51 K
T(sigma) = 300.44 +- 11.96 K
* rot:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 302.47 +- 14.23 K
T(sigma) = 297.86 +- 16.74 K
* int:
Equilibration, decorrelation and tail pruning was skipped on user request. Note that if the provided trajectory is statistically correlated, the results of the physical validation checks might be invalid.
T(mu) = 294.11 +- 7.06 K
T(sigma) = 288.10 +- 11.78 K
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
non-strict: '[(0.013067,0.796377),(0.406843,0.588891),(0.154599,0.128358),(0.004732,0.312300),(0.169101,0.353289)]'
strict: '[0.746394,0.688716,0.644841,0.865841,0.824824]'
non-strict: '[(0.013067,0.796377),(0.406843,0.588891),(0.154599,0.128358),(0.004732,0.312300),(0.169101,0.353289),(0.165436,0.121112),(0.584908,0.247993),(0.405995,0.191838),(0.303447,0.017071),(0.571374,0.852889),(0.196023,0.605645),(0.008894,1.070967),(0.212210,0.346322),(0.311499,0.649264),(0.366991,0.737305),(0.196023,0.605645),(0.008894,1.070967),(0.212210,0.346322),(0.311499,0.649264),(0.366991,0.737305),(0.165436,0.121112),(0.584908,0.247993),(0.405995,0.191838),(0.303447,0.017071),(0.571374,0.852889)]'
strict: '[0.746394,0.688716,0.644841,0.865841,0.824824,0.961010,0.082419,0.387798,0.785126,0.772364,0.810328,0.159323,0.913282,0.655927,0.703896,0.810328,0.159323,0.913282,0.655927,0.703896,0.961010,0.082419,0.387798,0.785126,0.772364]'

0 comments on commit e6d54c6

Please sign in to comment.