Skip to content

Repository files navigation

mc_h2o_lets_go

Repo for saving bash and Python scripts used to set up RASPA simulations for H2O and CO2 adsorption in zeolites, starting with MOR topology zeolites. In principle the code is written so that it can be adapted to additional topologies, assuming a similar framework is used to create and store input files.

Parametrization

The force field is parametrized in two different ways, based on two different papers from the research lab of Sofia Calero: the paper debuting the Zeoran code used to substitue Al atoms in zeolites (paper cited here). This is primarily used to parametrize carbon dioxide and the framework. The force field parameters for water come from the paper by Zhakisheva et al detailing ammonia and water adsorption in zeolites. There are some slight discrepancies in parameters for sodium extraframework cations as well as the framework, so simulations can be run with parameters closer to those of the Zeoran paper (found in the folder ff_zeoran) or the Zhakisheva paper (found in the founder ff_zhakisheva).

There is an additional folder, dummy_simulation_input, for starting points for RASPA input files for relevant simulations. These are used in the bash and Python scripts, largely to be copied with more detailed information in new folders for specific simulations.

Example input files

There are example input files to get you started in example_inputs:

  • revised_mor_cif/: directory of CIF files for use in several scripts
  • mor_zeolites_oxy_oxygen_descriptor.pkl: pickle file useful for replace_oa_oaa.py
  • EXAMPLE_representative_al_cifs.csv: example output file from al_sampling.py that can get used as an input for run_sims.bash

Script functionality

All scripts have their instructions for running them implied through the arguments and comments listed at the beginning of each file.

  • replace_oa_oaa.py : This is a Python script that replaces O with Oa or Oaa in CIF files, the structure files for the zeolites, based on dictionary entries in another input file, a pkl file, that specifies where Oa or Oaa atoms should go. This is crucial to do to take advantage of the precise parametrization in the aforementioned force fields, since they differentiate between O atoms bound to one or more Al atoms. The output is new modified CIF files with these changes.

  • count_aluminum_specify_sodium.py: This Python script counts Al atoms in a CIF file and provides the correct Na+ ion count for simulation inputs. Basically it extracts text about Al atom counts from the CIF file, takes information about the unit cell size from a simulation input file, and uses that information to calculate the Na+ extraframework cation count and output that in a new simulation file.

  • mor_structure_dir_setup.bash : Bash script that sets up a nested structure of directories for the RASPA simulations, such that each zeolite structure has its own directory, and within that each different simulation type has its own directory, too.

  • al_sampling.py : Python script that calculates a distribution of Al atom counts across a selection of CIF files and then samples a subset of files from that distribution, with an option to visualize the distribution in a plot.

  • extract_quantities.py: Python script to extract He void fraction and ideal gas Rosenbluth weights from RASPA output files and use those values as inputs in heat of adsorption RASPA input files. NOTE: THIS SCRIPT IS ONLY PARTIALLY FUNCTIONAL.

  • run_sims.bash : Bash script to loop over a directory to run RASPA simulations in sequence on a single node. See example_inputs/EXAMPLE_representative_al_cifs.csv for an example input file to use with this. It would be great to figure out a way to make use of a script like this to launch simulations on parallel machines, or to adapt it to launch jobs on a queuing system.

Future of this repo

This project likely will not be continued due to it being very scientifically difficult to simulate water adsorption in zeolites; this is due to water's highly polar nature and how that polarity dramatically raises the system's energy in a way that makes it very difficult (read: improbable) for Monte Carlo moves to be accepted. While this repo makes the software much easier for creating input files and launching simulations in the scale of thousands, that does not solve the inherent scientific dilemma.

Also, the group priorities have changed, such that RASPA almost certainly will fall out of favor compared to more flexible simulation software like LAMMPS. Moreover, water adsorption simulations in RASPA are notoriously slow for aforementioned physical reasons, so different computing infrastructure would be necessary to address this issue (e.g. more CPU nodes, move to gRASPA to run these on GPUs, simulation tricks to speed up simulations).

All this said, this repo will live on as documentation, and further modifications may happen for tinkering or project portfolio reasons.

Testing

Astute software developers will notice a dearth of tests for this repo. The authors recommend writing tests if you plan on productionizing the code.

About

support code to set up RASPA simulations of water adsorption in zeolites

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages