Molecule insertion#

This script was designed for adding molecules into the simulation box with existing atoms inside. It is suitable for inserting molecules inside porous materials such as metal organic frameworks (MOFs). The positions and the orientations will be randomly determined considering the overlap with the existing and the pre-added atoms. CO2 and H2O are explicitly defined in the scripts, while the other molecular types are needed to be added by modifying the script.

Input#

optional arguments:

  • --help

    Show helping message and exit

  • -frame

    Input framework structure from any format to ASE reader

  • -h2o

    The number of H2O molecules inserted in framework

  • -co2

    The number of CO2 molecules inserted in framework

  • -maxiter

    Max iteration when placing each molecules

  • -threshold

    Threshold for minimum intermolecular distance when placing molecules

  • -l_fix_framework

    Fix framework or not

  • -l_sort_mol

    Sort molecule layer or not

  • -seed

    Seed for random (in case you want the same structure)

  • -outfile

    The name of file to be written out

  • -format

    The format of output file to be written out

Example#

$ python ./src/insertmolecules.py \
        -frame ./structure/calf20.vasp \
        -h2o 4 \
        -co2 2 \
        -outfile output_calf
        -format vasp \
        -l_fix_framework True \
        -threshold 2.1