<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nathan C. Frey, PhD on Medium]]></title>
        <description><![CDATA[Stories by Nathan C. Frey, PhD on Medium]]></description>
        <link>https://medium.com/@ncfrey?source=rss-a5e89179a5d2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*49bOEhd492VKNw8AP54CUw.png</url>
            <title>Stories by Nathan C. Frey, PhD on Medium</title>
            <link>https://medium.com/@ncfrey?source=rss-a5e89179a5d2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:12:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ncfrey/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[FastFlows: Flow-Based Models for Molecular Graph Generation]]></title>
            <link>https://medium.com/data-science/fastflows-flow-based-models-for-molecular-graph-generation-a8327bb9bee1?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8327bb9bee1</guid>
            <category><![CDATA[biology]]></category>
            <category><![CDATA[editors-pick]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[chemistry]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Mon, 14 Feb 2022 22:48:47 GMT</pubDate>
            <atom:updated>2022-02-14T22:48:47.827Z</atom:updated>
            <content:encoded><![CDATA[<h4>Deep learning invertible transformations for efficient generative modeling</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*dQjd-tcaN1L0H5Iv" /><figcaption>From <a href="https://unsplash.com/photos/cCthPLHmrzI">Unsplash</a>.</figcaption></figure><p><em>Nathan C. Frey</em></p><p><em>This post was co-authored by Bharath Ramsundar from Deep Forest Sciences.</em></p><p><em>Normalizing flow-based deep generative models learn a transformation between a simple base distribution and a target distribution. In this post, we show how to use </em><a href="https://arxiv.org/abs/2201.12419"><em>FastFlows</em></a><em> to model a dataset of small molecules and generate new molecules. FastFlows allows us to generate thousands of valid molecules in seconds and shows the advantages and challenges of flow-based molecular generative models.</em></p><p><em>An </em><a href="https://github.com/deepchem/deepchem/blob/master/examples/tutorials/Training_a_Normalizing_Flow_on_QM9.ipynb"><em>interactive tutorial</em></a><em> accompanies this post and is available to run through Google Colab.</em></p><p><strong>Why would we want to use normalizing flows in chemistry and biology?</strong></p><p>There is a lot of great work using variational autoencoders (<a href="https://pubs.acs.org/doi/10.1021/acscentsci.7b00572">VAEs</a>), recurrent neural networks (<a href="https://pubs.acs.org/doi/full/10.1021/acscentsci.7b00512">RNNs</a>), graph neural networks (<a href="https://iopscience.iop.org/article/10.1088/2632-2153/abcf91/meta">GNNs</a>), and generative adversarial networks (<a href="https://arxiv.org/pdf/1805.11973.pdf">GANs</a>) for generating molecules. Normalizing Flows (NFs) can be used to generate molecular graphs, as in the <a href="https://arxiv.org/pdf/2006.10137.pdf">MoFlow</a> and <a href="https://arxiv.org/pdf/1905.11600.pdf">GraphNVP</a> papers. They can also be used to accelerate calculations of the binding affinity between <a href="https://arxiv.org/pdf/2002.04913.pdf">small molecules and proteins</a>.</p><p>Our goal <a href="https://arxiv.org/abs/2201.12419">in this paper</a> is not to replace these methods, but instead to provide an easy-to-use framework that anyone can apply to their distribution of interest and start doing generative and probabilistic modeling quickly.</p><p><strong>What is a normalizing flow?</strong></p><p>NFs have two key capabilities: density calculation and sampling. After learning a mapping between probability distributions, NFs can exactly compute the likelihood that any given sample was drawn from the target distribution. They can also generate new samples from the target distribution. This makes NFs distinct from other generative models like VAEs and GANs, which can only estimate likelihoods or can’t compute them at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*oIfCvRbTghbYk0UT" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*3hS05l9533GHt2Fy" /><figcaption>An <a href="https://blog.evjang.com/2018/01/nf2.html">example</a> of how a normalizing flow transforms a two-dimensional Normal distribution to a target distribution. In this case, a point cloud that looks like the word “SIGRAPH.” Image by <a href="https://blog.evjang.com/2018/01/nf2.html">Eric Jang</a>.</figcaption></figure><p>Another key difference is that the layers in an NF are <em>bijective transformations</em> — they provide a one-to-one mapping between inputs and outputs, rather than compressing inputs into a latent space. So NFs are useful for any application that requires a probabilistic model with either or both density calculation and sampling. I recommend these excellent blog posts by <a href="https://blog.evjang.com/2018/01/nf2.html">Eric Jang</a> and <a href="https://www.bradsaund.com/post/normalizing_flows/">Brad Saund</a> for more details on NFs and some nice examples.</p><p><strong>Preparing a dataset of SELFIES strings</strong></p><p>To show how NFs work, we’ll try to model distributions from the <a href="https://www.nature.com/articles/sdata201422">QM9</a> and <a href="https://www.ebi.ac.uk/chembl/">ChEMBL</a> datasets. To represent the molecules, we’ll use Self-Referencing Embedded Strings (<a href="https://arxiv.org/abs/1905.13741">SELFIES</a>) [1]. SELFIES are a 100% robust string representation for molecules — meaning that even totally random SELFIES strings are chemically valid molecules. This is great for design applications, where deep learning models (like NFs) are generating new molecules without knowing the underlying rules of chemistry that determine if a molecule is valid or not. With the functions and examples in the selfies <a href="https://github.com/aspuru-guzik-group/selfies">repo</a>, it’s easy to translate the Simplified Molecular-Input Line-Entry System (SMILES) strings provided for chemical datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d03XqtUZQl3Kti7v" /><figcaption>(a) A representative molecule with its SMILES and SELFIES representations. (b) Schematic of a normalizing flow transforming input samples from a base distribution to a target distribution. Image by author.</figcaption></figure><p>We transform the SELFIES strings into one-hot encoded vectors and then dequantize those vectors by adding random noise from the interval [0, 0.95). This gives us continuous, numerical inputs that our model will be able to read, and we can recover the original SELFIES one-hot encodings by applying a simple floor function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l9xVec8rk63apW2o" /><figcaption>Encoding molecules as SELFIES strings and dequantized tensors for training a normalizing flow. Image by author.</figcaption></figure><p><strong>Training a Normalizing Flow</strong></p><p>An NF is just a sequence of bijective transformations, and we can construct deep neural networks where the layers are bijective. That way, we can train the model on data and learn the parameters of a transformation between our base distribution and the target. Luckily, the <a href="https://www.tensorflow.org/probability">TensorFlow Probability</a> and <a href="https://doi.org/10.5281/zenodo.4296287">nflows</a> libraries have many built-in probability distributions and bijectors, including some of the most popular architectures for learning distributions.</p><p>The choice of base distribution is easy — we pick a multivariate Normal distribution with the same number of dimensions as our one-hot encodings. That is about as simple as it can get. Then we have to build our NF. For FastFlows [2], we use <a href="http://arxiv.org/abs/1605.08803">Real NVP</a> layers.</p><p>You might be wondering how layers in a neural network can be invertible; in general, they aren’t. Real NVP works by constraining each element <em>x_d+1 </em>from the transformed distribution to depend only on the previous <em>d</em> elements from the base distribution, for some integer <em>d</em>. <em>Alpha_i </em>and <em>mu_i</em> are scalars that are computed by passing the elements of the base distribution through a neural network. This gives a simple scale-and-shift (affine) transformation that nevertheless can capture complex target distributions by depending sensitively on previous variables from the base distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*BwEGWU95lPIXKLoV" /><figcaption>The forward pass in Real NVP. Image from <a href="https://blog.evjang.com/2018/01/nf2.html">Normalizing Flows Tutorial</a>.</figcaption></figure><p>The key here is that the scale-and-shift operation can be computed in a single pass, so Real NVP can perform fast, parallelized sampling and density estimation. The sampling speed is orders of magnitude faster than for autoregressive models like causal sequence-based models and <a href="https://arxiv.org/abs/1705.07057">Masked Autoregressive Flow</a>, but it comes at the cost of reduced expressivity.</p><p>We alternate the NVP layers with permutations so that the layers can operate on different parts of the inputs. With this setup, we can “undo” transformations by reversing the shift-and-scale operation, so we have an invertible transformation even though we’re using a neural network with learnable parameters.</p><p>For Real NVP we have to specify the number of layers and the number of hidden units in each NVP layer. In this example we’ll use 8 layers and [512, 512] hidden units. We can increase these numbers to make more expressive flows to capture more complex target distributions.</p><p><strong>Generating new molecules</strong></p><p>With a trained model, it’s easy to generate new molecules and evaluate their log likelihood. We have to do a bit of post-processing: applying the floor function and clipping by value to turn the noisy, continuous samples back into one-hot encoded vectors. We’ll also have to add padding characters to any vectors that were generated with all zeros. After that,</p><pre> selfies.multiple_hot_to_selfies() </pre><p>will give us back SELFIES representations, which we can decode into SMILES and analyze with the open-source cheminformatics software <a href="https://www.rdkit.org/">RDKit</a>.</p><p>RDKit will look at our generated SMILES strings and check to see if they are valid molecules. With FastFlows, we can generate 100K valid molecules in 4.2 seconds on a single GPU! If you have any experience trying to generate valid SMILES strings with autoregressive models, that figure is pretty impressive! That’s the speed of Real NVP and the robustness of the SELFIES representation at work. Now it’s time to actually look at the molecules our NF came up with.</p><p><strong>High-throughput virtual screening</strong></p><p>With FastFlows, our goal is not to come up with the exact molecules that are going to go into clinical trials, nor to ensure that the generated molecules are precisely engineered to fulfill all the constraints we care about. FastFlows is designed to enable anyone to do deep generative modeling in a low-data limit, and to take advantage of the computationally cheap sampling capabilities. It’s a way to experiment with NFs for chemistry, not a production-ready system by any means.</p><p>We know from work on the <a href="https://pubs.acs.org/doi/abs/10.1021/acs.jcim.0c00174">synthesizability of generated molecules</a> that goal-oriented deep generative models tend to propose molecules that can’t be easily made in the lab. To ensure relevance in a lab setting, you either need to generate molecules directly with <a href="https://arxiv.org/abs/2110.06389">synthetic planning</a>, or have fast ways to generate lots of candidates and evaluate their <a href="https://pubs.acs.org/doi/10.1021/acs.jcim.7b00622">synthetic accessibility and complexity</a> to filter out the unreasonable candidates.</p><p>Here, in the interest of exploratory, curiosity-driven investigations of chemical space, we opt for coupling our fast molecular generation method to equally fast multi-objective optimization to identify druglike, synthesizable molecules (at least as measured by some simple proxy metrics).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/0*ZbruC4gMqvdyI4_6" /><figcaption>FastFlows workflow diagram. Image by author.</figcaption></figure><p>FastFlows is quite good at generating chemically valid, unique, and novel molecules at rates faster than other deep generative models. That might be interesting, or it could mean that even though these molecules are chemically valid and unique, they aren’t very realistic. FastFlows doesn’t do well on distribution learning metrics like <a href="https://arxiv.org/pdf/1811.09621.pdf">GuacaMol</a> and <a href="https://github.com/molecularsets/moses">MOSES</a>, because it isn’t designed to.</p><p>We can use the fast generation of FastFlows and couple it to post-hoc filters to flexibly weed out molecules that our medicinal chemists don’t like the look of. After that, we compute scores like quantitative estimate of druglikeness, synthetic accessibility, and <a href="https://pubs.acs.org/doi/10.1021/acs.jcim.7b00622">learned synthetic complexity</a> — all simple proxies that don’t add a substantial time cost to generation, but do give some sense of which generated molecules could be interesting to study further.</p><p>With those scores computed, we find the Pareto frontier of generated samples that are maximally druglike, synthetically accessible, and complex. By considering the tradeoffs between these metrics, we avoid picking out molecules that over-optimize for a particular score, which could lead to generated samples that are too similar to existing drugs (maximizing QED), too simple and easy to make (maximizing synthetic accessibility), or too complex and unrealistic (maximizing synthetic complexity). By balancing these factors, we can explore any area of chemical space we like and find interesting molecules, without baking in a ton of complexity into our deep neural network architecture that makes it difficult to train and sample from.</p><p><strong>Limitations and next steps</strong></p><p>FastFlows enables fast training and sampling of more than 20,000 chemically valid molecules per second after training on QM9, or nearly 500 molecules per second after training on more complex distributions from ChEMBL, so deep generative modeling can be coupled to equally time-efficient post-hoc filters and multi-objective optimization for efficient molecular generation. But because FastFlows relies on fully bijective transformations, as the dimensionality of the target distribution representation increases (~18,000 for one-hot encoded SELFIES from ChEMBL), the normalizing flow suffers from low expressivity and requires increasing depth to capture the target distribution.</p><p>FastFlows illustrates the advantages of stable deep neural network training (no mode collapse or other difficulties commonly encountered in other deep generative models) and fast, computationally cheap sampling for high-throughput virtual screening campaigns. However, the low expressivity and need for many bijective transformations presents an opportunity for architectural improvements and more flexible base distributions to improve generation.</p><p><strong>Key takeaways</strong></p><ul><li>Normalizing flows are a flexible and interesting deep learning framework for generating novel molecules.</li><li>Using SELFIES, a simple normalizing flow architecture, and multi-objective optimization, it’s possible to identify novel, chemically valid molecules in a high-throughput virtual screening.</li></ul><p><strong>Getting in touch</strong></p><p><em>If you liked this tutorial or have any questions, feel free to reach out to Nathan over </em><a href="/service/mailto:ncfrey@mit.edu"><em>email</em></a><em> or connect on </em><a href="https://www.linkedin.com/in/ncfrey"><em>LinkedIn</em></a><em> and </em><a href="https://twitter.com/nc_frey"><em>Twitter</em></a><em>.</em></p><p><em>This work was presented at the 2021 ELLIS Machine Learning for Molecule Discovery Workshop and is available on </em><a href="https://arxiv.org/abs/2201.12419"><em>arXiv</em></a><em>.</em></p><p><em>You can find out more about Nathan’s projects and publications on his </em><a href="https://ncfrey.github.io/"><em>website</em></a><em>.</em></p><p><strong>References</strong></p><p>[1] Krenn, Mario, et al. “Self-referencing embedded strings (SELFIES): A 100% robust molecular string representation.” <em>Machine Learning: Science and Technology</em> 1.4 (2020): 045024.</p><p>[2] Frey, Nathan C., Vijay Gadepally, and Bharath Ramsundar. “FastFlows: Flow-Based Models for Molecular Graph Generation.” <em>arXiv preprint arXiv:2201.12419</em> (2022).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8327bb9bee1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/fastflows-flow-based-models-for-molecular-graph-generation-a8327bb9bee1">FastFlows: Flow-Based Models for Molecular Graph Generation</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MoleculeNet Part 1: Datasets for Deep Learning in the Chemical and Life Sciences]]></title>
            <link>https://medium.com/data-science/moleculenet-part-1-datasets-for-deep-learning-in-the-chemical-and-life-sciences-b86960d1ee22?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b86960d1ee22</guid>
            <category><![CDATA[biotechnology]]></category>
            <category><![CDATA[thoughts-and-theory]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[chemistry]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Mon, 17 May 2021 21:39:22 GMT</pubDate>
            <atom:updated>2021-05-18T15:16:24.884Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hQG_y2xkkj4cjexx" /><figcaption>From <a href="https://unsplash.com/photos/RflgrtzU3Cw">Unsplash</a></figcaption></figure><h4><a href="https://towardsdatascience.com/tagged/thoughts-and-theory">Thoughts and Theory</a></h4><h4><em>Towards an “ImageNet moment” in Molecular Machine Learning</em></h4><p><em>This post was co-authored by Bharath Ramsundar from DeepChem.</em></p><p><em>Benchmark datasets are an important driver of progress in machine learning. Unlike computer vision and natural language processing, the diversity and complexity of datasets in chemical and life sciences make these fields largely resistant to attempts to curate benchmarks that are widely accepted in the community. In this post, we show how to add datasets to the </em><a href="http://moleculenet.ai/"><em>MoleculeNet</em></a><em> benchmark for molecular machine learning and make them programmatically accessible with the </em><a href="https://deepchem.io/"><em>DeepChem</em></a><em> API.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/0*KgC7lws7rpVkiUah" /><figcaption>Image from <a href="http://moleculenet.ai/">moleculenet.ai</a>.</figcaption></figure><p><strong>Molecular ML Dataset Curation</strong></p><p><a href="https://pubs.rsc.org/--/content/articlehtml/2018/sc/c7sc02664a">MoleculeNet</a> [1] collects datasets in six major categories: quantum mechanics, physical chemistry, proteins, biophysics, physiology, and materials science. The <a href="https://pubs.rsc.org/--/content/articlehtml/2018/sc/c7sc02664a">“first generation” of MoleculeNet</a> showed what a molecular ML benchmark might look like, and revealed some interesting trends with respect to data scarcity, class imbalances, and the power of physics-aware featurizations over model architectures for some datasets.</p><p>It isn’t easy to cover the entire breadth and depth of molecular ML, so that’s why MoleculeNet is evolving into a flexible framework for contributing datasets and benchmarking model performance in a standardized way, powered by <a href="https://github.com/deepchem/deepchem">DeepChem</a>.</p><p><strong>Why Should We Care about Benchmarks?</strong></p><p>Image and speech recognition <em>seem</em> like gargantuan tasks, but they are really pretty simple compared to the kinds of problems we see in physics, chemistry, and biology. That’s why it’s comparatively rare to see anyone claim that a problem in physical or life science has been “solved” by machine learning. Better datasets, dataset generating methods, and robust benchmarks are essential ingredients to progress in molecular machine learning, maybe even more so than inventing new deep learning tricks or architectures.</p><p>In many subfields of deep learning, the standard avenue of progress goes something like</p><p>1. Pick a widely used benchmark dataset<strong> (</strong>e.g.,<strong> </strong><a href="http://www.image-net.org/">ImageNet</a>, <a href="https://www.cs.toronto.edu/~kriz/cifar.html">CIFAR-10</a>, or <a href="http://yann.lecun.com/exdb/mnist/">MNIST</a>).</p><p>2. Develop and test a model architecture that achieves “state of the art” performance on some aspect of the benchmark.</p><p>3. Come up with an ad-hoc “theoretical” explanation for why your particular architecture outperforms the rest.</p><p>4. Publish your results in a top conference.</p><p>If you’re lucky, other researchers might even use your model or build on it for their own research before the next SOTA architecture comes out. There are obvious issues with this paradigm, including <a href="https://arxiv.org/pdf/1908.09635.pdf">bias in datasets</a>, <a href="http://d2l.ai/chapter_multilayer-perceptrons/environment.html#types-of-distribution-shift">distribution shifts</a>, and the <a href="https://en.wikipedia.org/wiki/Goodhart%27s_law">Goodhart-Strathern Law</a> — when a metric becomes a target, it is no longer a good metric. Still, there’s no question that benchmarks provide a kind of clarity of purpose and fuel interest in machine learning research that is lacking in other fields.</p><p>Maybe more importantly, benchmarks encourage and reward researchers for creating high-quality datasets, which has historically been underappreciated in many fields. And benchmark datasets enable striking breakthroughs, like <a href="https://www.nature.com/articles/d41586-020-03348-4">DeepMind’s AlphaFold</a>, which was made possible by decades of effort assembling <a href="https://predictioncenter.org/">high-resolution protein structures</a>. AlphaFold represents a sort of “<a href="https://ruder.io/nlp-imagenet/">ImageNet moment</a>” in protein folding, meaning that a problem is “solved” in some sense.</p><p><a href="http://moleculenet.ai/">MoleculeNet</a> contains hundreds of thousands of compounds and measured/calculated properties, all accessible through the <a href="https://deepchem.readthedocs.io/en/latest/api_reference/moleculenet.html">DeepChem API</a>. It brings a flavor of the traditional evaluation frameworks popularized in ML conferences, but also provides a standardized way to contribute and access new datasets.</p><p><strong>Contributing a Dataset to MoleculeNet</strong></p><p>Dataset contribution has been significantly streamlined and <a href="https://deepchem.readthedocs.io/en/latest/api_reference/moleculenet.html">documented</a>. The first step is to open an <a href="https://github.com/deepchem/deepchem/issues">issue</a> on GitHub in the DeepChem repo to discuss the dataset you want to add, emphasizing what unique molecular ML tasks the dataset covers that aren’t already part of MolNet. If you created or curated a dataset yourself, this is a great way to share it with the molecular ML community! Next, you need to</p><ul><li>Write a DatasetLoader class that inherits from <a href="https://github.com/deepchem/deepchem/blob/master/deepchem/molnet/load_function/molnet_loader.py#L82">deepchem.molnet.load_function.molnet_loader._MolnetLoader</a>. This involves documenting any special options for the dataset and the targets or “tasks” for ML.</li><li>Implement a create_dataset function that creates a DeepChem Dataset by applying acceptable featurizers, splitters, and transformations.</li><li>Write a load_dataset function that documents the dataset and provides a simple way for users to load your dataset.</li></ul><p>The <a href="https://github.com/deepchem/deepchem/blob/master/deepchem/molnet/load_function/qm9_datasets.py">QM9 MolNet loader</a> source code is a nice, simple starting point for writing your own MolNet loader.</p><p>This framework allows a dataset to be used directly in an ML pipeline with any reasonable combination of featurization (converts raw inputs like SMILES strings into a machine-readable format), splitter (controls how training/validation/test sets are constructed), and transformations (<em>e.g.</em>, if the targets need to be normalized before training).</p><p><a href="https://deepchem.readthedocs.io/en/latest/api_reference/splitters.html">Splitters</a> are particularly important here. When comparing how different models perform on the same task, it’s crucial that each model “sees” the same training data and is evaluated on the same data. We also want to know how a model does on samples that are similar to what it’s seen before (using a randomized train/val/test split) versus how it does on samples that are dissimilar (<em>e.g.</em>, using a split based on chemical substructures).</p><p><strong>Accessing Datasets with the DeepChem API</strong></p><p>MolNet loaders make accessing datasets <em>and pre-processing them for ML </em>possible with a single line of Python code:</p><pre>from deepchem.molnet.load_function.qm9_datasets import load_qm9</pre><pre>tasks, (train, val, test), transforms = load_qm9()</pre><p>To actually make the dataset available through the DeepChem API, you simply provide a tarball or zipped folder to a DeepChem developer, who will add it to the DeepChem AWS S3 bucket. Finally, <a href="https://deepchem.readthedocs.io/en/latest/api_reference/moleculenet.html">add documentation</a> for your loader and dataset.</p><p><strong>We Want YOUR Datasets!</strong></p><p>After taking a look at the <a href="https://deepchem.readthedocs.io/en/latest/api_reference/moleculenet.html">long list of datasets in MoleculeNet</a>, you might find that there’s something crucial missing. The good news is that you (yes, YOU!) can contribute new datasets! If you’re not comfortable with Python programming, you can simply open an <a href="https://github.com/deepchem/deepchem/issues">issue</a> on GitHub, include information on why the dataset should be added to MolNet, and request help from a DeepChem developer. If you are comfortable programming, even better — you can follow the steps outlined above and make a contribution.</p><p>The real power of an open-source benchmark is that anyone can contribute; this allows MolNet to evolve and expand beyond what a single research group can support.</p><p><strong>Next Steps: Molecular ML Model Performance</strong></p><p>In the next post, we’ll discuss how to use DeepChem and MolNet scripts to add performance metrics for ML models.</p><p><strong>Getting in touch</strong></p><p><em>If you liked this tutorial or have any questions, feel free to reach out to Nathan over </em><a href="/service/mailto:n.frey@seas.upenn.edu"><em>email</em></a><em> or connect on </em><a href="https://www.linkedin.com/in/ncfrey"><em>LinkedIn</em></a><em> and </em><a href="https://twitter.com/nc_frey"><em>Twitter</em></a><em>.</em></p><p><em>You can find out more about Nathan’s projects and publications on his </em><a href="https://ncfrey.github.io/"><em>website</em></a><em>.</em></p><p><em>Thanks to Zhenqin Wu for providing feedback on this post.</em></p><p><strong>References</strong></p><p>[1] DOI: 10.1039/C7SC02664A (Edge Article) Chem. Sci., 2018, 9, 513–530</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b86960d1ee22" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/moleculenet-part-1-datasets-for-deep-learning-in-the-chemical-and-life-sciences-b86960d1ee22">MoleculeNet Part 1: Datasets for Deep Learning in the Chemical and Life Sciences</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How and why to share scientific code]]></title>
            <link>https://medium.com/data-science/how-and-why-to-share-scientific-code-64fbd385a67?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/64fbd385a67</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[scientific-research]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Thu, 15 Apr 2021 17:28:11 GMT</pubDate>
            <atom:updated>2021-04-15T18:19:03.817Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How and Why to Share Scientific Code</strong></h3><h4><em>A simple guide to reproducible research without becoming a software engineer</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*0z5Xrz4UdY9JsWgX" /><figcaption>From <a href="https://unsplash.com/photos/842ofHC6MaI">Unsplash</a>.</figcaption></figure><p>When you do an experiment, whether that’s in a lab or on a computer, you generate data that needs to be analyzed. If your analysis involves new methods, algorithms, or simulations, you probably wrote some code along the way. Scientific code is designed to be quick to write, easy for the writer to use, and never looked at again after the project is complete (maybe <em>designed</em> is a strong word).</p><p>For many scientists, packaging their code involves a lot of work and no reward. I want to share a few obvious benefits and some that are hopefully non-obvious. After that, I’ll give some tips for how to share your code as painlessly as possible without detouring into becoming a software engineer. If you want a simple example of what the finished product will look like, check out my repos for <a href="https://github.com/ncfrey/pytopomat">Python Topological Materials</a> or P<a href="https://github.com/ncfrey/pumml">ositive and Unlabeled Materials Machine Learning</a>.</p><p><strong>The benefits of sharing scientific code</strong></p><ol><li>Encourage <a href="https://www.nature.com/news/why-scientists-must-share-their-research-code-1.20504">reproducibility</a>. As soon as a method has more than one step (click the big red button) or a data analysis pipeline is more complex than “we divided all the numbers by this number,” it becomes unlikely that other scientists will be able to really explore what you did. If you developed a set of instructions to process or generate your data, you wrote a program, whether you wrote it down in code or not. It’s much more natural to share that program than to only write out what you did in your paper.</li><li>Journals increasingly require code sharing as part of the review process. Having that already done opens a lot of possibilities, like <a href="https://www.nature.com/nature-research/editorial-policies/reporting-standards#availability-of-computer-code">Nature</a> and the Nature family of journals, without requiring extra work after your paper is ready to submit.</li><li>You’ll learn a lot. If you follow my quick and easy guide below, you’ll learn foundational skills (version control), have the opportunity to learn many other useful things (package management, testing), and develop some thinking patterns (user-centered design, Agile development) that might not come up elsewhere in your research. You may even learn that some spots of your code need to be fixed up or improved once you start organizing it.</li><li>Extend the half-life of your research. You worked hard to complete a project, which will be immortalized as a static PDF document somewhere. Your code allows others to discover and interact with your work in a totally new way. Not only can other scientists build on the ideas and conclusions from your paper, they may be able to directly use the tools and methods you built to do it.</li><li>Be more employable. Educational institutions are <a href="https://www.sciencemag.org/careers/2019/03/first-us-private-sector-employs-nearly-many-phds-schools-do">no longer the biggest employers of PhDs</a>. While a personal code base might not matter much in your hunt for a faculty position, if you are headed to the private sector or even a national lab, your employers and colleagues will appreciate your skills and experience. You’ll be able to show and tell your research to data scientists and software engineers who aren’t domain experts in your area of science.</li></ol><p><strong>How to share code without becoming a software engineer</strong></p><p>Ok, now you’ve decided that for your next project, you’re going to share the scripts you wrote to process and plot your data. How do you do it without taking a hiatus from your research to learn a set of totally disjoint skills? Our goal is to share our code with minimal effort and maximal return, not to develop the next dominant data analysis or machine learning framework. Here are the steps to do so as painlessly as possible — no command line, no textbooks, just your web browser.</p><p>0. Step zero is to find help! Do your homework, read this guide, and then find someone who will answer your questions. Find someone in your group or your department who has done this before. If you can’t, find a project on <a href="https://github.com/">GitHub</a> that you like, or even better, something you used in your research, and contact the developer. Ask that person to give feedback on your plan, point you to further resources, and review your code.</p><p>1. Get started on <a href="https://guides.github.com/activities/hello-world/">GitHub</a>. Follow this <a href="https://guides.github.com/activities/hello-world/">guide</a> to learn the basics of version control. I promise that if you can analyze data with Python or Matlab, you can learn to use GitHub. Their engineering team has done a tremendous job making it easy to develop and share your project. You don’t even need to leave the web browser. If you’d like a little more control, I recommend <a href="https://desktop.github.com/">GitHub Desktop</a>.</p><p>2. Don’t reinvent the wheel. There are templates for <a href="https://github.com/NSLS-II/scientific-python-cookiecutter">scientific Python projects</a>, <a href="https://github.com/gchure/reproducible_research">reproducible research</a>, <a href="https://github.com/AndrewGYork/publication_template">writing publications</a>, and even making <a href="https://github.com/danielhomola/science_flask">web apps</a> to share your scientific code. Find a template you like and you’ll be 80% of the way towards having a nice, simple project done.</p><p>3. Write a <a href="https://blog.bit.ai/software-design-document/">design doc</a>. It doesn’t have to be fancy. Describe your project at a high level — what should the user be able to do with it? Figure out what it will include — some scripts meant to be run directly, functions, classes (if you know object-oriented programming).</p><p>4. Use the right tools. Two incredibly easy things you can do to make your code 1000% more readable are to use a “linter” like <a href="https://flake8.pycqa.org/en/latest/">flake8</a> to make sure your code follows accepted “style” conventions and a formatter like <a href="https://github.com/google/yapf">yapf</a> or <a href="https://github.com/psf/black">Python black</a>, which automatically formats your code.</p><p>5. Assemble your project. This could be as simple as copying your scripts into your GitHub repository and editing the README to describe how to use them. Follow either the <a href="https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings">Google</a> or <a href="https://numpydoc.readthedocs.io/en/latest/format.html">Numpy</a> style guide to document your code. If you want to make it extra easy for others to use your code, write a short <a href="https://jupyter.org/try">Jupyter notebook</a> or <a href="https://deepnote.com/">Deepnote</a> with some examples.</p><p>5+. Add as much “software engineering sugar” as you like. If you follow <a href="https://github.com/NSLS-II/scientific-python-cookiecutter">this template</a>, your project is already pretty well organized, and the accompanying <a href="https://nsls-ii.github.io/scientific-python-cookiecutter/index.html">guide</a> will walk you through all of the many things you can do to make your project more like “software” and less like “a jumbled mess of scripts I wrote as quickly as possible.” You can automatically generate a <a href="https://nsls-ii.github.io/scientific-python-cookiecutter/writing-docs.html">website</a> that documents your project, add <a href="https://nsls-ii.github.io/scientific-python-cookiecutter/ci.html">continuous integration</a> that tests your code any time you change it, and <a href="https://nsls-ii.github.io/scientific-python-cookiecutter/publishing-releases.html">publish official releases</a> of your project to make it easy for others to install.</p><p><strong>Don’t let perfect be the enemy of good</strong></p><p>Don’t let step 5+ stop you from sharing your code. If you share documented code, you’re already providing immense value to anyone trying to understand what you did. Even if you think your analysis or your method is really simple, it’s worth sharing. Many of the best projects are simple methods that are easy to use and understand. Put yourself in the shoes of the student who has never worked in your field before, or the scientist who has never written a Python script. You’ve spent months (or maybe years!) on this project, so while one part of it for you might be “I set this up and solved it in Mathematica” or “I used Matlab to make these plots,” that could be where the road ends for the harried undergraduate or graduate researcher who doesn’t have time to figure out and reimplement what you did.</p><p>Finally, if you’re having trouble with step 0 above because you’re going it alone, <a href="https://ncfrey.github.io/contact/">contact me</a>. I’m happy to provide an extra set of eyes or consultation.</p><p><strong>Getting in touch</strong></p><p>If you liked this post or have any questions, feel free to reach out over <a href="/service/mailto:n.frey@seas.upenn.edu">email</a> or connect with me on <a href="https://www.linkedin.com/in/ncfrey">LinkedIn</a> and <a href="https://twitter.com/nc_frey">Twitter</a>.</p><p>You can find out more about my projects and publications on <a href="https://ncfrey.github.io/">my website</a> or just read a bit more <a href="https://about.me/ncfrey">about me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64fbd385a67" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-and-why-to-share-scientific-code-64fbd385a67">How and why to share scientific code</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modeling Protein-Ligand Interactions with Atomic Convolutional Neural Networks]]></title>
            <link>https://medium.com/data-science/modeling-protein-ligand-interactions-with-atomic-convolutional-neural-networks-6be460184bae?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6be460184bae</guid>
            <category><![CDATA[biotechnology]]></category>
            <category><![CDATA[convolutional-network]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[thoughts-and-theory]]></category>
            <category><![CDATA[editors-pick]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Wed, 17 Mar 2021 16:36:08 GMT</pubDate>
            <atom:updated>2021-03-18T00:34:02.981Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://towardsdatascience.com/tagged/thoughts-and-theory">Thoughts and Theory</a></h4><h4><em>Exploit local structure of three-dimensional molecular complexes to predict binding affinities</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*U3uRj1GSy5GOCD2Q" /><figcaption>Image from <a href="https://unsplash.com/photos/eeEiys6TU3c">Unsplash</a>.</figcaption></figure><p><em>Nathan C. Frey</em></p><p><em>This post was co-authored by Bharath Ramsundar from DeepChem.</em></p><p><a href="https://arxiv.org/pdf/1703.10603.pdf"><em>ACNNs</em></a><em> learn chemical features from the three-dimensional structure of protein-ligand complexes. In this post, we show how to use the open-source implementation of </em><a href="https://deepchem.readthedocs.io/en/latest/api_reference/models.html#atomicconvmodel"><em>ACNNs in DeepChem</em></a><em> and the </em><a href="http://www.pdbbind.org.cn/"><em>PDBbind dataset</em></a><em> to predict protein-ligand binding affinities.</em></p><p><em>An </em><a href="https://github.com/deepchem/deepchem/blob/master/examples/tutorials/14_Modeling_Protein_Ligand_Interactions_With_Atomic_Convolutions.ipynb"><em>interactive tutorial</em></a><em> accompanies this post and is available to run through Google Colab.</em></p><p><strong>A complex problem</strong></p><p>A key challenge in drug discovery is finding small molecules that preferentially bind to a target protein. We can use <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3151162/">molecular docking</a> or <a href="https://www.schrodinger.com/science-articles/free-energy-methods-fep">free energy perturbation</a> calculations to predict the binding affinity of candidate molecules, but these techniques are computationally intensive and require a good deal of expertise to apply. In this post, we show how to apply the powerful idea of <a href="https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53?gi=2baa37536a10">Convolutional Neural Networks</a> or ConvNets to 3D atomic coordinates to directly learn chemical features and predict binding affinities. We’ll walk through how an Atomic ConvNet works, how to quickly get a dataset of protein-ligand complexes, and train a model to predict binding affinities — all using the open-source library, <a href="https://deepchem.readthedocs.io/en/latest/">DeepChem</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YJmcJiAY3xK5Ldmj" /><figcaption>Image by Thiago Reschützegger from <a href="https://forum.deepchem.io/t/refreshing-the-deepchem-logo/343/14">DeepChem forums</a>.</figcaption></figure><p><strong>What is an Atomic ConvNet?</strong></p><p>ACNNs were introduced in <a href="https://arxiv.org/abs/1703.10603">this paper</a> [1] by Joseph Gomes, Bharath Ramsundar, Evan Feinberg, and Vijay Pande. First, let’s break down the architecture of an ACNN. The building blocks of the ACNN are two primitive convolutional operations: atom-type convolution and radial pooling. The Cartesian atomic coordinates of the molecules, <em>X</em>, are used to construct the distance matrix, <em>R</em>. The elements of <em>R</em> are the distances between neighboring atoms for some maximum number of nearest neighbors for an atom. An atom-type matrix, <em>Z</em>, is also constructed to list the atom numbers of neighboring atoms.</p><p><em>R</em> is fed into a filter with depth <em>Nat, </em>where<em> Nat </em>is the number of unique atom types in the complex<em>. </em>The atom-type convolutional kernel is a step function that operates on <em>R</em> and produces a one-hot encoding of the atom type into separate copies of the distance matrix for each atom type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/0*igo4Z7bSxh0DIXfa" /><figcaption><em>3D atomic coordinates and atom types are inputs to the atom-type convolution. Image by Joseph Gomes from </em><a href="https://arxiv.org/pdf/1703.10603.pdf"><em>Gomes, et al</em></a><em>.</em></figcaption></figure><p>Next, the outputs from atom-type convolutions are down-sampled with radial pooling layers. This form of dimensionality reduction prevents overfitting and reduces the number of learned parameters. Radial pooling layers apply a radial filter (pooling function) with learnable parameters. We can think about radial pooling as a featurization that sums pairwise-interactions between an atom and all neighboring atoms with different atom types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jdBdSidhMjxCwkgp" /><figcaption><em>Outputs from atom-type convolution are fed to a radial pooling layer. Image by Joseph Gomes from </em><a href="https://arxiv.org/pdf/1703.10603.pdf"><em>Gomes, et al</em></a><em>.</em></figcaption></figure><p>Atomic convolution layers (atom-type convolution + radial pooling) can be stacked by flattening the outputs of the radial pooling layer and feeding them into another atom-type convolution. The final tensor output is fed row-wise (per-atom) into a fully-connected network to predict the “energy” of each atom. By adding up the energies for each atom, the total energy of a molecule is predicted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/0*vmyq7n7h7NMnCvwz" /><figcaption><em>Fully-connected layers produce a scalar output. Image by Joseph Gomes from </em><a href="https://arxiv.org/pdf/1703.10603.pdf"><em>Gomes, et al</em></a><em>.</em></figcaption></figure><p>This allows for an interesting interpretation of the outputs, where the binding energy is calculated as ACNN(complex) - ACNN(protein) - ACNN(ligand). It’s also possible to decompose the contributions of each atom to the binding energy by taking the difference between the energy evaluated by the ACNN for an atom in a free-standing molecule and the same atom in the complex. It’s important to note that the input dimension only depends on the number of features (number of atom types and radial filters), not the number of atoms in a molecule, so the ACNN generalizes to systems that are larger than those in the training set.</p><p><strong>Protein-ligand complex data from PDBbind</strong></p><p>Now that we understand the basics of an ACNN, let’s get a dataset of molecules to work with and start training models! We’ll use the “core” set of high-quality protein-ligand complexes and measured binding affinities from <a href="http://www.pdbbind.org.cn/">PDBbind</a> [2]. Thanks to the <a href="https://deepchem.readthedocs.io/en/latest/api_reference/moleculenet.html#pdbbind-datasets">loader function</a> in MoleculeNet, we can retrieve training, validation, and test sets from PDBbind with a single line of python code. To minimize the computational burden, we only featurize the protein binding pockets (rather than entire proteins) and we consider only the ~200 complexes in the core set. If we want to consider the much larger “refined” or “general” sets from PDBbind, we simply change <strong>set_name</strong> in <strong>load_pdbbind()</strong>.</p><pre>tasks, datasets, transformers = load_pdbbind(featurizer=acf,</pre><pre>pocket=True,</pre><pre>set_name=’core’)</pre><p>The dataset of 3D atomic coordinates is featurized using an <strong>AtomicConvFeaturizer</strong>, which pre-computes features (coordinate matrix, atom-type matrix, and neighbor list) for the protein, ligand, and the complex. The featurizer controls how many atoms will be considered in each molecule and the maximum number of neighbors considered for each atom.</p><p><strong>Training an ACNN on protein-ligand complexes</strong></p><p>We’ll set up an ACNN model with similar hyperparameters to the model from the original paper.</p><pre>acm = AtomicConvModel(n_tasks=1,</pre><pre>frag1_num_atoms=f1_num_atoms,</pre><pre>frag2_num_atoms=f2_num_atoms,</pre><pre>complex_num_atoms=f1_num_atoms+f2_num_atoms,</pre><pre>max_num_neighbors=max_num_neighbors,</pre><pre>batch_size=12,</pre><pre>layer_sizes=[32, 32, 16],</pre><pre>learning_rate=0.003,</pre><pre>)</pre><p>Here, we pay attention to <strong>layer_sizes</strong>, which controls the number and size of the dense layers in the fully-connected network. The other parameters related to the number of atoms are equal to the inputs we specified for <strong>AtomicConvFeaturizer</strong>. We’ll keep the default number of 15 atom types and 3 radial filters.</p><p>We train the model for 50 epochs and visualize the loss curves. Unsurprisingly, they aren’t particularly smooth. Using a larger dataset might help with this, but this is a starting point for rapidly prototyping a binding affinity prediction model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/0*fKPMGFrj4GTL69KB" /><figcaption><em>Training and validation loss over 50 epochs for the core PDBbind set. Image by author.</em></figcaption></figure><p><strong>Predicting binding affinities</strong></p><p>The original ACNN paper used a random 80/20 train/test split on the core PDBbind dataset. They showed Pearson R² values of 0.912 and 0.448 on the training and test sets, respectively, for predicting binding affinity. Our simple model achieves similar performance on the training set (0.944), but doesn’t do too well on the validation (0.164) or test (0.250) sets. This is expected, because the original paper showed that, while ACNNs succeed in learning chemical interactions from small datasets, they are prone to overfitting and fail to generalize outside the training set.</p><p>There are many things we can (and should!) experiment with to build a more robust model: adding regularization/dropout, using a larger dataset and a larger fully-connected network, changing the number of atom types and radial filters, and trying different splits. We might even be able to do pretty well by featurizing <a href="https://doi.org/10.3389/fphar.2020.00069">only the ligands</a> and ignoring the binding pockets completely!</p><p>It’s pretty remarkable that we can get a dataset of protein-ligand complexes and <a href="https://github.com/deepchem/deepchem/blob/master/examples/tutorials/14_Modeling_Protein_Ligand_Interactions_With_Atomic_Convolutions.ipynb">train a fairly sophisticated deep neural net</a> to predict a complicated physical quantity like binding energy in less than 15 minutes! However, predicting binding affinities remains a challenging problem, whether we use deep learning methods like ACNNs or physics-based simulations. For an overview of more machine learning methods for protein-ligand interaction prediction, check out this <a href="https://medium.com/whats-next-in/speeding-up-drug-discovery-with-machine-learning-for-protein-ligand-interaction-prediction-95cfe52c6998">helpful post</a>. Hopefully, open-source tools like <a href="https://deepchem.readthedocs.io/en/latest/api_reference/models.html#atomicconvmodel">ACNNs in DeepChem</a> will make it easier for researchers to experiment with deep learning and develop even better methods for modeling protein-ligand interactions.</p><p><strong>Getting in touch</strong></p><p><em>If you liked this tutorial or have any questions, feel free to reach out to Nathan over </em><a href="/service/mailto:n.frey@seas.upenn.edu"><em>email</em></a><em> or connect on </em><a href="https://www.linkedin.com/in/ncfrey"><em>LinkedIn</em></a><em> and </em><a href="https://twitter.com/nc_frey"><em>Twitter</em></a><em>.</em></p><p><em>You can find out more about Nathan’s projects and publications on his </em><a href="https://ncfrey.github.io/"><em>website</em></a><em>.</em></p><p><em>Thanks to </em><a href="https://thegomeslab.github.io/"><em>Prof. Joe Gomes</em></a><em> for providing feedback on this post.</em></p><p><strong>References</strong></p><p>[1] Joseph Gomes, Bharath Ramsundar, Evan N. Feinberg, Vijay S. Pande. Atomic Convolutional Networks for Predicting Protein-Ligand Binding Affinity. <a href="https://arxiv.org/abs/1703.10603">arXiv:1703.10603</a>.</p><p>[2] R. Wang, X. Fang, Y. Lu, S. Wang. The PDBbind Database: Collection of binding affinities for protein−ligand complexes with known three-dimensional structures. <em>Journal of Medicinal Chemistry</em>, 47(12):2977–2980, 2004.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6be460184bae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/modeling-protein-ligand-interactions-with-atomic-convolutional-neural-networks-6be460184bae">Modeling Protein-Ligand Interactions with Atomic Convolutional Neural Networks</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Materials Science?]]></title>
            <link>https://ncfrey.medium.com/what-is-materials-science-f87520526497?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f87520526497</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[biology]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[materials-science]]></category>
            <category><![CDATA[chemistry]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Mon, 15 Feb 2021 19:05:43 GMT</pubDate>
            <atom:updated>2021-02-15T19:05:43.512Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why materials science is a mystery to most people and why it’s important</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*bqRN_QmXDwMwL_Ur" /><figcaption>From <a href="https://unsplash.com/photos/49uySSA678U">Unsplash</a></figcaption></figure><p>When I (used to) get a haircut or take an Uber, the #1 question I got is the same one everyone else gets: “What do you do?” If I’m feeling really adventurous, I might say “I’m a graduate student studying materials science.” I’m never feeling really adventurous. It is extremely unlikely that the person I’m talking to will have heard of materials science as a field of study, even though the name is pretty descriptive and self-explanatory. It’s much easier to say “physics” or “chemistry.” Even if my conversation partner isn’t exactly sure what a physics graduate student does, they at least have an <em>impression</em> about what physics is. Almost no one outside of science has heard of materials science (although there are probably more people working in materials science than any field other than biology). I have a few ideas about why that is, how to change it, and why it’s important to do so.</p><p><strong>The materials science PR problem</strong></p><ol><li>The first rule of materials science club is that you don’t talk about materials science club. Materials scientists do not self-promote to the same degree that physicists do. If you have an interest in pop science, you recognize Carl Sagan and Stephen Hawking, but you’ve never heard of <a href="https://www.nobelprize.org/prizes/physics/1956/bardeen/biographical/">John Bardeen</a> or <a href="https://www.fi.edu/laureates/mildred-s-dresselhaus">Mildred Dresselhaus</a>.</li><li>Almost everyone takes chemistry in high school and many people take physics, or at least know that some of their peers are in a class studying how balls roll down hills. I’ve never heard of a high school offering a materials science course.</li><li>Many universities don’t have a dedicated materials science department and many of those that do were, until recently, called “metallurgy.” It’s also typical to have materials science departments as subsidiaries of larger, better known departments like physics or mechanical engineering. Few majors require materials science coursework, whereas all STEM majors take introductory physics and chemistry.</li><li>Even materials scientists don’t know what materials science is. Few professors have actual degrees in “materials science” (see #3 above) — they have a physics, chemistry, or engineering background — and their definition of materials science is completely dependent on their own research interests.</li><li>Materials science is inescapably interdisciplinary. It can involve elements of physics, chemistry, biology, and engineering. When everyone knows the fundamental ingredients, it might seem like overkill to define this new thing combining them together.</li></ol><p><strong>The interdisciplinary science</strong></p><p>The only math I’m going to introduce in this post is this equation I just made up:</p><pre>materials science = a*physics + b*chemistry + c*biology + d*engineering, (1)</pre><pre>a + b + c + d = 100%. (2)</pre><p>So <em>a, b, c, </em>and <em>d, </em>are just percentages that add up to 100%. All this says is that, depending on what sort of materials science you do, your work is a sprinkling of physics, a dash of chemistry, possibly a dose of biology, with some engineering sauce on top. My PhD work is probably something like: a=70%, b=20%, d=10%, because I mostly care about physics, but I need to do enough chemistry to understand (at a basic level) how someone might make the things I’m studying, and I inject a little engineering because I hope that someday my work might help make new devices.</p><p>Someone designing new batteries might be: a=10%, b=50%, d=40%, and someone working on synthetic, biocompatible heart valves could be a=10%, b=10%, c=50%, d=30%. These are all totally made up estimates to give the impression that materials science can really be any combination of these ingredients that you like.</p><p>Increasingly, there are very few scientists who would say they work on 100% physics or 100% biology, etc. It’s more common to do some interesting combination of things, because that’s where there are new things to discover. Fields like biophysics, biochemistry, neuroscience, and nanotechnology are booming, because you synthesize knowledge from many different fields to make progress.</p><p>Materials science is then, in many ways, ahead of the curve. Departments are on the smaller side and relatively young, but this interdisciplinary approach is baked in at the start. It is encouraged to be interested in many different topics and ask seemingly simple questions like, “What would happen if I stuck thing A that I learned about in organic chemistry to thing B that I learned about in mechanical engineering?” These sorts of questions often lead to the best sorts of discoveries.</p><p>What is the best way to prepare to do this kind of interdisciplinary science? Just like when we try to define materials science, you’ll get as many answers as people you ask. One option is to study materials science from the beginning and get a head start on this way of thinking. Other options might be to focus on a more <a href="https://www.aps.org/programs/education/whystudy.cfm">fundamental</a> (physics), <a href="https://www.nature.com/articles/s41557-019-0308-8">“central”</a> (chemistry), or <a href="https://onezero.medium.com/why-the-21st-century-will-be-defined-by-biology-fdb4da2edfd5">21st century</a> (biology) science. Build up a solid foundation in the area that appeals most to you. At the same time, practice communicating across disciplines. There are huge communication barriers between scientific communities, and I believe that there are incredible discoveries waiting for scientists who can bridge these gaps.</p><p><strong>Getting in touch</strong></p><p>If you liked this post or have any questions, feel free to reach out over <a href="/service/mailto:n.frey@seas.upenn.edu">email</a> or connect with me on <a href="https://www.linkedin.com/in/ncfrey">LinkedIn</a> and <a href="https://twitter.com/nc_frey">Twitter</a>.</p><p>You can find out more about my projects and publications on <a href="https://ncfrey.github.io/">my website</a> or just read a bit more <a href="https://about.me/ncfrey">about me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f87520526497" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started in Materials Informatics]]></title>
            <link>https://medium.com/data-science/getting-started-in-materials-informatics-41ee34d5ccfe?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/41ee34d5ccfe</guid>
            <category><![CDATA[materials-science]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[resources]]></category>
            <category><![CDATA[editors-pick]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Wed, 20 Jan 2021 13:11:53 GMT</pubDate>
            <atom:updated>2021-01-20T13:11:53.589Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>How to get started doing research in materials informatics (data science + materials science)</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZnbMtObFk0JqWrVY" /><figcaption><em>Understand structure — property — performance — processing relationships in materials with data science. From Wikimedia Commons.</em></figcaption></figure><p><em>In this post I share resources and recommendations for getting involved in materials informatics research. As it becomes increasingly more expensive and time-consuming to discover and engineer new materials to address some of our most pressing global challenges (human health, food and water security, climate, etc.), we need materials scientists with scientific domain expertise and training in data science. Whether you want to use data science in your own research or simply have a better understanding of the state of play in the field, this post will help you on your way.</em></p><p>I’ve shared a <a href="https://github.com/ncfrey/resources">list of resources</a> on GitHub for getting started with materials informatics. The list includes papers and interactive tutorials, helpful Python libraries, blogs, newsletters, podcasts, databases, and academic materials informatics research groups.</p><p><strong>What is materials informatics?</strong></p><p>Informatics is the science of transforming information (data). In a sense, all materials science involves informatics because all materials science is built on data and theory that explains the data. By “materials informatics,” we specifically mean materials science that is superpowered by modern data science. This lets us<a href="https://www.nature.com/articles/d41586-020-03259-4"> accelerate material property prediction</a>, conduct systematic searches through the space of possible materials to <a href="https://www.annualreviews.org/doi/10.1146/annurev-matsci-090319-010954">discover compounds</a> with optimized properties, and even <a href="https://newscenter.lbl.gov/2020/12/02/a-machine-learning-solution-for-designing-materials-with-desired-optical-properties/">design new materials</a> based on the properties we want.</p><p>Experimental scientists can use materials informatics to <a href="https://www.sciencedaily.com/releases/2020/03/200310114711.htm">reduce the time and effort</a> they spend in the lab on trial-and-error experiments; while computational scientists and theorists can provide better <a href="https://pubs.acs.org/doi/abs/10.1021/acsnano.8b08014">guidance on what materials to make</a>, <a href="https://www.nature.com/articles/s41524-017-0055-6">how to make them</a>, and <a href="https://pubs.acs.org/doi/abs/10.1021/acsnano.0c05267">how to understand their properties</a>. The more you understand data science and machine learning, the clearer it will be that these are tools for efficient science, not replacements for scientists and scientific thinking.</p><p><strong>Prerequisites</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/0*e_7NFh4VhOsWJ4Rq" /><figcaption><em>Data science prerequisites: glasses, lots of monitors, night mode text editors. From Unsplash.</em></figcaption></figure><p>I’m assuming that interested readers are already working in some domain of materials science: nanomaterials, polymers, metallurgy, biomaterials, or quantum materials. To do research in (or develop an appreciation for) materials informatics, you need to start with a basic foundation in data science: <a href="https://towardsdatascience.com/theoretical-foundations-of-data-science-should-i-care-or-simply-focus-on-hands-on-skills-c53fb0caba66">statistics</a>, a scientific computing language like Python or Julia with associated numerical computing capabilities and data structures, machine learning, and storytelling with data (visualization).</p><p>The good news is that if you’re a scientist, you probably have a lot of the necessary background. More good news is that there has never been a better time to learn data science — there are tons of free courses, tutorials, and blogs to learn from. In some ways the most challenging thing can be to filter through all those resources and find the best ones. There are plenty of <a href="https://towardsdatascience.com/how-to-get-started-in-data-science-af865b3d5231">guides to getting started with data science</a>.</p><p>Depending on your learning style, you might want to start with a bottom-up approach reading textbooks and implementing methods from scratch, or a top-down approach where you pick a fun problem in your own research or a simple problem from <a href="https://www.kaggle.com/">Kaggle</a> and start hacking away, learning as you go.</p><p><strong>Into the rabbit hole</strong></p><p>If you want a brief technical introduction to materials informatics, you can start with the resources listed <a href="https://github.com/ncfrey/resources#getting-started">here</a>. From a detailed definition of materials informatics, to formalized best practices, interactive tutorials, and a three day workshop, this handful of resources will help you get started as fast as possible.</p><p>If you’re interested in keeping up with the field, either as a practitioner or a casual observer, there’s a collection of <a href="https://github.com/ncfrey/resources#blogs-newsletters-and-podcasts">blogs, podcasts, and newsletters</a> to help you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*53vNmDNuHqjqNFwZ" /><figcaption><em>Pictured here: you after supercharging your research with materials informatics. From Unsplash.</em></figcaption></figure><p><strong>Tools of the trade</strong></p><p>Once you’re ready to start doing your own research in materials informatics, it helps to make use of the many amazing <a href="https://github.com/ncfrey/resources#python-tools">open-source projects</a> already available. Python is the programming language of choice in the field, and the Jupyter notebook environment is the virtual laboratory for doing materials informatics. With those tools as the substrate, there are entire software ecosystems for generating and analyzing calculated materials data, building machine learning pipelines for predicting properties and designing new materials, visualizing materials data, and sharing your research in a machine-readable way.</p><p>A key principle to strive for is to make sure your data is Findable, Accessible, Interoperable, and Reusable (FAIR). In other words, make it easy for other scientists to use your data for materials informatics! Luckily, there are <a href="https://github.com/ncfrey/resources#visualization-data-sharing-and-discovery">great frameworks</a> available for making clear visualizations of your data and sharing it in a way that makes it explorable through a web interface and a Python API.</p><p><strong>It’s all about the data…</strong></p><p>The first commandment of data science is “garbage in, garbage out.” It all comes down to obtaining a great data source with some kind of signal, processing it, and applying the Swiss Army knife of available tools to extract some insights. No machine learning method will be able to provide meaningful outputs if that first step is missing: a quality data source. Heroic folks across the world have gone to a lot of trouble calculating and measuring properties for many hundreds of thousands of materials and making that data easily available in <a href="https://github.com/ncfrey/resources#databases">databases</a>.</p><p>Even now, most materials data, which takes an enormous amount of labor and resources to generate, is locked away in figures, tables, and text in PDFs. There are <a href="https://www.matscholar.com/">ongoing efforts</a> to parse PDFs and mine the data, but you can make an immediate impact within your own research group and your field by contributing your data to a database and making it FAIR.</p><p><strong>…and the questions</strong></p><p>The zeroth commandment of data science is “ask the right questions.” Data science can’t tell you what your research direction should be. It remains the chief job of the scientist to figure out what the most interesting questions are to ask and investigate. Hopefully, by using <a href="https://github.com/ncfrey/resources">these resources</a>, you’ll gain a better understanding of what materials informatics can and can’t do.</p><p><strong>Materials informaticians</strong></p><p>To help students, postdocs, and faculty find all the awesome groups working in this field, I’ve started a short list of <a href="https://github.com/ncfrey/resources/blob/main/groups.md">materials informatics groups</a> (in no particular order). These groups focus on totally different areas of materials science, with the common theme that they use theory, computation, and data science in some capacity. If you work with a materials informatics group and would like to be added to the list, <a href="https://github.com/ncfrey/resources/blob/main/CONTRIBUTING.md">let me know</a>!</p><p><strong>Contributions welcome!</strong></p><p>I’d love your feedback! The list of resources isn’t meant to be comprehensive, instead, it’s a curated collection of things I’ve found useful in my own work. There are a lot of cutting-edge methods that I’ve omitted (e.g., quantum machine learning, <a href="https://e3nn.org/">equivariant neural networks</a>) because they aren’t quite at the maturity level needed for day-to-day use and they aren’t really appropriate for the “getting started” level. If there is a materials informatics resource with some functionality that isn’t covered by anything in the list, feel free to read the <a href="https://github.com/ncfrey/resources/blob/main/CONTRIBUTING.md">contributions guide</a> and share it with me. I’d also like to acknowledge Pat Walters’ excellent <a href="https://github.com/PatWalters/resources/blob/main/cheminformatics_resources.md">list of resources for cheminformatics</a>, which inspired this list.</p><p><strong>Getting in touch</strong></p><p>If you liked this post or have any questions, feel free to reach out over <a href="/service/mailto:n.frey@seas.upenn.edu">email</a> or connect with me on <a href="https://www.linkedin.com/in/ncfrey">LinkedIn</a> and <a href="https://twitter.com/nc_frey">Twitter</a>.</p><p>The full list of resources is available <a href="https://github.com/ncfrey/resources">here</a> on GitHub.</p><p>You can find out more about my projects and publications on <a href="https://ncfrey.github.io/">my website</a> or just read a bit more <a href="https://about.me/ncfrey">about me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41ee34d5ccfe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/getting-started-in-materials-informatics-41ee34d5ccfe">Getting Started in Materials Informatics</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quantum MOMs]]></title>
            <link>https://ncfrey.medium.com/quantum-moms-d18268bc0be8?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d18268bc0be8</guid>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[topology]]></category>
            <category><![CDATA[magnetism]]></category>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Mon, 14 Dec 2020 17:34:03 GMT</pubDate>
            <atom:updated>2020-12-14T17:39:21.314Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Searching for materials with multiple quantum properties</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*s7Ji1Zgwmlq6Pr1K" /><figcaption>Looking for “spin” in quantum materials. From <a href="https://unsplash.com/photos/zcYRw547Dps">Unsplash</a>.</figcaption></figure><p>What is a MOM? Patient, supportive, loving…no, not quite, in the cold world of materials physics, a MOM is a multi-order material. That means a material with two or more quantum “orders,” where electrons in the material are organized in some way because of quantum mechanics. We call them “orders” because common examples include things like magnetism, an effect caused by electrons in a material “ordering” and all pointing in the same direction. So your refrigerator magnets have quantum order!</p><p><strong>MOM: Multi-order material</strong></p><p>In this <a href="https://advances.sciencemag.org/content/6/50/eabd1076"><em>Science Advances</em> paper</a>, we simulated materials on a supercomputer and discovered materials that have two or more interesting quantum properties. Having two quantum effects that coexist in the same material means that we can control one effect by manipulating the other, and vice-versa. That’s like having a soundboard installed directly in the material, with switches and knobs that we can play with to engineer its behavior and make new devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*R9gwF3_GY1GMk0oP" /><figcaption>Quantum MOMs have knobs and sliders for controlling quantum properties. From<a href="https://search.creativecommons.org/photos/34950412-6328-42a7-a7f0-c114a286af58"> Creative Commons</a>.</figcaption></figure><p>In our paper, we focused on two specific types of quantum order. One I already mentioned: magnetism. The other is <em>topological order</em> — which is a way of classifying materials that have properties so robust that you can’t destroy them, unless you rip the material apart. Imagine if an elephant dropped on your car and crushed it, but it kept running, and it wouldn’t stop running unless you cut it clean in half. Topological materials are kind of like that.</p><p><strong>No more traffic</strong></p><p>One of the coolest things that topological order can give is a “surface state.” A topological material with surface states is insulating on the inside (like wood), but conducting on its surface (like copper wire). And the electricity on the surface can only go forward in specific lanes, never backwards. Now imagine that your car is on the highway and every time you inevitably run into construction or an accident, there’s a perfect detour in place, so you never have to slow down and you never hit traffic. Compare that situation to a non-topological material, where electricity is trudging along, bumping into things, always hitting construction and slow-downs. That’s actually what the situation is like for normal metals like copper and iron.</p><p>Ok so why would you want something that is both magnetic and topological? Well, say you have a surface state in a material <em>and</em> it has its own magnetic field — the magnetic field aligns all the electrons in the same direction, and the surface state makes sure that electricity only conducts in one direction. Maybe Amazon is trying to get delivery vans from point A to point B, but some of them are going forwards and some are going backwards. It would be much easier if everyone was headed in the same direction — that’s how magnetic topological MOMs conduct electricity.</p><p>In materials, we usually only see these kinds of interesting quantum effects at really low temperatures, and it’s expensive to keep things cold all the time. Magnetism and topology can both operate at room temperature though, so there’s hope this kind of effect could be used in new technologies in day-to-day life.</p><p><strong>Virtual screening</strong></p><p>If this sounds complicated and hard, that’s because it is! We’re hunting for materials with these exotic quantum properties, and not just one, but multiple types. Luckily, the <a href="https://materialsproject.org/about">Materials Project</a> database has over 130,000 material structures already available for us to search through. We can narrow down that list to materials that have elements like iron in them, because we expect them to be magnetic. Still, there are over 30,000 materials to consider even if we only pick out ones that are likely to be magnetic <em>and </em>have oxygen in them.</p><p>It would be great if there was a laboratory that could grow 30,000 crystals and measure their magnetic and topological properties, but that would take more time and money than anyone has, and most of the materials would be duds or not even possible to make. Fortunately, it’s also unnecessary.</p><p>We took a portion of the materials from the database (around 3,000) and simulated all the most likely types of magnetism for them to see what kinds of magnetic materials we could find. Then we took the most interesting ones and calculated their topological properties.</p><p>After all that work, we found 18 potential quantum MOMs! Screening the database like this was completely virtual — everything happened with simulations on a supercomputer. Now those candidate materials can be studied further with more detailed calculations, or other scientists may even try to grow them in a lab and measure their properties. 18 is a much more manageable number than 30,000.</p><p><strong>Zooming out and zooming in</strong></p><p>We also used our calculations and other <a href="https://www.nature.com/articles/s41586-020-2837-0">recently published calculations</a> to train machine learning models to predict quantum properties without requiring huge supercomputers. There are still tens of thousands of other magnetic materials to consider, so hopefully machine learning will provide some guidance on where to look next. We also suspect that there are many more interesting quantum MOMs lurking in our data that we haven’t had a chance to look at yet.</p><p>The nature of this kind of virtual screening also means that no one material gets any more attention than the rest. To deeply understand the properties of any particular material, much more work needs to be done.</p><p><strong>A new kind of -tronics</strong></p><p>The big picture for this kind of work might involve eventual applications in the field of “<a href="https://phys.org/news/2019-06-d-spintronics-dimensions.html">spintronics</a>.” Roughly speaking, spintronics is the idea that in the future we’ll surpass modern electronics by making devices that use the direction that electrons point as well as their electric charge. Every electronic device around you uses electric charge to do useful things; but electrons have many other properties and it seems obvious that we should be trying to exploit them too. Quantum MOMs are perfect candidates for spintronics, because that’s what they do — move electrons quickly in specific directions, while controlling the direction the electrons point.</p><p>Spintronics aren’t the only <a href="https://en.wikipedia.org/wiki/List_of_emerging_technologies#Electronics">new kind of -tronics</a> that scientists are pursuing. In the race to beat modern electronics, which have been more or less the same for many decades, there seems to be a new “-tronics” in the news every week. But most of them have one thing in common — they’re built with quantum MOMs.</p><p><strong>Getting in touch</strong></p><p>If you liked this explainer or have any questions, feel free to reach out over <a href="/service/mailto:n.frey@seas.upenn.edu">email</a> or connect with me on <a href="https://www.linkedin.com/in/ncfrey">LinkedIn</a> and <a href="https://twitter.com/nc_frey">Twitter</a>.</p><p>If you’re interested in more technical details, you can read the paper <a href="https://advances.sciencemag.org/content/6/50/eabd1076">here</a> and check out the data and trained models on <a href="https://github.com/ncfrey/magnetic-topological-materials">GitHub</a> and the <a href="https://materialsproject.org/">Materials Project</a>.</p><p>You can find out more about my projects and publications on <a href="https://ncfrey.github.io/">my website</a> or just read a bit more <a href="https://about.me/ncfrey">about me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d18268bc0be8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Positive and Unlabeled Materials Machine Learning]]></title>
            <link>https://medium.com/data-science/positive-and-unlabeled-materials-machine-learning-8b216edea899?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b216edea899</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[materials]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[nanotechnology]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Wed, 18 Nov 2020 20:28:12 GMT</pubDate>
            <atom:updated>2020-11-18T20:28:12.281Z</atom:updated>
            <content:encoded><![CDATA[<h4>How semi-supervised learning is used to accelerate materials synthesis</h4><p><em>Nathan C. Frey</em></p><p><em>This post was co-authored with Vishnu Harshith from IIT Madras</em></p><p><em>Many real-world problems involve datasets where only some of the data is labeled and the rest is unlabeled. In this post, we discuss our implementation of semi-supervised learning for predicting the synthesizability of theoretical materials.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*204UXhnjQMdhreUG" /><figcaption>From <a href="https://unsplash.com/photos/5PEy9UraJ5c">Unsplash</a>.</figcaption></figure><p>When we think about the materials that will enable next-generation technologies, it’s probably not the case that there is one ultimate material waiting to be found that will solve all our problems. The problems we need to solve (producing and storing clean energy, mitigating climate change, desalinating water, etc.) are complex and varied.</p><p>Even zooming in to the next-generation of electronics, computers, and nanotechnology, there probably isn’t a single perfect material to exploit in the same way that silicon has been used in all our familiar devices. We’re also assuming that we don’t currently have all the materials and technology that we need to solve these problems, because we’re not exactly living in a Star Trek future just yet.</p><p>The solution is targeted searches to identify the best materials candidate(s) for the application of interest. We’re now pretty good at simulating materials on the computer and getting an idea about whether a certain material can do what we want it to. We can even invent new, hypothetical materials and predict their properties.</p><p>Let’s say we invent a wonder material and think that, based on our simulations, it might be pretty cool. The next step is to go, hat in hand, to a friend in a laboratory and ask them nicely to try to make the thing. If the material is very similar to something else they’ve made, that might be easy. In general though, we have no idea what can be made in the lab. Synthesizing new materials is an expensive and time-consuming process that relies heavily on trial and error and “intuition,” i.e. senior scientists who have built a memory bank of what seems to work and what doesn’t. This is the Thomas Edison model of failing 1,000 times and hoping your eventual invention justifies all that effort. It seems there’s an opportunity to do a bit better.</p><p><strong>Finding Mona Lisa materials</strong></p><p>Our idea was to see if we could train a machine learning model to develop this sort of “intuition” by feeding it examples of materials that have been synthesized. We call these <strong>positive</strong> samples. All the other materials we dream up are <strong>unlabeled</strong> because we don’t know if they can be made or not. In this <a href="https://medium.com/penn-engineering/penn-engineers-new-machine-learning-approach-predicts-which-2d-materials-can-be-synthesized-dcaf4079193">interview</a> we compared the situation to detecting forged paintings. If a model sees many examples of original paintings (real, synthesized materials), it should be able to recognize an original versus a forgery (an unrealistic material that isn’t quite right and can’t be easily synthesized) when we show it something new.</p><p>We’re particularly interested in two-dimensional (2D) materials, so in our study we focused on a family of 2D materials called MXenes. The import thing to know is that MXenes are great because they 1) have tons of interesting properties; 2) can be made up of all kinds of elements from the periodic table so there are a lot of them; and 3) look really cool under a microscope.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*4oEQuPvxLisVqpmU" /><figcaption>Electron microscope image of MXene. From <a href="https://commons.wikimedia.org/wiki/File:SEM_of_MXene.png">Wikimedia Commons</a>.</figcaption></figure><p>Unfortunately, even though there are lots of possible MXenes, it is still time-consuming and expensive to discover new ones, so we don’t have as many positive examples as we would trying to classify paintings. This is a persistent problem in materials science: it is expensive and sometimes impossible to collect more data. So we started by looking at MAX materials, which are the 3D version of MXenes, where we have more examples of things that have already been made.</p><p><strong>How it works</strong></p><p>To deal with all these positive and unlabeled examples, we adapted a framework that is unsurprisingly called “<a href="http://datascienceninja.com/2019/09/29/positive-unlabeled-pu-learning-methods-to-learn-from-positive-and-unlabeled-examples/">positive and unlabeled learning</a>” (PU learning) [1]. This sort of approach is more useful than you might think — it turns out lots of problems can be framed this way. Imagine you’re a data scientist and you have a list of customers who have bought your product (positive examples) and a list of potential customers who might or might not buy your product (unlabeled examples). Or maybe you’re a biologist with a list of proteins with some interesting characteristics, but you have no idea if other proteins have those properties or not.</p><p>Somehow you need to take what you know from the positive examples and apply that to all the unlabeled ones. In simple terms, with PU learning some unlabeled examples will randomly be labeled “negative.” Then a machine learning model — a <a href="https://medium.com/greyatom/decision-trees-a-simple-way-to-visualize-a-decision-dc506a403aeb">decision tree</a> classifier in our case — is trained to classify the positive and negative examples. The decision tree is made up of nodes, where each node represents an ‘if-then’ rule that splits the data according to its features. To augment the data we used <a href="https://towardsdatascience.com/an-introduction-to-the-bootstrap-method-58bcb51b4d60">bootstrapping</a>, where samples are drawn from the data with replacement to create random subsets of the original data. This is repeated with different random sets of negative examples until the classifier becomes good at recognizing the positive examples. The model should “learn” the characteristics of the positive samples and be able to identify other positive samples in the unlabeled data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*sofXlZLAZSdJkgkL" /><figcaption>Image by author</figcaption></figure><p>We calculated a bunch of properties for all the materials we were interested in, built and trained a <a href="https://roywrightme.wordpress.com/2017/11/16/positive-unlabeled-learning/"><strong>positive </strong>and <strong>unlabeled</strong> machine learning model</a> to recognize what is special about the synthesized materials, and then predicted which new materials should be synthesizable. Our model learned to use some information that we already know is a good indicator of synthesizability, like how much the atoms want to be bonded together. That’s good, because the model needs to be at least as good as our basic intuition that comes from physics and chemistry. But the model also found patterns in how the atoms are arranged, and how electrons are distributed in the material. More than that, the model makes decisions based on many more properties than we could reasonably think about at one time.</p><p>So first we make sure that the model captures the things we know it needs to capture from physics and chemistry, which agrees with our human drive to simplify things and explain things with one or two important factors. But we also make sure it’s doing something that we humans are bad at — looking at a more granular level of detail and considering hundreds of materials in seconds.</p><p>Our model found 18 new MXenes that we think should be synthesizable [2]. These 2D materials might have properties we haven’t seen before, and they could be used in next-generation batteries or electronic devices.</p><p><strong>Classifying everything in the Materials Project database</strong></p><p>Since we are now at a stage where we can determine whether a given compound is synthesizable or not, the next question is, can we make predictions without having to generate lots of data about each theoretical material? Can we instead determine the synthesizability of a compound by knowing only its formula or crystal structure?</p><p>To tackle this problem, we needed vast amounts of data. Luckily, <a href="https://materialsproject.org/">The Materials Project</a> database contains more than 131,000 inorganic compounds and 49,000 molecules. We separated the compounds into two major categories: <em>f</em>-Block compounds with <em>f</em> electrons and non-<em>f</em>-block compounds with no <em>f </em>electrons. This separation was done primarily because <em>f </em>electrons sometimes exhibit strange behavior and are hard to describe. We used <a href="https://matminer.readthedocs.io/en/latest/">Matminer</a> to featurize these compounds to automatically get some extra information that isn’t directly available from the database.</p><p>Doing some basic pre-processing techniques and tuning the model’s parameters resulted in a True Positive Rate of 0.91 over the entire Materials Project Database — that means our model is able to correctly pick out materials that have already been synthesized 91% of the time.</p><p>These trained models are now available to predict the synthesizability of new compounds. The user can give an input in the form of a ‘Materials Project ID,’ chemical formula, or a crystal structure. The model will then predict the synthesizability score of that compound. Here are some examples:</p><p>We can predict the synthesizability of any theoretical compound in the Materials Project database by providing its unique ID:</p><pre>pup = PUPredict(‘your_api_key’)</pre><pre>print(pup.synth_score_from_mpid(‘mp-1213718’)) <em># theoretical Cs2TbO3</em></pre><pre>print(pup.synth_score_from_mpid(‘mp-771359’)) <em># theoretical Cu2O3</em></pre><pre>[array([0.37218361])]</pre><pre>[array([0.49403711])]</pre><p>We can also provide a chemical formula or crystal structure and the algorithm will predict the synthesizability of any compounds in the Materials Project that match:</p><pre>pup.synth_score_from_formula(‘Ba2Yb2Al4Si2N10O4’)</pre><pre>[array([0.04694946]), array([0.04952542])]</pre><p>There are <a href="https://github.com/ncfrey/pumml/tree/master/example_notebooks">example Jupyter notebooks</a> in the <em>pumml </em>repository for exploring more features, like building your own models using new data.</p><p><strong>What’s Next?</strong></p><p>This is just the beginning and there’s a lot to do. We looked at one family of 2D materials but there are many, many more out there. The Materials Project example shows how <em>pumml</em> can be used to predict the synthesizability of any material. We need more data, more testing, and most of all, experimental validation. We hope that other researchers will use <em>pumml </em>on new materials systems and to solve problems outside of synthesis too, in other situations where data is incomplete. We’re excited to see the future of materials synthesis, as we try to harness the power of artificial intelligence and machine learning to go beyond the Edisonian model of discovery.</p><p><strong>Getting in touch</strong></p><p><em>If you liked this explainer or have any questions, feel free to reach out to Nathan over </em><a href="/service/mailto:n.frey@seas.upenn.edu"><em>email</em></a><em> or connect on </em><a href="https://www.linkedin.com/in/ncfrey"><em>LinkedIn</em></a><em> and </em><a href="https://twitter.com/nc_frey"><em>Twitter</em></a><em>.</em></p><p><em>You can reach out to Vishnu Harshith over </em><a href="/service/mailto: mm16b009@smail.iitm.ac.in"><em>email</em></a><em> or connect on </em><a href="https://www.linkedin.com/in/vishnu-harshith-526763136/"><em>LinkedIn</em></a><em>.</em></p><p><em>If you’re interested in more technical details, you can read the paper </em><a href="https://pubs.acs.org/doi/10.1021/acsnano.8b08014"><em>here</em></a><em> and check out </em>pumml <em>on </em><a href="https://github.com/ncfrey/pumml"><em>GitHub</em></a><em>.</em></p><p><em>You can find out more about Nathan’s projects and publications on his </em><a href="https://ncfrey.github.io/"><em>website</em></a><em>.</em></p><p><strong>References</strong></p><p>[1] Elkan, Charles, and Keith Noto. Learning classifiers from only positive and unlabeled data. Proceeding of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2008.</p><p>[2] Nathan C. Frey, Jin Wang, Gabriel Iván Vega Bellido, Babak Anasori, Yury Gogotsi, and Vivek B. Shenoy. Prediction of Synthesis of 2D Metal Carbides and Nitrides (MXenes) and Their Precursors with Positive and Unlabeled Machine Learning. ACS Nano 2019 13 (3), 3031–3041.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b216edea899" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/positive-and-unlabeled-materials-machine-learning-8b216edea899">Positive and Unlabeled Materials Machine Learning</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quantum and brain-like technologies with “defective” materials]]></title>
            <link>https://ncfrey.medium.com/quantum-and-brain-like-technologies-with-defective-materials-a685ee5bb47c?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a685ee5bb47c</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[materials]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[nanotechnology]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Fri, 18 Sep 2020 18:20:05 GMT</pubDate>
            <atom:updated>2020-09-18T18:20:05.059Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Machine learning and physics-based simulations to design materials with defects</em></p><p>In this <a href="https://pubs.acs.org/doi/abs/10.1021/acsnano.0c05267">paper</a>, published in <em>ACS Nano</em>, I show how machine learning and computer simulations can be used to design materials with defects for new types of computing and information storage. You might think that “defects” are always a bad thing; after all, if a product is “defective,” it doesn’t inspire a lot of confidence. But in materials, defects can be purposefully created and used to engineer better performing technologies.</p><p><strong>Cooking with defects</strong></p><p>If you’ve owned a set of kitchen knives for more than a few months and they aren’t totally rusted yet, you’re taking advantage of defects! The stainless steel in those knives is mostly iron, but the iron isn’t perfect — it has “defects” of other elements added in that actually make it better. All those other elements work together to keep the iron from rusting. It’s like adding chili powder to your dinner; a little goes a long way to transforming the food.</p><p>In this paper we wanted to answer the question: what kinds of materials and defects might be good candidates for new technologies? Stainless steel knives are pretty well figured out, so we focused on some more cutting-edge applications, things like quantum computing and neuromorphic engineering. With <a href="https://www.nytimes.com/2011/12/06/science/scott-aaronson-quantum-computing-promises-new-insights.html">quantum computers</a> we’re trying to build a new way of calculating things that your laptop might not be able to. With <a href="https://towardsdatascience.com/neuromorphic-hardware-trying-to-put-brain-into-chips-222132f7e4de">neuromorphic engineering</a> we’re making artificial systems that mimic how the brain processes information.</p><p>I’m going to be upfront and say that both of these technologies are really, really early stage and I don’t spend much time worrying about how practical or impractical they might be in the short term. Instead, we want to understand the building blocks of these technologies and figure out how to engineer them to do what we want.</p><p><strong>Designing an atom</strong></p><p>So how does a material with a defect lead to a quantum computer, or mimic how the brain works? We can think about a flat sheet of atoms like the one in this picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8X05xNmOn4bY24-O" /></figure><p>A 2D sheet of carbon atoms. From<a href="https://en.wikipedia.org/wiki/Graphene#/media/File:Graphen.jpg"> Wikimedia Commons</a>.</p><p>If I pop one of those atoms out of the sheet, that leaves a vacancy, which is a kind of defect. Even though all the atoms in the sheet are chemically bonded together into a material, we can think about that vacancy as a sort of “artificial atom.” It behaves kind of like an isolated atom in empty space, although it’s surrounded by all the “real” atoms in the sheet.</p><p>The cool thing is that the vacancy obviously isn’t a “real” atom from the periodic table. Instead, it’s something we created, so it makes sense to ask if we can engineer or design the properties of our “artificial atom” to be different from what we can already find in the regular old periodic table. It turns out, we can! By changing the atoms in the sheet, taking out individual atoms, and swapping in new atoms that are different from all the rest in the sheet, we can design all sorts of artificial atoms.</p><p><strong>A zoo of defects</strong></p><p>If you think about all the elements to choose from (94 naturally occurring ones), the different ways we can arrange them into sheets, and all the ways you could take an atom out or add a new one in, it’s pretty clear that there are a lot of possible defects. Way too many to make them all and test them in a laboratory, and even too many to simulate on a computer.</p><p>Luckily, we know some physics that helps narrow down the types of materials and defects that are worth looking at. We can throw out materials that conduct electricity, and defects that will never be stable.</p><p>That still leaves a lot of exploring to do, so we came up with around 10,000 different defect structures and chose over 1,000 to simulate on the computer. We trained deep learning and machine learning models to predict some of the most important properties of the materials and their defects — properties that can help guide us towards the best defects for quantum information and neuromorphic engineering. From the initial list of 10,000, we suggested a little over 100 defects that we think will be interesting to look at in laboratory experiments.</p><p><strong>A defective memory</strong></p><p>Some of these defects can be implanted and removed by applying a voltage. When the defect is there, the material conducts electricity differently than when it isn’t there. That forms a kind of “memory” where information is stored and retrieved based on how defects are patterned through the material. In a really simple way, this kind of memory is inspired by how the brain physically changes as memories are formed. It might seem a little unhinged to try to mimic the brain with defects in materials, but it turns out this kind of memory based on electrical conductivity in materials has already been used to “learn” to <a href="https://www.nature.com/articles/s41467-020-16105-y">recognize hand-written numbers</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/0*jnzFxu1vguARJVbT" /></figure><p>An atomically thin memory. From <a href="https://www.nanowerk.com/spotlight/spotid=49029.php">Nanowerk</a>.</p><p><strong>Emitting single photons of light</strong></p><p>The other type of defect that we tried to find are called “single-photon emitters” or “quantum emitters.” A photon is a single packet of light, and these defects emit single photons! The fact that you can think about a single particle of light and create one with a defect is pretty cool. It’s also potentially useful, because some researchers have already demonstrated that it’s possible to do <a href="https://phys.org/news/2020-09-near-optimal-chip-based-photon-source-quantum.html">quantum computing with single photons</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/0*q8Qc_zbTG3NwBIKs" /></figure><p>Single photons of light emitted from a 2D material for quantum technologies. From <a href="https://www.photonics.com/Articles/Quantum_Emitters_Generate_Single_Photons_on_Demand/a62119">photonics.com</a>.</p><p>It’s important to remember that controlling materials at the atomic level is possible, but really hard. And artificial atoms are complicated things that require fine-tuning and manipulation to get just right. Paprika, plus garlic powder, plus cayenne pepper, plus oregano…There are a lot of ingredients to consider and a lot of experimentation required to get the recipe worked out.</p><p>We hope that our study provides some interesting ideas of where to start, and maybe more importantly, shows how techniques like deep learning and machine learning can be used to make progress in the huge, complicated field of defect engineering.</p><p><strong>Getting in touch</strong></p><p>If you liked this explainer or have any questions, feel free to reach out over <a href="/service/mailto:n.frey@seas.upenn.edu">email</a> or connect with me on <a href="https://www.linkedin.com/in/ncfrey">LinkedIn</a> and <a href="https://twitter.com/nc_frey">Twitter</a>.</p><p>If you’re interested in more technical details, you can read the paper <a href="https://pubs.acs.org/doi/abs/10.1021/acsnano.0c05267">here</a> and check out the trained models on <a href="https://github.com/ncfrey/defect-design">GitHub</a>.</p><p>You can find out more about my projects and publications on <a href="https://ncfrey.github.io/">my website</a> or just read a bit more <a href="https://about.me/ncfrey">about me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a685ee5bb47c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Review: Something Deeply Hidden]]></title>
            <link>https://ncfrey.medium.com/review-something-deeply-hidden-f4e71eb81941?source=rss-a5e89179a5d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4e71eb81941</guid>
            <category><![CDATA[book-review]]></category>
            <category><![CDATA[sean-carroll]]></category>
            <category><![CDATA[quantum]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[physics]]></category>
            <dc:creator><![CDATA[Nathan C. Frey, PhD]]></dc:creator>
            <pubDate>Wed, 02 Sep 2020 17:29:50 GMT</pubDate>
            <atom:updated>2020-09-02T17:29:50.627Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_nXD5gtnXLuS2CeLfR2tw.jpeg" /></figure><h3>Book Review: Something Deeply Hidden</h3><p>Something Deeply Hidden <em>by Sean Carroll is really good and you should </em><a href="https://www.amazon.com/Something-Deeply-Hidden-Emergence-Spacetime/dp/1524743011/ref=tmm_hrd_swatch_0?_encoding=UTF8&amp;qid=1597420101&amp;sr=8-2"><em>buy it</em></a><em>. If you want to read a more concise and thoughtful review that was published when the book actually came out, I recommend </em><a href="https://backreaction.blogspot.com/2019/09/book-review-something-deeply-hidden-by.html"><em>Sabine Hossenfelder’s</em></a><em>. If you are a physics student or physics enthusiast with some time to kill, read on…</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tlv9lPMpSdqBx2oOjRwTWw.jpeg" /></figure><p>I have had a copy of Sean Carroll’s book, <a href="https://www.amazon.com/Something-Deeply-Hidden-Emergence-Spacetime/dp/1524743011/ref=tmm_hrd_swatch_0?_encoding=UTF8&amp;qid=1597420101&amp;sr=8-2"><em>Something Deeply Hidden</em></a>, checked out from the Philadelphia Library since before the pandemic started. I feel bad about this. For a while the library wasn’t accepting returns, and then I wasn’t in Philly, so I couldn’t return it. Now it has been many months and I’m writing this review in the hopes that I can convince even one person to pick up this book, thus assuaging my guilt.</p><p>If you’re familiar with Sean’s <a href="https://en.wikipedia.org/wiki/Sean_M._Carroll#Selected_publications">writing</a>, <a href="https://arxiv.org/search/?searchtype=author&amp;query=Carroll%2C+S+M">research</a>, <a href="https://www.preposterousuniverse.com/podcast/">podcast</a>, <a href="https://www.youtube.com/watch?v=HI09kat_GeI&amp;list=PLrxfgDEc2NxZJcWcrxH3jyjUUrJlnoyzX">YouTube series</a>, or <a href="https://www.youtube.com/watch?v=F6FR08VylO4">lectures</a>, then it comes as no surprise that <em>Something Deeply Hidden</em> is an incredibly well-written and thoughtful book. To summarize, it is a book that explores and explains the underpinnings of quantum mechanics. The book goes in-depth on the most popular interpretations of quantum mechanics, focusing mainly on Carroll’s own favorite interpretation — the Everettian or “many worlds” theory. Then, assuming you’re convinced that many worlds is the way to go, the book goes into uncharted territory and discusses some interesting logical consequences of many worlds.</p><p>The first thought I had after finishing the book was: <em>this should be required reading for physics students before they take a quantum mechanics class, and again after they take a quantum mechanics class</em>. You might imagine that a quantum mechanics class is a bit mystical and heady, investigating the absurd and counterintuitive world of subatomic stuff. In reality it’s much more banal than that. A typical quantum mechanics class is a grueling slog through various procedures and tricks for doing hard math problems. Mostly you’re supposed to recognize the problem, guess the answer, and then do lots of work to see that you’re right. If you’re lucky enough to get that part down, you may have a chance to step back and ponder what it all means. If you’re even luckier, you have a professor who is willing to take the time to talk about what it all means. More often, professors politely encourage students to “be quiet and calculate,” and students occasionally whisper among themselves about what quantum mechanics <em>really means</em>.</p><p>Reading Carroll’s book is the closest thing many people will get to having this discussion with someone who really knows what they’re talking about. I think that if you don’t have some exposure to mathematics and basic physics, this book is its own sort of slog. It probably requires methodical reading, taking notes, having Wikipedia at the ready on your phone. Likewise, if you’re more mathematically inclined, you’ll probably leave wishing there were more footnotes and more details. But that’s ok, no book can be everything to all people; it’s good to struggle through difficult material and it’s good to want to know more and find yourself looking for pdfs of <a href="http://ucispace.lib.uci.edu/bitstream/handle/10575/1302/everett%20long%20thesis%20as%20published%201973.pdf?sequence=1">Hugh Everett’s thesis</a>.</p><p>For aspiring practitioners of the arcane art and science that is quantum mechanics, <em>Something Deeply Hidden</em> is a great way to become energized about what you’re trying to learn. And after some challenging coursework, it’s a great way to take a step back and reflect on what you learned and how it all fits together. If you aren’t inclined to spend 1–3 years studying the finer details, this book is an excellent glimpse into the foundations of quantum mechanics — a topic that, after reading this book, you’ll probably have spent more time thinking about than many working theoretical physicists.</p><p>I tried to question a lot of Carroll’s arguments and think hard about alternatives to many worlds. I like <a href="https://en.wikipedia.org/wiki/Objective-collapse_theory">objective collapse theories</a> quite a bit and I’m excited to see the results of experimental tests in the future. Ultimately, the battle of interpretations is kind of unfair — playing for many worlds is the ’97 Chicago Bulls of physics communication (Prof. Carroll), and the other interpretations have…nobody? So it’s tough to compare interpretations when the de facto stance (<a href="https://en.wikipedia.org/wiki/Copenhagen_interpretation">Copenhagen</a>) and most of the others don’t even show up to play. Still, I think Carroll gives the alternatives a fair shake (even <a href="https://en.wikipedia.org/wiki/Quantum_Bayesianism">QBism</a>).</p><p>Anyway, this book review is late (the book came out a year ago, in September 2019), and I’m returning the book late. I blame the pandemic and the superb Philadelphia Free Library, which recently <a href="https://whyy.org/articles/got-a-fine-for-overdue-books-philly-libraries-will-soon-forgive-them/#:~:text=Philadelphia%20is%20putting%20the%20%E2%80%9Cfree,overdue%20books%20and%20other%20materials.">eliminated late fees</a> for overdue books. Maybe there’s a world in which I wrote this review in a more timely fashion. To all the agents and editors out there who are eagerly awaiting my future book proposals, I promise I’m usually very good at sticking to deadlines.</p><p>The bottom line is: you should read this book if you care about what quantum mechanics <em>allows us to do</em>, and what it <em>means</em>.</p><p><strong>Getting in touch</strong></p><p><em>If you liked this review or have any questions, feel free to reach out to Nathan over </em><a href="/service/mailto:n.frey@seas.upenn.edu"><em>email</em></a><em> or connect on </em><a href="https://www.linkedin.com/in/ncfrey"><em>LinkedIn</em></a><em> and </em><a href="https://twitter.com/nc_frey"><em>Twitter</em></a><em>.</em></p><p><em>You can find out more about Nathan’s projects and publications on his </em><a href="https://ncfrey.github.io/"><em>website</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4e71eb81941" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>