-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstructions_proj2.txt
More file actions
27 lines (16 loc) · 1.76 KB
/
instructions_proj2.txt
File metadata and controls
27 lines (16 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Instructions:
Work in a jupyter notebook.
Load the dataset.csv file to Python. Use the df = pd.read_csv function of the pandas package (pip install pandas). The dataset contains multiple polymers with Tg and cte values. See the file description below for more information.
Visualize the polymers using RDKit (pip install rdkit). Use the Draw.MolsToGridImage function and the legend argument to plot the polymers and the SMILES strings. Hint: Draw.MolsToGridImage(mols, legends=df.smiles.tolist())
Use matplotlib (pip install matplotlib) to plot cte_exp (ordinate) vs abb (abscissa) using dots with dashed lines. Hint: plt.plot(x,y, 'o--).
The empirical rule by Boyer-Spencer [1] states that cte_bs * Tg = 0.08. Add a column cte_bs to the data frame that contains the computed cte_bs for each polymer. Tg is already available in the data frame for each polymer. Plot both cte_exp and cte_bs vs abb in an new plot.
Find a new Boyer-Spencer parameter a that better fit to our data set. Use scipy's curve_fit function (pip install scipy) to fit the function cte = a / Tg. You should find a = 0.035 (cte_bs_own = 0.035 / Tg). Add cte_bs_own to the data frame and plot cte_exp, cte_bs, and cte_bs_own vs abb in a new plot to find out how much better your own rule fits the data.
[1] R. Simha and R.F. Boyer, J. Chem. Phys., 37, 1003 (1962)
File description:
dataset.csv: comma separated CSV txt file (open with any editor) that contains the "coefficient of thermal expansion" (cte) of 11 polymers.
Columns in file 'dataset.csv':
name: polymer name
abb: short name of polymer
cte_exp: measured cte of the polymer in 1/K
Tg: glass transition temperature of the polymer in K
smiles: language to represent polymers (see https://www.polymergenome.org/guide and http://opensmiles.org/opensmiles.html)