darkreactions / ESCALATE_report

Transform experimental data into ML ready datasets!
http://escalation.sd2e.org/
MIT License
2 stars 1 forks source link

Correcting concentrations using density information #10

Closed ipendlet closed 5 years ago

ipendlet commented 5 years ago

use debugging and a full walkthrough. Develop a test for this would be helpful too!

ipendlet commented 5 years ago

Using the actual amounts of chemicals in a given reagent (grams and milliliters of chemicals) we can make a close approximation of the total volume of the solution after the addition of chemicals. This approximation was demonstrated by Josh. More information coming.

I will type out the necessary changes and a summary of the places where things are needed to be changed and the collaborators where the changes are needed. This will include the formulas for the density calculations and associated with change for corrected density calculations.

ipendlet commented 5 years ago

The relevant work showing the models for calculating concentration can be found here:

https://www.wolframcloud.com/objects/jschrier0/Published/2019.06.08_volume_correction.nb

denoted all of the newly added concentration information as v1-conc and v1-mmol and v1-M

These values have been added to the dataframe and are undergoing debugging. Historical conversation record can be retraced here:

Joshua Schrier [Jun 8th at 12:26 PM] In today's episode of perovskite mythbusters, we've demonstrated a solution to our known problem (for the past year!) that we compute stock solution concentrations (and subsequent values used for ML) in the wrong way. A simple algebraic model that uses experimental densities of the pure solids from CSD is sufficient to correct this to the level of precision measured in stock solution preparation at LBL. A full writeup, including action items is in the notebook:

https://www.wolframcloud.com/objects/jschrier0/Published/2019.06.08_volume_correction.nb

this episode is brought to you by a saturday morning cappucino at Prince Coffee 10 replies

Joshua Schrier [9 days ago] Fwiw, I remember Emory suggested this would work well, back in December.

Ian Pendleton [9 days ago] Solid demonstration. Thank you for putting this together. Ill think about what changes are needed to the current code and if we can get a volunteer ill help them push the update.

Ill think about this over the next couple days. Really cool and way easier than alternatives. Super excited to put this problem behind us.

Ian Pendleton [9 days ago] I agree that this is a top priority and the problem looks tractable given our team.

Ian Pendleton [9 days ago] I also really appreciate all of the comments in the notebook. Thank you Josh!

Ian Pendleton [9 days ago] @jschrier @GaryC Can we aim to discuss next steps and challenges with the dev team and invested interested parties asap? -- particularly with attention to easy ones to overcome that are high impact? This problem had the potential to sprawl, but the model1 fixes are high impact and straight forward to fix. Im pumped, this is compelling and looks really easy! Whoot.

Joshua Schrier [9 days ago] FWIW: Model 2 does away with experimental data entirely...just atomic structures and van der Waals spheres. I suspect it would be 4 lines in Mathematica 12, but I'm still on 11.3 because it breaks ECL. Also I ran out of cappuccino. But its far more complicated to implement in python (and at least 4x as complicated in Mathemica :slightly_smiling_face: ), and model 1 is more in line with existing ESCALATE infrastructure, especially the chemical inventory. So let's just stop there. (edited)

Joshua Schrier [9 days ago] You'll notice that the volume model could be described by a dot product of the vector of masses (for each component) with the correspondingly ordered vector of [molar volumes]=[1/density] (for each component)

Joshua Schrier [9 days ago] I don't suspect we need any extensive "all-hands" meetings. If @ipendlet and @GaryC want to chat briefly for 15 minutes, then lets do so on Monday, ~ 12:45. @ipendlet is probably the right human for this particular job (with @Michael Tynes as a backup), as there is some chemistry knowledge involved. Everyone else can continue as usual. (edited)

Joshua Schrier [9 days ago] Actually, the person we really want in the room is @Mansoor Ani, because all the stock solution definitions in the Chemical Inventory page are expressed in these "fake" molarities, and we'll need to be careful about correcting that (or move entirely to a mass-based definition of the stock solutions)

Joshua Schrier [9 days ago] It also opens up the posibility that the stock solutions we are using now (which have the lowest amount of GBL) are not necessarily the highest concentration of PbI2 (once we apply the volume corrections). But we can check that.

ipendlet commented 5 years ago

Copy of notebook.

2019.06.08_volume_correction.nb.zip

ipendlet commented 5 years ago

How non-ideality is a minimal issue (continuation of the investigation of model 2 in the previous notebook) https://www.wolframcloud.com/obj/jschrier0/Published/2019.06.11_nonideal_mixing_gbl_fah.nb