forked from openforcefield/open-forcefield-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcychex_dat.py
25 lines (15 loc) · 855 Bytes
/
cychex_dat.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import thermopyl as th
import pandas as pd
from pdb import set_trace
df = th.pandas_dataframe()
experiments = ['Molar volume, m3/mol', 'Molar volume, m3/mol_std', 'Molar heat capacity at constant pressure, J/K/mol', 'Molar heat capacity at constant pressure, J/K/mol_std']
ind_list = [df[exp].dropna().index for exp in experiments]
ind = reduce(lambda x,y: x.union(y), ind_list)
df = df.ix[ind]
columns_keep = ['Molar volume, m3/mol', 'Molar volume, m3/mol_std', 'Molar heat capacity at constant pressure, J/K/mol', 'Molar heat capacity at constant pressure, J/K/mol_std', 'Temperature, K', 'Pressure, kPa', 'components', 'filename', 'phase']
df = df[df['components']=='cyclohexane']
df = df[df['Temperature, K']==293.15]
df = df[df['Pressure, kPa']==101.325]
df = df[columns_keep]
print df
df.to_csv('tabular_cychex_data_for_Josh.csv',sep=';')