Skip to content

Commit 25ea173

Browse files
committed
Print out median values for max and min
1 parent 591402b commit 25ea173

File tree

5 files changed

+93
-36
lines changed

5 files changed

+93
-36
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
,Program(Group),T / K,ρ / kg m−3,δρ / kg m−3,u / kJ mol−1,δu / kJ mol−1,statepoint,Relative_Error
2-
0,DL_POLY(BS),98.0,659.22,1.25,-16.759,0.061,temp: 98.0,0.0011377211445378135
2+
0,DL_POLY(BS),98.0,659.22,1.25,-16.759,0.061,temp: 98.0,-0.06552274178145884
33
1,DL_POLY(BS),173.0,590.63,1.91,-14.366,0.086,temp: 173.0,0.026344163920897275
44
2,DL_POLY(BS),248.0,523.63,2.48,-12.241,0.102,temp: 248.0,0.0375724383875568
55
3,DL_POLY(BS),298.0,478.16,3.03,-10.908,0.113,temp: 298.0,0.09396659999071405
6-
4,GROMACS(BS),98.0,659.22,0.05,-16.759,0.002,temp: 98.0,0.0011377211445378135
6+
4,GROMACS(BS),98.0,659.22,0.05,-16.759,0.002,temp: 98.0,-0.06552274178145884
77
5,GROMACS(BS),173.0,590.66,0.07,-14.365,0.002,temp: 173.0,0.03142482410564051
88
6,GROMACS(BS),248.0,523.73,0.11,-12.245,0.003,temp: 248.0,0.056677068076155676
99
7,GROMACS(BS),298.0,478.13,0.15,-10.908,0.004,temp: 298.0,0.08768665395172569
10-
8,GROMACS(KL),98.0,660.02,0.09,-16.787,0.003,temp: 98.0,0.12249464322959451
10+
8,GROMACS(KL),98.0,660.02,0.09,-16.787,0.003,temp: 98.0,0.05575328413791601
1111
9,GROMACS(KL),173.0,590.8,0.1,-14.371,0.003,temp: 173.0,0.05513457163446153
1212
10,GROMACS(KL),248.0,524.04,0.08,-12.256,0.003,temp: 248.0,0.1159014201107883
1313
11,GROMACS(KL),298.0,477.99,0.12,-10.905,0.003,temp: 298.0,0.05838023910314501
14-
12,LAMMPS(AA),98.0,659.17,0.85,-16.758,0.032,temp: 98.0,-0.006447086485789009
14+
12,LAMMPS(AA),98.0,659.17,0.85,-16.758,0.032,temp: 98.0,-0.07310249340143053
1515
13,LAMMPS(AA),173.0,590.47,1.17,-14.361,0.037,temp: 173.0,-0.0007526903977525743
1616
14,LAMMPS(AA),248.0,523.55,1.88,-12.241,0.053,temp: 248.0,0.02228873463667335
1717
15,LAMMPS(AA),298.0,477.87,6.77,-10.904,0.061,temp: 298.0,0.033260454947215315
18-
16,LAMMPS(KL),98.0,658.96,0.8,-16.758,0.03,temp: 98.0,-0.03830327853310648
18+
16,LAMMPS(KL),98.0,658.96,0.8,-16.758,0.03,temp: 98.0,-0.10493745020525652
1919
17,LAMMPS(KL),173.0,590.44,1.2,-14.366,0.039,temp: 173.0,-0.005833350582495811
2020
18,LAMMPS(KL),248.0,523.3,1.86,-12.238,0.054,temp: 248.0,-0.025472839584812983
2121
19,LAMMPS(KL),298.0,477.43,2.22,-10.893,0.059,temp: 298.0,-0.05884542029118957
22-
20,ms2(KL),98.0,658.92,0.13,-16.748,0.003,temp: 98.0,-0.04437112463737139
22+
20,ms2(KL),98.0,658.92,0.13,-16.748,0.003,temp: 98.0,-0.11100125150123732
2323
21,ms2(KL),173.0,590.09,0.13,-14.347,0.003,temp: 173.0,-0.06510771940455799
2424
22,ms2(KL),248.0,522.71,0.16,-12.215,0.003,temp: 248.0,-0.1381901547475051
2525
23,ms2(KL),298.0,477.15,0.2,-10.88,0.003,temp: 298.0,-0.11745824998836282
26-
24,ms2(PB),98.0,659.09,0.05,-16.744,0.002,temp: 98.0,-0.018582778694284333
26+
24,ms2(PB),98.0,659.09,0.05,-16.744,0.002,temp: 98.0,-0.08523009599335768
2727
25,ms2(PB),173.0,590.26,0.07,-14.344,0.002,temp: 173.0,-0.03631731169099373
2828
26,ms2(PB),248.0,523.07,0.11,-12.219,0.003,temp: 248.0,-0.06941348786856216
2929
27,ms2(PB),298.0,477.06,0.14,-10.871,0.004,temp: 298.0,-0.13629808810530414
30-
28,Tinker(AA),98.0,659.1,1.2,,,temp: 98.0,-0.01706581716822242
30+
28,Tinker(AA),98.0,659.1,1.2,,,temp: 98.0,-0.08371414566936679
3131
29,Tinker(AA),173.0,590.5,1.4,,,temp: 173.0,0.004327969786990662
3232
30,Tinker(AA),248.0,523.4,1.4,,,temp: 248.0,-0.006368209896214106
3333
31,Tinker(AA),298.0,477.9,1.4,,,temp: 298.0,0.03954040098619179
34-
32,TOWHEE(BS),98.0,,,,,temp: 98.0,
34+
32,TOWHEE(BS),98.0,663.17,,,,temp: 98.0,0.5332776361954781
3535
33,TOWHEE(BS),173.0,590.42,0.3,-14.362,0.01,temp: 173.0,-0.009220457372343888
3636
34,TOWHEE(BS),248.0,523.47,0.37,-12.238,0.011,temp: 248.0,0.007005030885811624
3737
35,TOWHEE(BS),298.0,477.71,0.35,-10.897,0.01,temp: 298.0,-0.00023259059402823293
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
,Program(Group),T / K,ρ / kg m−3,δρ / kg m−3,u / kJ mol−1,δu / kJ mol−1,statepoint,Relative_Error
2-
0,DL_POLY(BS),98.0,646.13,1.36,-16.529,0.062,temp: 98.0,-0.01005888315445661
2+
0,DL_POLY(BS),98.0,646.13,1.36,-16.529,0.062,temp: 98.0,-0.05018829203396733
33
1,DL_POLY(BS),173.0,567.39,2.08,-13.866,0.086,temp: 173.0,0.050353256503779954
44
2,DL_POLY(BS),248.0,477.8,3.32,-11.194,0.011,temp: 248.0,0.08355424392720442
55
3,DL_POLY(BS),298.0,394.04,4.86,-9.009,0.131,temp: 298.0,1.9725340449024766
6-
4,GROMACS(BS),98.0,646.48,0.05,-16.542,0.002,temp: 98.0,0.04410433383113176
6+
4,GROMACS(BS),98.0,646.48,0.05,-16.542,0.002,temp: 98.0,0.003953187386258293
77
5,GROMACS(BS),173.0,567.56,0.09,-13.87,0.003,temp: 173.0,0.08033009792432234
88
6,GROMACS(BS),248.0,478.4,0.16,-11.207,0.004,temp: 248.0,0.20923472225778816
99
7,GROMACS(BS),298.0,393.74,0.26,-9.001,0.006,temp: 298.0,1.8948978652926096
10-
8,GROMACS(KL),98.0,647.03,0.16,-16.56,0.006,temp: 98.0,0.12921796052275805
10+
8,GROMACS(KL),98.0,647.03,0.16,-16.56,0.006,temp: 98.0,0.08903265504660028
1111
9,GROMACS(KL),173.0,567.23,0.14,-13.86,0.005,temp: 173.0,0.02213975869620946
1212
10,GROMACS(KL),248.0,475.32,2.9,-11.14,0.067,temp: 248.0,-0.43592506650590834
1313
11,GROMACS(KL),298.0,354.88,25.0,-8.205,0.5,temp: 298.0,-8.16157526683842
14-
12,LAMMPS(AA),98.0,646.18,0.83,-16.531,0.029,temp: 98.0,-0.0023212807279515252
14+
12,LAMMPS(AA),98.0,646.18,0.83,-16.531,0.029,temp: 98.0,-0.04245379497394264
1515
13,LAMMPS(AA),173.0,567.03,1.57,-13.855,0.046,temp: 173.0,-0.013127113563268688
1616
14,LAMMPS(AA),248.0,477.72,2.99,-11.192,0.079,temp: 248.0,0.0667968468164623
1717
15,LAMMPS(AA),298.0,392.15,7.16,-8.968,0.154,temp: 298.0,1.4834261133603233
18-
16,LAMMPS(KL),98.0,645.96,0.85,-16.532,0.03,temp: 98.0,-0.03636673140459149
18+
16,LAMMPS(KL),98.0,645.96,0.85,-16.532,0.03,temp: 98.0,-0.07648558203806889
1919
17,LAMMPS(KL),173.0,567.12,1.63,-13.865,0.05,temp: 173.0,0.002742978953498484
2020
18,LAMMPS(KL),248.0,477.61,3.22,-11.193,0.082,temp: 248.0,0.04375542578918445
2121
19,LAMMPS(KL),298.0,392.37,6.47,-8.977,0.146,temp: 298.0,1.5403593117408971
22-
20,ms2(KL),98.0,645.93,0.12,-16.523,0.003,temp: 98.0,-0.04100929286051213
22+
20,ms2(KL),98.0,645.93,0.12,-16.523,0.003,temp: 98.0,-0.08112628027410129
2323
21,ms2(KL),173.0,566.68,0.13,-13.843,0.003,temp: 173.0,-0.07484414001734542
2424
22,ms2(KL),248.0,477.24,0.29,-11.178,0.005,temp: 248.0,-0.033747535848014217
2525
23,ms2(KL),298.0,376.01,18.57,-9.209,0.044,temp: 298.0,-2.693400349650347
26-
24,ms2(PB),98.0,645.95,0.07,-16.513,0.002,temp: 98.0,-0.03791425188989251
26+
24,ms2(PB),98.0,645.95,0.07,-16.513,0.002,temp: 98.0,-0.07803248145007383
2727
25,ms2(PB),173.0,566.75,0.09,-13.838,0.003,temp: 173.0,-0.06250073472652207
2828
26,ms2(PB),248.0,476.76,0.2,-11.16,0.005,temp: 248.0,-0.13429191851249073
2929
27,ms2(PB),298.0,391.04,0.47,-8.93,0.01,temp: 298.0,1.1961722488038384
30-
28,Tinker(AA),98.0,645.9,1.2,,,temp: 98.0,-0.045651854316415184
30+
28,Tinker(AA),98.0,645.9,1.2,,,temp: 98.0,-0.08576697851011611
3131
29,Tinker(AA),173.0,567.0,1.3,,,temp: 173.0,-0.018417144402184397
3232
30,Tinker(AA),248.0,478.3,1.6,,,temp: 248.0,0.1882879758693635
3333
31,Tinker(AA),298.0,392.7,2.0,,,temp: 298.0,1.6257591093117432
34-
32,TOWHEE(BS),98.0,,,,,temp: 98.0,
34+
32,TOWHEE(BS),98.0,648.53,,,,temp: 98.0,0.3210675668475522
3535
33,TOWHEE(BS),173.0,567.18,0.35,-13.862,0.01,temp: 173.0,0.0133230406313299
3636
34,TOWHEE(BS),248.0,477.46,0.28,-11.187,0.007,temp: 248.0,0.01233530620652958
3737
35,TOWHEE(BS),298.0,390.83,0.82,-8.938,0.019,temp: 298.0,1.1418269230769242
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
,Program(Group),T / K,ρ / kg m−3,δρ / kg m−3,u / kJ mol−1,δu / kJ mol−1,statepoint,Relative_Error
2-
0,DL_POLY(BS),98.0,668.53,1.15,-16.907,0.059,temp: 98.0,0.020571744895408837
3-
1,DL_POLY(BS),173.0,605.46,1.83,-14.659,0.086,temp: 173.0,0.03304365066253271
2+
0,DL_POLY(BS),98.0,668.53,1.15,-16.907,0.059,temp: 98.0,-0.07207973280673272
3+
1,DL_POLY(BS),173.0,605.46,1.83,-14.659,0.086,temp: 173.0,0.01798772429591776
44
2,DL_POLY(BS),248.0,546.57,2.3,-12.733,0.102,temp: 248.0,0.03396062194712044
55
3,DL_POLY(BS),298.0,508.63,2.53,-11.57,0.11,temp: 298.0,0.011360781272193598
6-
4,GROMACS(BS),98.0,668.48,0.04,-16.904,0.002,temp: 98.0,0.013091110387996718
7-
5,GROMACS(BS),173.0,605.51,0.06,-14.66,0.002,temp: 173.0,0.0413045633281565
6+
4,GROMACS(BS),98.0,668.48,0.04,-16.904,0.002,temp: 98.0,-0.07955343782124982
7+
5,GROMACS(BS),173.0,605.51,0.06,-14.66,0.002,temp: 173.0,0.026247393615460333
88
6,GROMACS(BS),248.0,546.79,0.08,-12.738,0.002,temp: 248.0,0.07422531144127438
99
7,GROMACS(BS),298.0,508.83,0.1,-11.575,0.003,temp: 298.0,0.05068656259899953
10-
8,GROMACS(KL),98.0,669.11,0.09,-16.925,0.004,temp: 98.0,0.10734710518147442
11-
9,GROMACS(KL),173.0,605.44,0.08,-14.659,0.003,temp: 173.0,0.029739285596283197
10+
8,GROMACS(KL),98.0,669.11,0.09,-16.925,0.004,temp: 98.0,0.014615245361750658
11+
9,GROMACS(KL),173.0,605.44,0.08,-14.659,0.003,temp: 173.0,0.014683856568100728
1212
10,GROMACS(KL),248.0,546.66,0.05,-12.737,0.002,temp: 248.0,0.05043254037653854
1313
11,GROMACS(KL),298.0,508.8,0.15,-11.576,0.004,temp: 298.0,0.04478769539998367
14-
12,LAMMPS(AA),98.0,668.25,0.68,-16.896,0.026,temp: 98.0,-0.021319808346133038
15-
13,LAMMPS(AA),173.0,605.29,0.97,-14.654,0.032,temp: 173.0,0.004956547599374272
14+
12,LAMMPS(AA),98.0,668.25,0.68,-16.896,0.026,temp: 98.0,-0.11393248088806247
15+
13,LAMMPS(AA),173.0,605.29,0.97,-14.654,0.032,temp: 173.0,-0.010095151390564555
1616
14,LAMMPS(AA),248.0,546.39,1.35,-12.727,0.04,temp: 248.0,0.001016785088242621
1717
15,LAMMPS(AA),298.0,508.67,1.79,-11.573,0.05,temp: 298.0,0.019225937537559256
18-
16,LAMMPS(KL),98.0,668.09,0.79,-16.898,0.03,temp: 98.0,-0.045257838769868816
19-
17,LAMMPS(KL),173.0,605.19,1.09,-14.657,0.037,temp: 173.0,-0.0115652777318733
18+
16,LAMMPS(KL),98.0,668.09,0.79,-16.898,0.03,temp: 98.0,-0.13784833693453422
19+
17,LAMMPS(KL),173.0,605.19,1.09,-14.657,0.037,temp: 173.0,-0.026614490029649707
2020
18,LAMMPS(KL),248.0,546.26,1.38,-12.729,0.041,temp: 248.0,-0.02277598597649322
2121
19,LAMMPS(KL),298.0,508.34,1.82,-11.568,0.053,temp: 298.0,-0.045661601651682274
22-
20,ms2(KL),98.0,668.03,0.1,-16.887,0.002,temp: 98.0,-0.05423460017878037
23-
21,ms2(KL),173.0,604.92,0.1,-14.639,0.002,temp: 173.0,-0.056174206126298094
22+
20,ms2(KL),98.0,668.03,0.1,-16.887,0.002,temp: 98.0,-0.14681678295197173
23+
21,ms2(KL),173.0,604.92,0.1,-14.639,0.002,temp: 173.0,-0.07121670435523596
2424
22,ms2(KL),248.0,545.82,0.12,-12.71,0.002,temp: 248.0,-0.10330536496482193
2525
23,ms2(KL),298.0,508.27,0.15,-11.559,0.003,temp: 298.0,-0.05942562511606379
26-
24,ms2(PB),98.0,668.25,0.06,-16.885,0.002,temp: 98.0,-0.021319808346133038
27-
25,ms2(PB),173.0,604.97,0.06,-14.633,0.002,temp: 173.0,-0.04791329346065552
26+
24,ms2(PB),98.0,668.25,0.06,-16.885,0.002,temp: 98.0,-0.11393248088806247
27+
25,ms2(PB),173.0,604.97,0.06,-14.633,0.002,temp: 173.0,-0.0629570350356746
2828
26,ms2(PB),248.0,546.12,0.09,-12.711,0.003,temp: 248.0,-0.0483989702000533
2929
27,ms2(PB),298.0,508.28,0.11,-11.552,0.003,temp: 298.0,-0.05745933604972517
30-
28,Tinker(AA),98.0,668.4,1.0,,,temp: 98.0,0.001122095176120322
31-
29,Tinker(AA),173.0,605.3,1.3,,,temp: 173.0,0.006608730132499029
30+
28,Tinker(AA),98.0,668.4,1.0,,,temp: 98.0,-0.09151136584449418
31+
29,Tinker(AA),173.0,605.3,1.3,,,temp: 173.0,-0.008443217526656041
3232
30,Tinker(AA),248.0,546.4,1.5,,,temp: 248.0,0.0028469982470668547
3333
31,Tinker(AA),298.0,508.7,1.5,,,temp: 298.0,0.025124804736575117
34-
32,TOWHEE(BS),98.0,,,,,temp: 98.0,
35-
33,TOWHEE(BS),173.0,,,,,temp: 173.0,
34+
32,TOWHEE(BS),98.0,673.97,,,,temp: 98.0,0.7410593727734759
35+
33,TOWHEE(BS),173.0,606.08,,,,temp: 173.0,0.12040762385833957
3636
34,TOWHEE(BS),248.0,546.45,0.3,-12.731,0.009,temp: 248.0,0.011998064041208829
3737
35,TOWHEE(BS),298.0,508.63,0.35,-11.571,0.01,temp: 298.0,0.011360781272193598

reproducibility_project/src/analysis/Comparison_Figures/generate_comparison_plots.py

+37
Original file line numberDiff line numberDiff line change
@@ -1061,3 +1061,40 @@ def print_errors_for_text(df):
10611061
plot_rr_mosdef_mosdef_avg(densityDF.copy())
10621062

10631063
print_errors_for_text(densityDF.copy())
1064+
1065+
## Print out relative errors for max and min
1066+
1067+
import copy
1068+
1069+
mosdefDF = pd.read_csv("csvs/job_density_data.csv", index_col=0)
1070+
mosdefDF.insert(
1071+
len(mosdefDF.columns),
1072+
"pressure",
1073+
np.full(len(mosdefDF.index), 0.101325),
1074+
)
1075+
hasse_dfList = _load_all_rr_data()
1076+
1077+
# 4 combine data into one dataframe
1078+
densityDF = mosdefDF.loc[
1079+
mosdefDF["molecule"] != "pentaneUA-flexible_bonds"
1080+
].copy()
1081+
densityDF = pd.concat([densityDF, *hasse_dfList], ignore_index=True)
1082+
df = copy.deepcopy(densityDF)
1083+
df = _mask_df(df)
1084+
init_rows = df.shape[0]
1085+
df = df[df["density"].notna()] # drop bad rows
1086+
print(f"Removed {init_rows-df.shape[0]} rows")
1087+
mosdf = copy.copy(df.loc[df["associated_work"] == "MoSDeF"])
1088+
1089+
groupREList = ["molecule", "temperature", "forcefield"]
1090+
mosdf["Relative_Error"] = mosdf.groupby(groupREList)['density'].transform(calculate_relative_error)
1091+
maxval = mosdf["Relative_Error"].max()
1092+
medval = mosdf["Relative_Error"].median()
1093+
print("MoSDeF max and median values: ", maxval, medval)
1094+
1095+
RRdf = copy.copy(df.loc[df["associated_work"] == "RR"])
1096+
groupREList = ["molecule", "temperature", "forcefield", "pressure"]
1097+
RRdf["Relative_Error"] = RRDF.groupby(groupREList)['density'].transform(calculate_relative_error)
1098+
maxval = RRdf["Relative_Error"].max()
1099+
medval = RRdf["Relative_Error"].median()
1100+
print("Round robin max and median values: ", maxval, medval)

reproducibility_project/src/analysis/Comparison_Figures/generate_densities.py

+20
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,26 @@ def _generate_csv_from_PDF(molecule):
139139
headerInt = int(4 * np.floor(i / 4))
140140
header = newDF.iloc[headerInt]["Program(Group)"]
141141
newDF.iloc[i]["Program(Group)"] = header
142+
143+
manAddDict = { #manually add missing densities
144+
(5, 98.0):"648.53", (41, 98.0):"663.17", (70, 98.0):"673.97", (70, 173.0):"606.08"
145+
}
146+
if molecule in [
147+
"OPLS Ethane at 5 MPa", "OPLS Ethane at 41 MPa"
148+
]:
149+
press = int(molecule.split(" ")[-2])
150+
newDF.loc[(newDF["Program(Group)"] == "TOWHEE(BS)") & (newDF["T / K"] == "98.0"), "ρ / kg m−3"] = manAddDict[
151+
(press, 98.0)]
152+
print(f"ADDED "+ str(newDF.loc[(newDF["Program(Group)"] == "TOWHEE(BS)") & (newDF["T / K"] == "98.0"), "ρ / kg m−3"]))
153+
elif molecule == "OPLS Ethane at 70 MPa":
154+
press = int(molecule.split(" ")[-2])
155+
newDF.loc[(newDF["Program(Group)"] == "TOWHEE(BS)") & (newDF["T / K"] == "98.0"), "ρ / kg m−3"] = manAddDict[
156+
(press, 98.0)]
157+
newDF.loc[(newDF["Program(Group)"] == "TOWHEE(BS)") & (newDF["T / K"] == "173.0"), "ρ / kg m−3"] = manAddDict[
158+
(press, 173.0)]
159+
print(f"ADDED "+ str(newDF.loc[(newDF["Program(Group)"] == "TOWHEE(BS)") & (newDF["T / K"] == "98.0"), "ρ / kg m−3"]))
160+
print(f"ADDED "+ str(newDF.loc[(newDF["Program(Group)"] == "TOWHEE(BS)") & (newDF["T / K"] == "173.0"), "ρ / kg m−3"]))
161+
142162

143163
# we will change the data type
144164
# of id column to str by giving

0 commit comments

Comments
 (0)