Posts

  • Removing duplicate atoms from structures

    Sometimes ICSD structures contain duplicate atoms…I learned the hard way. I was recently running some VASP calculations and was getting errors like WARNING: CNORMN: search vector ill defined. Additionally, I was finding that changing ALGO to All was producing the same error, leading to my conclusion that I likely had a problematic structure. Using pymatgen, you can quickly check if a structure contains duplicate atoms.

  • Visualizing crystal structures in Markdown using 3Dmol.js

    Have you ever wanted to embed a crystal structure visualization in your website? Oddly specific question, I know, but recently I found my wanting to do this. As you can see on my homepage, I have finally achieved success but it took a few days to work out the kinks. In order to make sure that no one else endures my pain, here is how you can do this in Markdown using html and 3Dmol.js.

  • Introduction to the Atomic Simulation Environment

    The Atomic Simulation Environment (ASE) is a set of useful Python modules for manipulating and visualizing structures, setting up calculations/simulations, and converting between different file formats. Here is a link to ASE’s documentation: https://wiki.fysik.dtu.dk/ase/

  • Unzipping files into folders with the same name in Linux

    Here is a little Python script that unzips files into folders with the same name in Linux. Take, for example, the file test.zip. If it contains a number of files and you unzip using unzip test.zip on Linux, then they will all be decompressed into your present working directory. If you wanted the files to go into a folder bearing the prefix of zip file, i.e. test, then you’d have to write a shell script…until now! Just because, I wrote a python script that does the same thing using unar. Now, unar can do this for one file but not for several, e.g. as defined using a wildcar *.zip. My script, called unzipr (because every Python script needs a fancy name), does just this. Please feel free to use and pass along if you find it helpful!

  • Finding descriptors for catalysis using random forests

    In this tutorial, I’m going to show you how easy it is to train and analyze a random forest regression model. The data we’re going to use is taken from my recent paper on tuning the hydrogen evolving activity of Ni2P via strain. [1] The main idea of the paper is that surface nonmetal dopants, which replace P near the Ni3 sites, can induce compressive and tensile strain on the Ni3 sites leading to changes in their H binding strength.

  • Visualizing dipolar structure dynamics in (Ba,Sr)TiO3

    This notebook outlines how to visualize the dipolar structure of 10% Sr-doped (Ba,Sr)TiO3 from bond valence molecular dynamics (BVMD) simulations. This recipe could be used to visualize the dynamics of any atom-centered vector property, e.g. magnetic moment, molecular orientation, etc. Please let me know if you have any questions, comments, or suggestions.

  • Generating thermal profiles for LAMMPS simulations

    This notebook generates thermal profiles for LAMMPS simulations. All you need to do is define the temperatures then the notebook will generate an NVT equilibration phase (10K steps), NPT equilibration phase (40K steps, P = 1.01325 bar), and NPT sampling step (40K steps, P = 1.01325 bar) for each temperature. Should be easy to make modifications. Please feel free to do so. If you’d like me to include your updates, then please shoot me an email with your notebook or Python script.

  • gzip in parallel using pigz

    If you’re running MD simulations, then this is the post for you. It can sometimes be a nightmare to compress MD trajectories because they can be so large, like multiple GBs (or maybe even TBs if you’re working with gigantic systems). Up until now, I’ve found myself deleting MD trajectors but saving a restart file so that I can regenerate the data if I need to do further processing. This can be somewhat of a drag so I went searching for a way to compress MD trajectories in parallel. That’s when I came across pigz. If you already know how to make a tar.gz file, then it is really easy to use pigz. For example, the pigz command corresponding to

  • Running Quantum Espresso on Conrad and Gordon

    Today, I figured out that there is a working pw.x executable for Quantum Espresso on the DoD machines Conrad and Gordon. It is located in /app/espresso/6.3-intel/bin. All you need is a PBS script with an execution line like

  • Compiling LAMMPS on Koehr

    Today, I was able to successfully compile LAMMPS on the DoD machine Koehr. First, I used mpicc as my C++ compiler. Then, I manually pointed the makefile to Intel’s MPI libraries using the following three lines of code:

subscribe via RSS