404
+ +Page not found
+ + +diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..a14aeb30 --- /dev/null +++ b/404.html @@ -0,0 +1,167 @@ + + +
+ + + + +Page not found
+ + +The .CSV file must be included into the INPUT .YAML file:
+CLAY_COMP
, SYSNAME
, corresponding to the clay name.e.g.:
+CLAY_COMP: /path/to/clay_comp.csv
+SYSNAME: NAu-1-fe
+
+
+First column: sheet
T
) and octahedral (O
) occupancies;I
) ocupansies, if the total charge (tot
second column) is non-zero;T
, O
and total (tot
) average unit cell charge (C
).Second column with element
:
ClayCode.builder
will try to assign it to the supported atom of same charge and re-assign the ocupansies);T
layer, O
layer and tot
total;T
) sheet should sum up to 4.O
) sheets, the total occupancies should amount to 4/3 for dioctahedral/trioctahedral unit cell types, respectively.T
occupancies of 8, and O
occupancies of 4;ClayCode.builder
will first process the target composition such that the occupancies match those expected for the specified unit cell type.I
section. The sum of all ion contributions should sum to 1.T
and O
unit cell charge are specified.ClayCode.builder
can perform the splitting between the two iron species.The supplied file within directory Tutorial
is exp_clay.csv
and contains clay structures corresponding to the Source Clays listed under "Physical and Chemical Data of Source Clays" clays.org.
1:1 (TO) dioctohedral smectite:
+2:1 (TOT) dioctohedral smectite:
+example Al-Mg 3:1 layered double hydroxide (not via clays.org):
+Example from clay_comp.csv
file for NAu-1 and NAu-2 nontronite clays:
sheet | +element | +NAu-1-fe | +NAu-2-fe | +
---|---|---|---|
T | +Si | +6.98 | +7.55 | +
T | +Al | +0.95 | +0.16 | +
T | +Fe3 | +0.07 | +0.29 | +
O | +Fe | +3.61 | +3.54 | +
O | +Al | +0.36 | +0.34 | +
O | +Mg | +0.04 | +0.05 | +
I | +Ca | +0.525 | +0.36 | +
I | +Na | +0 | +0 | +
I | +Mg | +0 | +0 | +
I | +K | +0 | +0 | +
I | +Cl | +0 | +0 | +
C | +T | +-1.02 | +-0.45 | +
C | +O | +-0.03 | +-0.27 | +
C | +tot | +-1.05 | +-0.72 | +
ClayCode.builder
System Specifications YAML fileClayCode.builder
reads the parameters specified in this file.
The first section contains general parameters that are required for the model construction.
+OUTPATH
- output directory path [str]
+Directory in which output folder is created.
SYSNAME
- clay system name [str]
+Th name for clay type, must to match a column header in the CSV file, the created output folder will also have this name. Avoid spaces and unusual symbols.
CLAY_COMP
- filename.csv [str]
+Name of CSV file where the target stoichiometry for the system specified under SYSNAME
.
CLAY_TYPE
- unit cell type [str]
+Clay unit cell type, available in data/UCS
directory.
+Such as:
+Dioctahedral 2:1 - D21
+Trioctahedral 2:1 - T21
+Dioctahedral 1:1 - D11
+Trioctahedral 1:1 - T11
+layered double hydroxide 3:1 - L31
+layered double hydroxide 2:1 - L21
+Sepiolite - SEP
+Note: Only D21, D11 and L31 are supplied with current release.
Example:
+# output directory path
+OUTPATH: /path/to/output/directory
+
+# name of system
+SYSNAME: NAu-1-fe
+
+# name of CSV file with target stoichiometry
+CLAY_COMP: /path/to/clay_comp.csv
+
+# clay type
+CLAY_TYPE: D21
+# Dioctahedral 2:1 - D21
+
+This is an optional parameter section, if the directives are not given by the user, ClayCode.builder
will use default values.
X_CELLS
- Unit cell number [int] (Default: 7)
+Number of unit cells in x-direction.
+Note: Future version will have the option to specify target x-dimensions X_DIM
Y_CELLS
- Unit cell number [int] (Default: 5)
+Number of unit cells in y-direction.
+Note: Future version will have the option to specify target y-dimensions Y_DIM
N_SHEETS
- Unit cell number [int] (Default: 3)
+Number of sheets of 1 unit cell thickness to be stacked in z-direction.
Example:
+# number of unit cells in x direction (Default 7)
+X_CELLS: 7
+
+# number of unit cells in y direction (Default 5)
+Y_CELLS: 5
+
+# number of unit cells in z direction (Default 3)
+N_SHEETS: 3
+
+ClayCode.builder
calculates the number and type of unit cells necessary to match the desired composition, as given in CSV file.
+If, instead, the user would like to specify this manually, the following parameters can be used:
UC_INDEX_LIST
- unit cell list [list]
+required unit cells, as specified in data/UCS
directory, to use for building the system
UC_RATIOS_LIST
- probabilities [list]
+ probability list for the above unit cells, total probability must be 1.00
Example:
+The following script will use the dioctohedral 2:1 unit cells, which are both neutral smectite unit cells, with the latter having 1 octohedral Al substitution for the Fe3.
+This will produce a neutral smectite with the following stoichiometry: .
+# required UCs to builder system as list
+UC_INDEX_LIST: [D221 D228]
+
+# probability list of unit cells in system
+UC_RATIOS_LIST: [0.8 0.2]
+
+IL_SOLV
- interlayer solvent presence [bool] (Default: True)
+If True interlayer space should be solvated, otherwise False will produce non-hydrated clay.
There are three options to handle interlayer water and interlayer ions, only one should be specified:
+ION_WATERS
- number of waters per ion [int, Dict[str: int]]
+Number of water molecules that should be added per ion.
+If a single number [int] is given, all of the ions will be hydrated by the same number of waters.
+To specify number of waters per ion-type the entry should be a citionary, then the total number of water molecules will be mapped to the specifications given for each of the interlayer occupancies I
in the CSV entry.
+
+Example:
+A given number of waters will be added for each cation, which quantity is specified in the clay stoichiometry CSV file.
ION_WATERS:
+ Ca: 12
+ Na: 12
+ K: 10
+
+UC_WATERS
- number of water molecules per unit cell [int]
+The specified number of water molecules multiplied by the number of unit cells is added into each of the interlayer spaces.
SPACING_WATERS
- hydrated interleyer spacing, in A [float] (Default 10.0 A)
+Target interlayer spacing filled with water, final value may vary due to the water rearrangement when in contact with clay surface and packing around ions.
BOX_HEIGHT
- simulation box height in A [float]
+Size of the final simulation box in z-direction in A, note the clay layers are positioned in xy-plane.
BULK_SOLV
- bulk solvent presence [bool] (Default: True)
+If True the box space will be filled with water, otherwise False will keep the box empty. This is useful if further plan is to add other species, such as oil, into the system.
BULK_IONS
- type of ions and their concentration in mol/L [int, Dict[str: int]]
+Ions to be added into the bulk solvated space.
+Note: GROMACS will not be happy if the system is not neutral!
Example:
+This will create a simulation box of 120 A height, filled with 0.1 M NaCl solution.
+
+# full simulation box height in A
+BOX_HEIGHT: 120.0
+
+# Bulk solvent added or not (Default: True)
+BULK_SOLV: True
+
+BULK_IONS:
+ Na: 0.1
+ Cl: 0.1
+
+Sometimes more than one version of GROMACS may be installed, this allows user to specify the one to use.
+GMX
- bash alias for your favourite GROMACS version [str]
Example:
+To use your MPI-compiled version:
+GMX: gmx_mpi
+
+ClayCode.siminp
System Specifications YAML fileClayCode.simpinp
reads the parameters specified in this file and generates simulation inputs for GROMACS.
Coming soon...
+ +Builds clay models based on average target occupancies for a specified unit cell type.
+ClayCode.builder
will match a combination of differently substituted unit cells to fit the average target occupancies specified by the user.
Arguments for builder
are:
-f
: System specifications YAML file (include .csv file path)-comp
: Clay composition in CSV format (can also be given in system specifications YAML, see Pyrophyllite Tutorial)--manual_setup
: (run builder in interactive mode)ClayCode builder -f path/to/input_Clay.yaml
+
+
+ developers guide coming soon ...
+Modules:
+Environemnt set up files:
+The code structure is as follows:
+ClayCode
+│
+├── builder
+│ ├── config
+│ └── tests
+│ └── data
+├── config
+├── core
+├── data
+│ ├── FF
+│ │ ├── ClayFF_Fe.ff
+│ ├── MDP
+│ ├── UCS
+│ │ ├── D11
+│ │ ├── D21
+│ │ └── LDH31
+│ └── user
+└── siminp
+
+
+
+ imt.md
+Illite IMt-1 and IMt-2
+ORIGIN: Silver Hill, Montana, USA +CHEMICAL COMPOSITION (%): SiO2: 49.3 Al2O3: 24.25, TiO2: 0.55, Fe2O3:7.32, FeO: 0.55, MnO: 0.03, MgO: 2.56, CaO: 0.43, Na2O: 0, K2O: 7.83, P2O5: 0.08, LOI: 8.02
+STRUCTURE: (Mg.09 Ca.06 K1.37)[Al2.69 Fe(III).76 Fe(II).06 Mntr Mg.43 Ti.06][Si6.77 Al1.23]O20(OH)4, Octahedral charge:-.44, Tetrahedral charge:-1.23, Interlayer charge:-1.68, Unbalanced charge:0.00
+The supplied exp_clay.csv
file and contains clay structures corresponding to the Source Clays listed under "Physical and Chemical Data of Source Clays" clays.org.
NO interlayer water
+ClayCode builder -f path/to/input_Clay.yaml
+
+
+ ClayCode generates clay mineral structures based upon their natural partially ocupied unit cell compositions and assigns ClayFF forecefield parameters, generating all the input files ready for simulation with Gromacs software.
+Report bugs and give sugestions for future improvements and new features via issues
Contribute via branches and pull requests
Claycode is published under the MIT License
ClayCode is developed by Hannah Pollak, Matteo Degiacomi and Valentina Erastova, University of Edinburgh, 2023
+Please CITE us: HP, MTD, VE "ClayCode: setting up clay structures from simulation in Gromacs", DOI: XXX
+ +Kaolinite
+NOTE treatment of the Ti in the structure and what is the origin of the Ti, why to ignore
+Kaolin KGa-1(KGa-1b), (low-defect)
+ORIGIN: Tuscaloosa formation? (Cretaceous?) (stratigraphy uncertain) +County of Washington, State of Georgia, USA +LOCATION: 32°58′ N-82°53′ W approximately, topographic map Tabernacle, Georgia N 3252.5-W 8252.5/7.5, Collected from face of Coss-Hodges pit, October 3,1972. +CHEMICAL COMPOSITION (%): SiO2: 44.2, Al2O3: 39.7, TiO2: 1.39, Fe2O3: 0.13,FeO: 0.08, MnO: 0.002, MgO: 0.03, CaO: n.d., Na2O: 0.013, K2O: 0.05, F:0.013,P2O5: 0.034, Loss on heating: -550°C: 12.6; 550-1000°C: 1.18. +CATION EXCHANGE CAPACITY (CEC): 2.0 meq/100g +SURFACE AREA: N2 area: 10.05 +/- 0.02 m2 /g +THERMAL ANALYSIS: DTA: endotherm at 630oC, exotherm at 1015oC, TG: dehydroxylation weight loss 13.11% (theory 14%) indicating less than 7% impurities. +INFRARED SPECTROSCOPY: Typical spectrum for well crystallized kaolinite,however not as well crystallized as a typical China clay from Cornwall,as judged from the intensity of the 3669 cm-1 band. Splitting of the 1100cm- 1 band is due to the presence of coarse crystals.
+STRUCTURE:(Mg.02 Ca.01 Na.01 K.01)[Al3.86 Fe(III).02 Mntr Ti.11][Si3.83Al.17] O10(OH)8, Octahedral charge:.11, Tetrahedral charge:-.17,Interlayer charge:-.06, Unbalanced charge:0.00
+The supplied exp_clay.csv
file and contains clay structures corresponding to the Source Clays listed under "Physical and Chemical Data of Source Clays" clays.org.
Removing invalid atom types:
+
+ sheet - at-type: occupancy
+ O - Mn : 0.00, O - Ti : 0.11
+
+Could not guess Ti charge.
+Enter Ti charge value: (or exit with 'e')
+
+
+++4
+
Assuming Ti charge of 4.
+
+Getting sheet occupancies:
+ Found 'O' sheet occupancies of 3.8800/4.0000 (-0.1200)
+ Found 'T' sheet occupancies of 4.0000/4.0000 (+0.0000)
+
+Adjusting values to match expected occupancies:
+ old occupancies -> new occupancies per unit cell:
+ sheet - atom type : occupancies (difference)
+ 'O' - 'ao' : 3.8600 -> 3.9800 (+0.1200)
+
+Splitting total iron content (0.0200) to match charge.
+
+ Will use the following target composition:
+ 'T' - 'at' : 0.1700
+ 'T' - 'st' : 3.8300
+ 'O' - 'ao' : 3.9800
+ 'O' - 'feo' : 0.0200
+
+Writing new target clay composition to 'KGa-1_exp_df.csv'
+
+
+ClayCode builder -f path/to/input_Clay.yaml
+
+
+ ldh example
+3:1 Al-Mg LDH
+ClayCode builder -f path/to/input_Clay.yaml
+
+
+ Wyoming montmorillonite is widely studied and used smectite. It is available for purchase from Source Clays of The Clay Minerals Society, and is identified as SWy-1, SWy-2 or SWy-3, depending on the batch.
+This is a well-characterised clay with the structure listed under "Physical and Chemical Data of Source Clays" at the clays.org, as:
+Swy-1: ,
with unbalanced charge of 0.05.
Ti is often identified during clay analysis, but is attributed to the TiO inclusions, therefore, we will omit it in the input. Meanwhile, ClayFF force field does not have parameters for Mn, which is shown at the level of detection and so we will also omit this entry.
+The provided clay_comp.csv
file contains an entry SWy-1
which corresponds to this Wyoming montmorillonite clay.
Let's examine the Swy1.yaml
, which is provided in the Tutorial
directory. This file contains all of the information necessary to build the clay model.
Please consult YAML for the parameter description
+
+# =============================================================================
+# General specifications for clay model construction
+# =============================================================================
+
+# =============================================================================
+# Required Parameters
+# =============================================================================
+
+OUTPATH: .
+
+# name of system to call according to CLAY_COMP (exp_clay.csv)
+# compositions currently included are: 'NAu-1-fe' 'NAu-2-fe' 'NG-1' 'SWa-1' 'LDH31' 'IMt-1' 'KGa-1'
+SYSNAME: SWy-1
+
+# specify whether new clay model should be constructed:
+# new - a new clay model is constructed
+# load - sheet coordinates or unit cell sequences are loaded from existent .gro or .npy files
+# load: [X, Y]
+# with X - 'np' or 'gro', Y - '.npy' or '.gro' filename
+# False - no clay model is constructed
+BUILD: new
+
+# name of .csv file with target stoichiometry
+CLAY_COMP: exp_clay.csv
+
+# clay type available options in 'clay_units' directory:
+# Dioctahedral 2:1 - D21
+# Trioctahedral 2:1 - T21
+# Dioctahedral 1:1 - D11
+# Trioctahedral 1:1 - T11
+# layered double hydroxide 3:1 - L31
+# layered double hydroxide 2:1 - L21
+# Sepiolite - SEP
+
+CLAY_TYPE: D21
+
+
+# =============================================================================
+# Optional: Clay Sheet and Interlayer Specifications
+# =============================================================================
+
+# number of unit cells in x direction (Default 7)
+X_CELLS: 7
+
+# number of unit cells in y direction (Default 5)
+Y_CELLS: 5
+
+# number of unit cells in z direction (Default 3)
+N_SHEETS: 3
+
+# ----------------------------------------------------------------------------
+# Optional: Unit Cell Composition and Ratios input
+# if not given, these will be calculated from data in the CLAY_COMP .csv file
+# (Default UC_INDEX_LIST: [], UC_RATIOS_LIST: [])
+# -----------------------------------------------------------------------------
+
+# required UCs to builder system as list
+# UC_INDEX_LIST: [1]
+
+# probability list of unit cells in system
+# p(tot): 1.00
+# UC_RATIOS_LIST: [1]
+
+# -----------------------------------------------------------------------------
+
+# interlayer solvent present or not (Default True)
+IL_SOLV: True
+
+# -----------------------------------------------------------------------------
+# Optional: Interlayer Ion Specification Options (comment the other options!)
+# (Default UC_WATERS: 20)
+# -----------------------------------------------------------------------------
+
+# 1. Number of water molecules that should be added per ion (ION_WATERS)
+# a. as ion species dictionary for hydration number
+# ION_WATERS: {'Ca': 12,
+# 'Na': 12
+# }
+
+# b. as ion species int for hydration number
+# ION_WATERS : 12
+
+# 3. OR per unit cell
+#UC_WATERS: 25
+
+# 4. OR for a target d-spacing value in A
+SPACING_WATERS: 20
+
+# =============================================================================
+# Optional: Simulation Box Specifications
+# =============================================================================
+
+# full simulation box height in A (Default 150.0)
+BOX_HEIGHT: 150.0
+
+# =============================================================================
+# Optional: Solvation and Bulk Ions Specifications
+# =============================================================================
+
+# Bulk solvent added or not (Default: True)
+BULK_SOLV: True
+
+# Ion species and concentration in mol/L name to add in bulk solvent
+# (Default: BULK_IONS:
+# Na: 0.1)
+
+BULK_IONS:
+ Na: 0.1
+ Cl: 0.05
+
+# =============================================================================
+# Optional: Simulation Runs Specifications
+# =============================================================================
+
+# Generate scripts and '.mdp' files for simulation runs.
+# Available options:
+# EM - energy minimisation
+# EQ - equilibration
+# D-SPACE - d-spacing equilibration
+# P - production
+# SIMINP: [EM, D-SPACE]
+
+# select where EM and EQ should be run (Default: False)
+# MDRUNS_REMOTE: False
+
+# -----------------------------------------------------------------------------
+# d-spacing equilibration options
+# -----------------------------------------------------------------------------
+
+# Target d-spacing in A
+# D_SPACE: 19.5
+
+# Water molecules to be removed at a time during d-spacing equilibration runs
+# REMOVE_STEPS: 1000
+
+# Absolute number of water molecules per interlayer space
+# SHEET_WAT: 2
+
+# Number of water molecules per unit cell
+# UC_WAT: 0.1
+
+# Percentage of water molecules from interlayer
+# PERCENT_WAT: 5
+
+# -----------------------------------------------------------------------------
+# bash alias for used GROMACS version
+# -----------------------------------------------------------------------------
+
+GMX: gmx
+
+
+run as
+ClayCode builder -f path/to/input_Clay.yaml
+
+
+ In this Tutorial we look at the two South Australian nontronite clays, part of the Source Clays of The Clay Minerals Society. These are commonly known as NAu-1 or the Uley green nontronite and NAu-2 or Uley brown nontronite.
+Their structures are listed under "Physical and Chemical Data of Source Clays" at the clays.org, as:
+NAu-1:
+NAu-2: ,
+where indicates interlayer counter-balancing cationic charge.
Iron can be present as either Fe(II) or Fe(III) and found in both, the tetrahedral and the octahedral sheets, as well as a charge compensating cation in the interlayer space space. +Furthermore, in many samples, such as NAu-2, ferrihydrydes are adsorbed to clay surfaces.1 +While methods such as near-infrared (NIR), extended X-ray adsorption fine structures (EXAFS), Moessbauer spectroscopy, X-ray diffraction (XRD) and thermogravimetric analysis (TGA) have been used to determine the charge distributions of Fe in the sample,234 the exact composition of these nontronites remains matter of debate.
+Conventionally, when Al and Fe(III), are present in a structure, because of their larger ionic radius, Fe(III) is assigned complitely to the octahedral sheet. Only once all octahedral spaces are occupied by Fe(III), the structure is assumed to also have Fe(III) in tetrahedral positions. +However, this assignment is not necessarily correct and due to the detection limits of commonly used spectroscopic or chemical analysis techniques tetrahedral Fe(III) contents below 5% often remain undetected.3
+To this end, after a review of the literature, we use the structures identified by Gates et al2. We note that the octahedral occupancy fro NAu-2 is 3.93 instead of full 4. ClayCode will address this when generating the structure. Furthermore, we assign as counterbalancing ion to all the systems. Resulting structures are, therefore, as follows:
+NAu-1: +
+NAu-2: +
+Tutorial
directory provides the clay_comp.csv
file which contains the above clay structures.
+See CSV for details on this file.
sheet | +element | +NAu-1-fe | +NAu-2-fe | +
---|---|---|---|
T | +Si | +6.98 | +7.55 | +
T | +Al | +0.95 | +0.16 | +
T | +Fe | +0.07 | +0.29 | +
O | +Fe | +3.61 | +3.54 | +
O | +Al | +0.36 | +0.34 | +
O | +Mg | +0.04 | +0.05 | +
I | +Ca | +0.525 | +0.36 | +
I | +Na | +0 | +0 | +
I | +Mg | +0 | +0 | +
I | +K | +0 | +0 | +
I | +Cl | +0 | +0 | +
C | +T | +-1.02 | +-0.45 | +
C | +O | +-0.03 | +-0.27 | +
C | +tot | +-1.05 | +-0.72 | +
We now create the system specification YAML file, which will contain the information necessary to build the clay structures of or interest.
+The files NAu-1.yaml
and NAu-2.yaml
are provided.
The first section contains general parameters that are required for the model construction.
+If the directives in the optional section are not given by the user, ClayCode
will use default values.
# =============================================================================
+# General specifications for clay model construction
+# =============================================================================
+
+# =============================================================================
+# Required Parameters
+# =============================================================================
+
+OUTPATH: /path/to/output/directory
+# name of system
+SYSNAME: NAu-1-fe
+
+# name of CSV file with target stoichiometry
+CLAY_COMP: /path/to/clay_comp.csv
+
+# clay type available options in 'clay_units' directory:
+# Dioctahedral 2:1 - D21
+# Trioctahedral 2:1 - T21
+# Dioctahedral 1:1 - D11
+# Trioctahedral 1:1 - T11
+# layered double hydroxide 3:1 - L31
+# layered double hydroxide 2:1 - L21
+# Sepiolite - SEP
+
+CLAY_TYPE: D21
+
+
+# =============================================================================
+# Optional: Clay Sheet and Interlayer Specifications
+# =============================================================================
+
+# number of unit cells in x direction (Default 7)
+X_CELLS: 7
+
+# number of unit cells in y direction (Default 5)
+Y_CELLS: 5
+
+# number of unit cells in z direction (Default 3)
+N_SHEETS: 3
+
+# ----------------------------------------------------------------------------
+# Optional: Unit Cell Composition and Ratios input
+# if not given, these will be calculated from data in the CLAY_COMP CSV file
+# (Default UC_INDEX_LIST: [], UC_RATIOS_LIST: [])
+# -----------------------------------------------------------------------------
+
+# required UCs to builder system as list
+# UC_INDEX_LIST: [1]
+
+# probability list of unit cells in system
+# p(tot) = 1.00
+# UC_RATIOS_LIST: [1]
+
+# -----------------------------------------------------------------------------
+
+# interlayer solvent present or not (Default True)
+IL_SOLV: True
+
+# -----------------------------------------------------------------------------
+# Optional: Interlayer Ion Specification Options (comment the other options!)
+# (Default UC_WATERS: 20)
+# -----------------------------------------------------------------------------
+
+# 1. Number of water molecules that should be added per ion (ION_WATERS)
+# a. as ion species dictionary for hydration number
+# ION_WATERS = {'Ca': 12,
+# 'Na': 12
+# }
+
+# b. as ion species int for hydration number
+# ION_WATERS = 12
+
+# 3. OR per unit cell
+UC_WATERS: 20
+
+# 4. OR for a target d-spacing value in A
+# SPACING_WATERS = 10.0
+
+# =============================================================================
+# Optional: Simulation Box Specifications
+# =============================================================================
+
+# full simulation box height in A (Default 150.0)
+BOX_HEIGHT: 150.0
+
+# =============================================================================
+# Optional: Solvation and Bulk Ions Specifications
+# =============================================================================
+
+# Bulk solvent added or not (Default: True)
+BULK_SOLV: True
+
+# Ion species and concentration in mol/L name to add in bulk solvent
+# (Default: BULK_IONS:
+# Na: 0.1
+# Cl: 0.1)
+
+BULK_IONS:
+ Na: 0.1
+ Cl: 0.1
+
+# -----------------------------------------------------------------------------
+# bash alias for used GROMACS version
+# -----------------------------------------------------------------------------
+
+GMX: gmx_mpi
+
+ClayCode builder -f path/to/input_Clay.yaml
+
+Ray L. Frost, J. Theo Kloprogge, and Zhe Ding. The Garfield and Uley nontronites - An infrared spectroscopic comparison. Spectrochimica Acta - Part A Molecular and Biomolecular Spectroscopy, 58(9):1881–1894, 7 2002. doi:10.1016/S1386-1425(01)00638-2. ↩
+W. P. Gates, P. G. Slade, A. Manceau, and B. Lanson. Site Occupancies by Iron in Nontronites. Clays and Clay Minerals, 50(2):223–239, 4 2002. doi:10.1346/000986002760832829. ↩↩
+Fabien Baron, Sabine Petit, Martin Pentrák, Alain Decarreau, and Joseph W. Stucki. Revisiting the nontronite Mössbauer spectra. American Mineralogist, 102(7):1501–1515, 7 2017. doi:10.2138/am-2017-1501x. ↩↩
+A. Decarreau and S. Petit. Fe 3+ /Al 3+ partitioning between tetrahedral and octahedral sites in dioctahedral smectites. Clay Minerals, 49(5):657–665, 12 2014. doi:10.1180/claymin.2014.049.5.03. ↩
+The <OUTPATH>
directory is specified in the YAML file
Output files inside <OUTPATH>
directory:
Sheet coordinates <SYSNAME>_<X_CELLS>_<Y_CELLS>_<sheetnumber>.gro
Interlayer coordinates and topology (with solvent and/or ions) (if interlayer is solvated and/or clay has non-zero charge) <SYSNAME>_<X_CELLS>_<Y_CELLS>_interlayer.gro
and <SYSNAME>_<X_CELLS>_<Y_CELLS>_interlayer.top
(Solvated) clay sheet stack coordinates and topology <SYSNAME>_<X_CELLS>_<Y_CELLS>.gro
and <SYSNAME>_<X_CELLS>_<Y_CELLS>.top
Sheet stack coordinates and topology in extended box (if specfied box height > height of clay sheet stack) <SYSNAME>_<X_CELLS>_<Y_CELLS>_ext.gro
and <SYSNAME>_<X_CELLS>_<Y_CELLS>_ext.top
Sheet stack coordinates and topology in extended and solvated box (if bulk solvation is specified and specfied box height > height of clay sheet stack) <SYSNAME>_<X_CELLS>_<Y_CELLS>_solv.gro
and <SYSNAME>_<X_CELLS>_<Y_CELLS>_solv.top
Sheet stack coordinates and topology in extended and solvated box with ions (if bulk solvation is specified and specified box height > height of clay sheet stack) <SYSNAME>_<X_CELLS>_<Y_CELLS>_solv_ions.gro
and <SYSNAME>_<X_CELLS>_<Y_CELLS>_solv_ions.top
Sheet stack coordinates and topology in box after energy minimisation <SYSNAME>_<X_CELLS>_<Y_CELLS>_<sheetnumber>_em.gro
and <SYSNAME>_<X_CELLS>_<Y_CELLS>_<sheetnumber>_em.top
Sheet stack energy minimisation parameter file and log<SYSNAME>_<X_CELLS>_<Y_CELLS>_<sheetnumber>_em.mdp
and <SYSNAME>_<X_CELLS>_<Y_CELLS>_<sheetnumber>_em.log
Setup log file <SYSNAME>_<X_CELLS>_<Y_CELLS>_<sheetnumber>.log
The output generated in the nontronite tutorial executing command:
+ClayCode builder -f Tutorial/NAu1.yaml
+
+asking to generate clay named NAu-1-fe using 7 x 5 x 3 unit cells, featuring adding interlayer water and ions and solvated.
+The output files are as follows:
+CWD
+│
+│
+└───Tutorials
+│ NAu1.yaml
+│ clay_conf.csv
+│ ...
+│
+└─── NAu-1-fe
+
+ │ NAu-1-fe_exp_df.csv
+ │ NAu-1-fe_match_df.csv
+ │ NAu-1-fe_7_5_0.gro
+ │ NAu-1-fe_7_5_1.gro
+ │ NAu-1-fe_7_5_2.gro
+ │ NAu-1-fe_7_5_interlayer.gro
+ │ NAu-1-fe_7_5_interlayer.top
+ │ NAu-1-fe_7_5.gro
+ │ NAu-1-fe_7_5.top
+ │ NAu-1-fe_7_5_ext.gro
+ │ NAu-1-fe_7_5_ext.top
+ │ NAu-1-fe_7_5_solv.gro
+ │ NAu-1-fe_7_5_solv.top
+ │ NAu-1-fe_7_5_solv_ions.mdp
+ │ NAu-1-fe_7_5_solv_ions.log
+ │ NAu-1-fe_7_5_solv_ions.gro
+ │ NAu-1-fe_7_5_solv_ions.top
+ │ NAu-1-fe_7_5_2307041912.log
+
+
+ Pyrophyllite is a phyllosilicate mineral composed of aluminium silicate hydroxide: Al2Si4O10(OH)2.
+non-charged
+can be with Fe-incorporated, example: +https://hal.science/insu-00160523/
+or
+Pütürge pyrophyllite with small iron and chromium contents has a bright white colour after firing, and it is has been used in white cement production, where it is known to produce the whitest cement in Europe (Uygun & Solakoğlu, Reference Uygun and Solakoğlu2002).
+https://www.cambridge.org/core/journals/clay-minerals/article/beneficiation-of-the-puturge-pyrophyllite-ore-by-flotation-mineralogical-and-chemical-evaluation/2E4E88D5CF9A97EAFCE9E6997E2AB1DA
+There is no .CSV file, as quite simple set up, using 1 (or 2 if incl. some Fe) UCs:
+from the D21_UCs_infor.csv
+
+UC,st,at,fet,ao,feo,fe2,mgo,cao,lio,mgh,cah,C_Td,C_Oct,Comments
+D221,8,0,0,4,0,0,0,0,0,0,0,0,0,Smectite UC neutral
+D228,8,0,0,3,1,0,0,0,0,0,0,0,0,Smectite UC neutral Oct Fe3
+
+
+The .yaml file can set up with something like this:
+# required UCs to builder system as list
+UC_INDEX_LIST: [D221 D228]
+
+# probability list of unit cells in system
+UC_RATIOS_LIST: [0.9 0.1]
+
+ClayCode builder -f Tutorial/Pyr.yaml
+
+
+ ' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/search/search_index.json b/search/search_index.json new file mode 100644 index 00000000..024288a3 --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"ClayCode generates clay mineral structures based upon their natural partially ocupied unit cell compositions and assigns ClayFF forecefield parameters, generating all the input files ready for simulation with Gromacs software. Here Quick Start User Guide Tutorials On GitHub GitHub Project Report bugs and give sugestions for future improvements and new features via issues Contribute via branches and pull requests Claycode is published under the MIT License ClayCode is developed by Hannah Pollak, Matteo Degiacomi and Valentina Erastova, University of Edinburgh, 2023 Please CITE us: HP, MTD, VE \"ClayCode: setting up clay structures from simulation in Gromacs\", DOI: XXX","title":"Home"},{"location":"#here","text":"Quick Start User Guide Tutorials","title":"Here"},{"location":"#on-github","text":"GitHub Project Report bugs and give sugestions for future improvements and new features via issues Contribute via branches and pull requests Claycode is published under the MIT License ClayCode is developed by Hannah Pollak, Matteo Degiacomi and Valentina Erastova, University of Edinburgh, 2023 Please CITE us: HP, MTD, VE \"ClayCode: setting up clay structures from simulation in Gromacs\", DOI: XXX","title":"On GitHub"},{"location":"CSV/","text":"Clay stoicheometry in CSV format Including into Input Parameter File The .CSV file must be included into the INPUT .YAML file : the path to the CSV file is specified under CLAY_COMP , target occupancies from the CSV file are given by SYSNAME , corresponding to the clay name. e.g.: CLAY_COMP: /path/to/clay_comp.csv SYSNAME: NAu-1-fe File Structure First column: sheet for tetrahedral ( T ) and octahedral ( O ) occupancies; interlayer ion ( I ) ocupansies, if the total charge ( tot second column) is non-zero; T , O and total ( tot ) average unit cell charge ( C ). Second column with element : Atom names (if atom is not supported by ClayFF.FF, ClayCode.builder will try to assign it to the supported atom of same charge and re-assign the ocupansies); charges for the T layer, O layer and tot total; The oxidation state of clay atoms can be specified by adding the charge after the element name (e.g. Fe2). Rules Occupancies: Total occupancies for each dioctahedral/trioctahedral tetrahedral ( T ) sheet should sum up to 4. For octahedral ( O ) sheets, the total occupancies should amount to 4/3 for dioctahedral/trioctahedral unit cell types, respectively. For example, the occupancies of a dioctahedral 2:1 clay (TOT) should have T occupancies of 8, and O occupancies of 4; Experimental stoichiometries do not necessarily sum up to interger occupancies. ClayCode.builder will first process the target composition such that the occupancies match those expected for the specified unit cell type . Interlayer Ions: Interlayer ions will be added to compensate the total charge imbalance resulting from substitutions. The ratio of these ions can be specified in the I section. The sum of all ion contributions should sum to 1. Only ion species of the opposite sign to the layer charge will be considered. Iron 2+/3+: There is no need to specify how much of the total iron is Fe3+ or Fe2+ if at least two values among the total, T and O unit cell charge are specified. ClayCode.builder can perform the splitting between the two iron species. Supplied CSV file The supplied file within directory Tutorial is exp_clay.csv and contains clay structures corresponding to the Source Clays listed under \"Physical and Chemical Data of Source Clays\" clays.org . 1:1 (TO) dioctohedral smectite: Kaolin KGa-1; 2:1 (TOT) dioctohedral smectite: Na-Montmorillonite (Wyoming) SWy-1, Illite IMt-1, Ferruginous Smectite SWa-1, Nontronite NAu-1-fe, Nontronite NAu-2-fe, Nontronite NG-1; example Al-Mg 3:1 layered double hydroxide (not via clays.org ): LDH31. Example Example from clay_comp.csv file for NAu-1 and NAu-2 nontronite clays: sheet element NAu-1-fe NAu-2-fe T Si 6.98 7.55 T Al 0.95 0.16 T Fe3 0.07 0.29 O Fe 3.61 3.54 O Al 0.36 0.34 O Mg 0.04 0.05 I Ca 0.525 0.36 I Na 0 0 I Mg 0 0 I K 0 0 I Cl 0 0 C T -1.02 -0.45 C O -0.03 -0.27 C tot -1.05 -0.72","title":"CSV"},{"location":"CSV/#clay-stoicheometry-in-csv-format","text":"","title":"Clay stoicheometry in CSV format"},{"location":"CSV/#including-into-input-parameter-file","text":"The .CSV file must be included into the INPUT .YAML file : the path to the CSV file is specified under CLAY_COMP , target occupancies from the CSV file are given by SYSNAME , corresponding to the clay name. e.g.: CLAY_COMP: /path/to/clay_comp.csv SYSNAME: NAu-1-fe","title":"Including into Input Parameter File"},{"location":"CSV/#file-structure","text":"First column: sheet for tetrahedral ( T ) and octahedral ( O ) occupancies; interlayer ion ( I ) ocupansies, if the total charge ( tot second column) is non-zero; T , O and total ( tot ) average unit cell charge ( C ). Second column with element : Atom names (if atom is not supported by ClayFF.FF, ClayCode.builder will try to assign it to the supported atom of same charge and re-assign the ocupansies); charges for the T layer, O layer and tot total; The oxidation state of clay atoms can be specified by adding the charge after the element name (e.g. Fe2).","title":"File Structure"},{"location":"CSV/#rules","text":"","title":"Rules"},{"location":"CSV/#occupancies","text":"Total occupancies for each dioctahedral/trioctahedral tetrahedral ( T ) sheet should sum up to 4. For octahedral ( O ) sheets, the total occupancies should amount to 4/3 for dioctahedral/trioctahedral unit cell types, respectively. For example, the occupancies of a dioctahedral 2:1 clay (TOT) should have T occupancies of 8, and O occupancies of 4; Experimental stoichiometries do not necessarily sum up to interger occupancies. ClayCode.builder will first process the target composition such that the occupancies match those expected for the specified unit cell type .","title":"Occupancies:"},{"location":"CSV/#interlayer-ions","text":"Interlayer ions will be added to compensate the total charge imbalance resulting from substitutions. The ratio of these ions can be specified in the I section. The sum of all ion contributions should sum to 1. Only ion species of the opposite sign to the layer charge will be considered.","title":"Interlayer Ions:"},{"location":"CSV/#iron-23","text":"There is no need to specify how much of the total iron is Fe3+ or Fe2+ if at least two values among the total, T and O unit cell charge are specified. ClayCode.builder can perform the splitting between the two iron species.","title":"Iron 2+/3+:"},{"location":"CSV/#supplied-csv-file","text":"The supplied file within directory Tutorial is exp_clay.csv and contains clay structures corresponding to the Source Clays listed under \"Physical and Chemical Data of Source Clays\" clays.org . 1:1 (TO) dioctohedral smectite: Kaolin KGa-1; 2:1 (TOT) dioctohedral smectite: Na-Montmorillonite (Wyoming) SWy-1, Illite IMt-1, Ferruginous Smectite SWa-1, Nontronite NAu-1-fe, Nontronite NAu-2-fe, Nontronite NG-1; example Al-Mg 3:1 layered double hydroxide (not via clays.org ): LDH31.","title":"Supplied CSV file"},{"location":"CSV/#example","text":"Example from clay_comp.csv file for NAu-1 and NAu-2 nontronite clays: sheet element NAu-1-fe NAu-2-fe T Si 6.98 7.55 T Al 0.95 0.16 T Fe3 0.07 0.29 O Fe 3.61 3.54 O Al 0.36 0.34 O Mg 0.04 0.05 I Ca 0.525 0.36 I Na 0 0 I Mg 0 0 I K 0 0 I Cl 0 0 C T -1.02 -0.45 C O -0.03 -0.27 C tot -1.05 -0.72","title":"Example"},{"location":"YAML/","text":"ClayCode.builder System Specifications YAML file ClayCode.builder reads the parameters specified in this file. Required Parameters The first section contains general parameters that are required for the model construction. OUTPATH - output directory path [str] Directory in which output folder is created. SYSNAME - clay system name [str] Th name for clay type, must to match a column header in the CSV file, the created output folder will also have this name. Avoid spaces and unusual symbols. CLAY_COMP - filename.csv [str] Name of CSV file where the target stoichiometry for the system specified under SYSNAME . CLAY_TYPE - unit cell type [str] Clay unit cell type, available in data/UCS directory. Such as: Dioctahedral 2:1 - D21 Trioctahedral 2:1 - T21 Dioctahedral 1:1 - D11 Trioctahedral 1:1 - T11 layered double hydroxide 3:1 - L31 layered double hydroxide 2:1 - L21 Sepiolite - SEP Note : Only D21, D11 and L31 are supplied with current release. Example: # output directory path OUTPATH: /path/to/output/directory # name of system SYSNAME: NAu-1-fe # name of CSV file with target stoichiometry CLAY_COMP: /path/to/clay_comp.csv # clay type CLAY_TYPE: D21 # Dioctahedral 2:1 - D21 Optional Parameters This is an optional parameter section, if the directives are not given by the user, ClayCode.builder will use default values. Clay Sheet Size X_CELLS - Unit cell number [int] (Default: 7) Number of unit cells in x-direction. Note : Future version will have the option to specify target x-dimensions X_DIM Y_CELLS - Unit cell number [int] (Default: 5) Number of unit cells in y-direction. Note : Future version will have the option to specify target y-dimensions Y_DIM N_SHEETS - Unit cell number [int] (Default: 3) Number of sheets of 1 unit cell thickness to be stacked in z-direction. Example: # number of unit cells in x direction (Default 7) X_CELLS: 7 # number of unit cells in y direction (Default 5) Y_CELLS: 5 # number of unit cells in z direction (Default 3) N_SHEETS: 3 Clay Composition ClayCode.builder calculates the number and type of unit cells necessary to match the desired composition, as given in CSV file. If, instead, the user would like to specify this manually, the following parameters can be used: UC_INDEX_LIST - unit cell list [list] required unit cells, as specified in data/UCS directory, to use for building the system UC_RATIOS_LIST - probabilities [list] probability list for the above unit cells, total probability must be 1.00 Example: The following script will use the dioctohedral 2:1 unit cells, which are both neutral smectite unit cells, with the latter having 1 octohedral Al substitution for the Fe3. This will produce a neutral smectite with the following stoichiometry: \\mathrm{Si_8 \\left[Al_{3.8}Fe_{0.2}\\right]} . # required UCs to builder system as list UC_INDEX_LIST: [D221 D228] # probability list of unit cells in system UC_RATIOS_LIST: [0.8 0.2] Interlayer Solvent and Ions IL_SOLV - interlayer solvent presence [bool] (Default: True ) If True interlayer space should be solvated, otherwise False will produce non-hydrated clay. There are three options to handle interlayer water and interlayer ions, only one should be specified : ION_WATERS - number of waters per ion [int, Dict[str: int]] Number of water molecules that should be added per ion. If a single number [int] is given, all of the ions will be hydrated by the same number of waters. To specify number of waters per ion-type the entry should be a citionary, then the total number of water molecules will be mapped to the specifications given for each of the interlayer occupancies I in the CSV entry. Example: A given number of waters will be added for each cation, which quantity is specified in the clay stoichiometry CSV file. ION_WATERS: Ca: 12 Na: 12 K: 10 UC_WATERS - number of water molecules per unit cell [int] The specified number of water molecules multiplied by the number of unit cells is added into each of the interlayer spaces. SPACING_WATERS - hydrated interleyer spacing, in A [float] (Default 10.0 A) Target interlayer spacing filled with water, final value may vary due to the water rearrangement when in contact with clay surface and packing around ions. Simulation Box Specifications BOX_HEIGHT - simulation box height in A [float] Size of the final simulation box in z-direction in A, note the clay layers are positioned in xy-plane. BULK_SOLV - bulk solvent presence [bool] (Default: True ) If True the box space will be filled with water, otherwise False will keep the box empty. This is useful if further plan is to add other species, such as oil, into the system. BULK_IONS - type of ions and their concentration in mol/L [int, Dict[str: int]] Ions to be added into the bulk solvated space. Note : GROMACS will not be happy if the system is not neutral! Example: This will create a simulation box of 120 A height, filled with 0.1 M NaCl solution. # full simulation box height in A BOX_HEIGHT: 120.0 # Bulk solvent added or not (Default: True) BULK_SOLV: True BULK_IONS: Na: 0.1 Cl: 0.1 GROMACS version specification Sometimes more than one version of GROMACS may be installed, this allows user to specify the one to use. GMX - bash alias for your favourite GROMACS version [str] Example: To use your MPI-compiled version: GMX: gmx_mpi ClayCode.siminp System Specifications YAML file ClayCode.simpinp reads the parameters specified in this file and generates simulation inputs for GROMACS. Coming soon...","title":"YAML"},{"location":"YAML/#claycodebuilder-system-specifications-yaml-file","text":"ClayCode.builder reads the parameters specified in this file.","title":"ClayCode.builder System Specifications YAML file"},{"location":"YAML/#required-parameters","text":"The first section contains general parameters that are required for the model construction. OUTPATH - output directory path [str] Directory in which output folder is created. SYSNAME - clay system name [str] Th name for clay type, must to match a column header in the CSV file, the created output folder will also have this name. Avoid spaces and unusual symbols. CLAY_COMP - filename.csv [str] Name of CSV file where the target stoichiometry for the system specified under SYSNAME . CLAY_TYPE - unit cell type [str] Clay unit cell type, available in data/UCS directory. Such as: Dioctahedral 2:1 - D21 Trioctahedral 2:1 - T21 Dioctahedral 1:1 - D11 Trioctahedral 1:1 - T11 layered double hydroxide 3:1 - L31 layered double hydroxide 2:1 - L21 Sepiolite - SEP Note : Only D21, D11 and L31 are supplied with current release. Example: # output directory path OUTPATH: /path/to/output/directory # name of system SYSNAME: NAu-1-fe # name of CSV file with target stoichiometry CLAY_COMP: /path/to/clay_comp.csv # clay type CLAY_TYPE: D21 # Dioctahedral 2:1 - D21","title":"Required Parameters"},{"location":"YAML/#optional-parameters","text":"This is an optional parameter section, if the directives are not given by the user, ClayCode.builder will use default values.","title":"Optional Parameters"},{"location":"YAML/#clay-sheet-size","text":"X_CELLS - Unit cell number [int] (Default: 7) Number of unit cells in x-direction. Note : Future version will have the option to specify target x-dimensions X_DIM Y_CELLS - Unit cell number [int] (Default: 5) Number of unit cells in y-direction. Note : Future version will have the option to specify target y-dimensions Y_DIM N_SHEETS - Unit cell number [int] (Default: 3) Number of sheets of 1 unit cell thickness to be stacked in z-direction. Example: # number of unit cells in x direction (Default 7) X_CELLS: 7 # number of unit cells in y direction (Default 5) Y_CELLS: 5 # number of unit cells in z direction (Default 3) N_SHEETS: 3","title":"Clay Sheet Size"},{"location":"YAML/#clay-composition","text":"ClayCode.builder calculates the number and type of unit cells necessary to match the desired composition, as given in CSV file. If, instead, the user would like to specify this manually, the following parameters can be used: UC_INDEX_LIST - unit cell list [list] required unit cells, as specified in data/UCS directory, to use for building the system UC_RATIOS_LIST - probabilities [list] probability list for the above unit cells, total probability must be 1.00 Example: The following script will use the dioctohedral 2:1 unit cells, which are both neutral smectite unit cells, with the latter having 1 octohedral Al substitution for the Fe3. This will produce a neutral smectite with the following stoichiometry: \\mathrm{Si_8 \\left[Al_{3.8}Fe_{0.2}\\right]} . # required UCs to builder system as list UC_INDEX_LIST: [D221 D228] # probability list of unit cells in system UC_RATIOS_LIST: [0.8 0.2]","title":"Clay Composition"},{"location":"YAML/#interlayer-solvent-and-ions","text":"IL_SOLV - interlayer solvent presence [bool] (Default: True ) If True interlayer space should be solvated, otherwise False will produce non-hydrated clay. There are three options to handle interlayer water and interlayer ions, only one should be specified : ION_WATERS - number of waters per ion [int, Dict[str: int]] Number of water molecules that should be added per ion. If a single number [int] is given, all of the ions will be hydrated by the same number of waters. To specify number of waters per ion-type the entry should be a citionary, then the total number of water molecules will be mapped to the specifications given for each of the interlayer occupancies I in the CSV entry. Example: A given number of waters will be added for each cation, which quantity is specified in the clay stoichiometry CSV file. ION_WATERS: Ca: 12 Na: 12 K: 10 UC_WATERS - number of water molecules per unit cell [int] The specified number of water molecules multiplied by the number of unit cells is added into each of the interlayer spaces. SPACING_WATERS - hydrated interleyer spacing, in A [float] (Default 10.0 A) Target interlayer spacing filled with water, final value may vary due to the water rearrangement when in contact with clay surface and packing around ions.","title":"Interlayer Solvent and Ions"},{"location":"YAML/#simulation-box-specifications","text":"BOX_HEIGHT - simulation box height in A [float] Size of the final simulation box in z-direction in A, note the clay layers are positioned in xy-plane. BULK_SOLV - bulk solvent presence [bool] (Default: True ) If True the box space will be filled with water, otherwise False will keep the box empty. This is useful if further plan is to add other species, such as oil, into the system. BULK_IONS - type of ions and their concentration in mol/L [int, Dict[str: int]] Ions to be added into the bulk solvated space. Note : GROMACS will not be happy if the system is not neutral! Example: This will create a simulation box of 120 A height, filled with 0.1 M NaCl solution. # full simulation box height in A BOX_HEIGHT: 120.0 # Bulk solvent added or not (Default: True) BULK_SOLV: True BULK_IONS: Na: 0.1 Cl: 0.1","title":"Simulation Box Specifications"},{"location":"YAML/#gromacs-version-specification","text":"Sometimes more than one version of GROMACS may be installed, this allows user to specify the one to use. GMX - bash alias for your favourite GROMACS version [str] Example: To use your MPI-compiled version: GMX: gmx_mpi","title":"GROMACS version specification"},{"location":"YAML/#claycodesiminp-system-specifications-yaml-file","text":"ClayCode.simpinp reads the parameters specified in this file and generates simulation inputs for GROMACS. Coming soon...","title":"ClayCode.siminp System Specifications YAML file"},{"location":"builder/","text":"ClayCode.builder Builds clay models based on average target occupancies for a specified unit cell type. ClayCode.builder will match a combination of differently substituted unit cells to fit the average target occupancies specified by the user. Usage Arguments for builder are: -f : System specifications YAML file (include .csv file path) -comp : Clay composition in CSV format (can also be given in system specifications YAML, see Pyrophyllite Tutorial ) --manual_setup : (run builder in interactive mode) Example: ClayCode builder -f path/to/input_Clay.yaml","title":"ClayCode.builder"},{"location":"builder/#claycodebuilder","text":"Builds clay models based on average target occupancies for a specified unit cell type. ClayCode.builder will match a combination of differently substituted unit cells to fit the average target occupancies specified by the user.","title":"ClayCode.builder"},{"location":"builder/#usage","text":"Arguments for builder are: -f : System specifications YAML file (include .csv file path) -comp : Clay composition in CSV format (can also be given in system specifications YAML, see Pyrophyllite Tutorial ) --manual_setup : (run builder in interactive mode)","title":"Usage"},{"location":"builder/#example","text":"ClayCode builder -f path/to/input_Clay.yaml","title":"Example:"},{"location":"developers/","text":"developers guide coming soon ... Code structure: Modules: ClayCode.builder ClayCode.siminp ClayCode.config ClayCode.data ClayCode.tests Environemnt set up files: setup.py ... The code structure is as follows: ClayCode \u2502 \u251c\u2500\u2500 builder \u2502 \u251c\u2500\u2500 config \u2502 \u2514\u2500\u2500 tests \u2502 \u2514\u2500\u2500 data \u251c\u2500\u2500 config \u251c\u2500\u2500 core \u251c\u2500\u2500 data \u2502 \u251c\u2500\u2500 FF \u2502 \u2502 \u251c\u2500\u2500 ClayFF_Fe.ff \u2502 \u251c\u2500\u2500 MDP \u2502 \u251c\u2500\u2500 UCS \u2502 \u2502 \u251c\u2500\u2500 D11 \u2502 \u2502 \u251c\u2500\u2500 D21 \u2502 \u2502 \u2514\u2500\u2500 LDH31 \u2502 \u2514\u2500\u2500 user \u2514\u2500\u2500 siminp","title":"Developers Guide"},{"location":"developers/#code-structure","text":"Modules: ClayCode.builder ClayCode.siminp ClayCode.config ClayCode.data ClayCode.tests Environemnt set up files: setup.py ... The code structure is as follows: ClayCode \u2502 \u251c\u2500\u2500 builder \u2502 \u251c\u2500\u2500 config \u2502 \u2514\u2500\u2500 tests \u2502 \u2514\u2500\u2500 data \u251c\u2500\u2500 config \u251c\u2500\u2500 core \u251c\u2500\u2500 data \u2502 \u251c\u2500\u2500 FF \u2502 \u2502 \u251c\u2500\u2500 ClayFF_Fe.ff \u2502 \u251c\u2500\u2500 MDP \u2502 \u251c\u2500\u2500 UCS \u2502 \u2502 \u251c\u2500\u2500 D11 \u2502 \u2502 \u251c\u2500\u2500 D21 \u2502 \u2502 \u2514\u2500\u2500 LDH31 \u2502 \u2514\u2500\u2500 user \u2514\u2500\u2500 siminp","title":"Code structure:"},{"location":"imt/","text":"imt.md Illite IMt-1 and IMt-2 ORIGIN: Silver Hill, Montana, USA CHEMICAL COMPOSITION (%): SiO2: 49.3 Al2O3: 24.25, TiO2: 0.55, Fe2O3:7.32, FeO: 0.55, MnO: 0.03, MgO: 2.56, CaO: 0.43, Na2O: 0, K2O: 7.83, P2O5: 0.08, LOI: 8.02 STRUCTURE: (Mg.09 Ca.06 K1.37)[Al2.69 Fe(III).76 Fe(II).06 Mntr Mg.43 Ti.06][Si6.77 Al1.23]O20(OH)4, Octahedral charge:-.44, Tetrahedral charge:-1.23, Interlayer charge:-1.68, Unbalanced charge:0.00 The supplied exp_clay.csv file and contains clay structures corresponding to the Source Clays listed under \"Physical and Chemical Data of Source Clays\" clays.org . NO interlayer water ClayCode builder -f path/to/input_Clay.yaml","title":"Illite"},{"location":"kao/","text":"Kaolinite NOTE treatment of the Ti in the structure and what is the origin of the Ti, why to ignore Kaolin KGa-1(KGa-1b), (low-defect) ORIGIN: Tuscaloosa formation? (Cretaceous?) (stratigraphy uncertain) County of Washington, State of Georgia, USA LOCATION: 32\u00b058\u2032 N-82\u00b053\u2032 W approximately, topographic map Tabernacle, Georgia N 3252.5-W 8252.5/7.5, Collected from face of Coss-Hodges pit, October 3,1972. CHEMICAL COMPOSITION (%): SiO2: 44.2, Al2O3: 39.7, TiO2: 1.39, Fe2O3: 0.13,FeO: 0.08, MnO: 0.002, MgO: 0.03, CaO: n.d., Na2O: 0.013, K2O: 0.05, F:0.013,P2O5: 0.034, Loss on heating: -550\u00b0C: 12.6; 550-1000\u00b0C: 1.18. CATION EXCHANGE CAPACITY (CEC): 2.0 meq/100g SURFACE AREA: N2 area: 10.05 +/- 0.02 m2 /g THERMAL ANALYSIS: DTA: endotherm at 630oC, exotherm at 1015oC, TG: dehydroxylation weight loss 13.11% (theory 14%) indicating less than 7% impurities. INFRARED SPECTROSCOPY: Typical spectrum for well crystallized kaolinite,however not as well crystallized as a typical China clay from Cornwall,as judged from the intensity of the 3669 cm-1 band. Splitting of the 1100cm- 1 band is due to the presence of coarse crystals. STRUCTURE:(Mg.02 Ca.01 Na.01 K.01)[Al3.86 Fe(III).02 Mntr Ti.11][Si3.83Al.17] O10(OH)8, Octahedral charge:.11, Tetrahedral charge:-.17,Interlayer charge:-.06, Unbalanced charge:0.00 The supplied exp_clay.csv file and contains clay structures corresponding to the Source Clays listed under \"Physical and Chemical Data of Source Clays\" clays.org . Removing invalid atom types: sheet - at-type: occupancy O - Mn : 0.00, O - Ti : 0.11 Could not guess Ti charge. Enter Ti charge value: (or exit with 'e') 4 Assuming Ti charge of 4. Getting sheet occupancies: Found 'O' sheet occupancies of 3.8800/4.0000 (-0.1200) Found 'T' sheet occupancies of 4.0000/4.0000 (+0.0000) Adjusting values to match expected occupancies: old occupancies -> new occupancies per unit cell: sheet - atom type : occupancies (difference) 'O' - 'ao' : 3.8600 -> 3.9800 (+0.1200) Splitting total iron content (0.0200) to match charge. Will use the following target composition: 'T' - 'at' : 0.1700 'T' - 'st' : 3.8300 'O' - 'ao' : 3.9800 'O' - 'feo' : 0.0200 Writing new target clay composition to 'KGa-1_exp_df.csv' ClayCode builder -f path/to/input_Clay.yaml","title":"Kaolinite"},{"location":"ldh/","text":"ldh example 3:1 Al-Mg LDH ClayCode builder -f path/to/input_Clay.yaml","title":"LDH"},{"location":"mmt/","text":"Montmorillonite Clay composition Wyoming montmorillonite is widely studied and used smectite. It is available for purchase from Source Clays of The Clay Minerals Society , and is identified as SWy-1, SWy-2 or SWy-3, depending on the batch. This is a well-characterised clay with the structure listed under \"Physical and Chemical Data of Source Clays\" at the clays.org , as: Swy-1: \\mathrm {Ca_{0.12} Na_{0.32} K_{0.05} ~\\left[ Si_{7.98} Al_{0.02}\\right]^{-0.02} \\left[ Al_{3.01} Fe^{III}_{0.41} Mn_{0.01} Mg_{0.54} Ti_{0.02}\\right]^{-0.52} } , with unbalanced charge of 0.05. Ti is often identified during clay analysis, but is attributed to the TiO inclusions, therefore, we will omit it in the input. Meanwhile, ClayFF force field does not have parameters for Mn, which is shown at the level of detection and so we will also omit this entry. The provided clay_comp.csv file contains an entry SWy-1 which corresponds to this Wyoming montmorillonite clay. Construction of the model Let's examine the Swy1.yaml , which is provided in the Tutorial directory. This file contains all of the information necessary to build the clay model. Please consult YAML for the parameter description Required parameters # ============================================================================= # General specifications for clay model construction # ============================================================================= # ============================================================================= # Required Parameters # ============================================================================= OUTPATH: . # name of system to call according to CLAY_COMP (exp_clay.csv) # compositions currently included are: 'NAu-1-fe' 'NAu-2-fe' 'NG-1' 'SWa-1' 'LDH31' 'IMt-1' 'KGa-1' SYSNAME: SWy-1 # specify whether new clay model should be constructed: # new - a new clay model is constructed # load - sheet coordinates or unit cell sequences are loaded from existent .gro or .npy files # load: [X, Y] # with X - 'np' or 'gro', Y - '.npy' or '.gro' filename # False - no clay model is constructed BUILD: new # name of .csv file with target stoichiometry CLAY_COMP: exp_clay.csv # clay type available options in 'clay_units' directory: # Dioctahedral 2:1 - D21 # Trioctahedral 2:1 - T21 # Dioctahedral 1:1 - D11 # Trioctahedral 1:1 - T11 # layered double hydroxide 3:1 - L31 # layered double hydroxide 2:1 - L21 # Sepiolite - SEP CLAY_TYPE: D21 # ============================================================================= # Optional: Clay Sheet and Interlayer Specifications # ============================================================================= # number of unit cells in x direction (Default 7) X_CELLS: 7 # number of unit cells in y direction (Default 5) Y_CELLS: 5 # number of unit cells in z direction (Default 3) N_SHEETS: 3 # ---------------------------------------------------------------------------- # Optional: Unit Cell Composition and Ratios input # if not given, these will be calculated from data in the CLAY_COMP .csv file # (Default UC_INDEX_LIST: [], UC_RATIOS_LIST: []) # ----------------------------------------------------------------------------- # required UCs to builder system as list # UC_INDEX_LIST: [1] # probability list of unit cells in system # p(tot): 1.00 # UC_RATIOS_LIST: [1] # ----------------------------------------------------------------------------- # interlayer solvent present or not (Default True) IL_SOLV: True # ----------------------------------------------------------------------------- # Optional: Interlayer Ion Specification Options (comment the other options!) # (Default UC_WATERS: 20) # ----------------------------------------------------------------------------- # 1. Number of water molecules that should be added per ion (ION_WATERS) # a. as ion species dictionary for hydration number # ION_WATERS: {'Ca': 12, # 'Na': 12 # } # b. as ion species int for hydration number # ION_WATERS : 12 # 3. OR per unit cell #UC_WATERS: 25 # 4. OR for a target d-spacing value in A SPACING_WATERS: 20 # ============================================================================= # Optional: Simulation Box Specifications # ============================================================================= # full simulation box height in A (Default 150.0) BOX_HEIGHT: 150.0 # ============================================================================= # Optional: Solvation and Bulk Ions Specifications # ============================================================================= # Bulk solvent added or not (Default: True) BULK_SOLV: True # Ion species and concentration in mol/L name to add in bulk solvent # (Default: BULK_IONS: # Na: 0.1) BULK_IONS: Na: 0.1 Cl: 0.05 # ============================================================================= # Optional: Simulation Runs Specifications # ============================================================================= # Generate scripts and '.mdp' files for simulation runs. # Available options: # EM - energy minimisation # EQ - equilibration # D-SPACE - d-spacing equilibration # P - production # SIMINP: [EM, D-SPACE] # select where EM and EQ should be run (Default: False) # MDRUNS_REMOTE: False # ----------------------------------------------------------------------------- # d-spacing equilibration options # ----------------------------------------------------------------------------- # Target d-spacing in A # D_SPACE: 19.5 # Water molecules to be removed at a time during d-spacing equilibration runs # REMOVE_STEPS: 1000 # Absolute number of water molecules per interlayer space # SHEET_WAT: 2 # Number of water molecules per unit cell # UC_WAT: 0.1 # Percentage of water molecules from interlayer # PERCENT_WAT: 5 # ----------------------------------------------------------------------------- # bash alias for used GROMACS version # ----------------------------------------------------------------------------- GMX: gmx run as ClayCode builder -f path/to/input_Clay.yaml","title":"Montmorillonite"},{"location":"mmt/#montmorillonite","text":"","title":"Montmorillonite"},{"location":"mmt/#clay-composition","text":"Wyoming montmorillonite is widely studied and used smectite. It is available for purchase from Source Clays of The Clay Minerals Society , and is identified as SWy-1, SWy-2 or SWy-3, depending on the batch. This is a well-characterised clay with the structure listed under \"Physical and Chemical Data of Source Clays\" at the clays.org , as: Swy-1: \\mathrm {Ca_{0.12} Na_{0.32} K_{0.05} ~\\left[ Si_{7.98} Al_{0.02}\\right]^{-0.02} \\left[ Al_{3.01} Fe^{III}_{0.41} Mn_{0.01} Mg_{0.54} Ti_{0.02}\\right]^{-0.52} } , with unbalanced charge of 0.05. Ti is often identified during clay analysis, but is attributed to the TiO inclusions, therefore, we will omit it in the input. Meanwhile, ClayFF force field does not have parameters for Mn, which is shown at the level of detection and so we will also omit this entry. The provided clay_comp.csv file contains an entry SWy-1 which corresponds to this Wyoming montmorillonite clay.","title":"Clay composition"},{"location":"mmt/#construction-of-the-model","text":"Let's examine the Swy1.yaml , which is provided in the Tutorial directory. This file contains all of the information necessary to build the clay model. Please consult YAML for the parameter description","title":"Construction of the model"},{"location":"mmt/#required-parameters","text":"# ============================================================================= # General specifications for clay model construction # ============================================================================= # ============================================================================= # Required Parameters # ============================================================================= OUTPATH: . # name of system to call according to CLAY_COMP (exp_clay.csv) # compositions currently included are: 'NAu-1-fe' 'NAu-2-fe' 'NG-1' 'SWa-1' 'LDH31' 'IMt-1' 'KGa-1' SYSNAME: SWy-1 # specify whether new clay model should be constructed: # new - a new clay model is constructed # load - sheet coordinates or unit cell sequences are loaded from existent .gro or .npy files # load: [X, Y] # with X - 'np' or 'gro', Y - '.npy' or '.gro' filename # False - no clay model is constructed BUILD: new # name of .csv file with target stoichiometry CLAY_COMP: exp_clay.csv # clay type available options in 'clay_units' directory: # Dioctahedral 2:1 - D21 # Trioctahedral 2:1 - T21 # Dioctahedral 1:1 - D11 # Trioctahedral 1:1 - T11 # layered double hydroxide 3:1 - L31 # layered double hydroxide 2:1 - L21 # Sepiolite - SEP CLAY_TYPE: D21 # ============================================================================= # Optional: Clay Sheet and Interlayer Specifications # ============================================================================= # number of unit cells in x direction (Default 7) X_CELLS: 7 # number of unit cells in y direction (Default 5) Y_CELLS: 5 # number of unit cells in z direction (Default 3) N_SHEETS: 3 # ---------------------------------------------------------------------------- # Optional: Unit Cell Composition and Ratios input # if not given, these will be calculated from data in the CLAY_COMP .csv file # (Default UC_INDEX_LIST: [], UC_RATIOS_LIST: []) # ----------------------------------------------------------------------------- # required UCs to builder system as list # UC_INDEX_LIST: [1] # probability list of unit cells in system # p(tot): 1.00 # UC_RATIOS_LIST: [1] # ----------------------------------------------------------------------------- # interlayer solvent present or not (Default True) IL_SOLV: True # ----------------------------------------------------------------------------- # Optional: Interlayer Ion Specification Options (comment the other options!) # (Default UC_WATERS: 20) # ----------------------------------------------------------------------------- # 1. Number of water molecules that should be added per ion (ION_WATERS) # a. as ion species dictionary for hydration number # ION_WATERS: {'Ca': 12, # 'Na': 12 # } # b. as ion species int for hydration number # ION_WATERS : 12 # 3. OR per unit cell #UC_WATERS: 25 # 4. OR for a target d-spacing value in A SPACING_WATERS: 20 # ============================================================================= # Optional: Simulation Box Specifications # ============================================================================= # full simulation box height in A (Default 150.0) BOX_HEIGHT: 150.0 # ============================================================================= # Optional: Solvation and Bulk Ions Specifications # ============================================================================= # Bulk solvent added or not (Default: True) BULK_SOLV: True # Ion species and concentration in mol/L name to add in bulk solvent # (Default: BULK_IONS: # Na: 0.1) BULK_IONS: Na: 0.1 Cl: 0.05 # ============================================================================= # Optional: Simulation Runs Specifications # ============================================================================= # Generate scripts and '.mdp' files for simulation runs. # Available options: # EM - energy minimisation # EQ - equilibration # D-SPACE - d-spacing equilibration # P - production # SIMINP: [EM, D-SPACE] # select where EM and EQ should be run (Default: False) # MDRUNS_REMOTE: False # ----------------------------------------------------------------------------- # d-spacing equilibration options # ----------------------------------------------------------------------------- # Target d-spacing in A # D_SPACE: 19.5 # Water molecules to be removed at a time during d-spacing equilibration runs # REMOVE_STEPS: 1000 # Absolute number of water molecules per interlayer space # SHEET_WAT: 2 # Number of water molecules per unit cell # UC_WAT: 0.1 # Percentage of water molecules from interlayer # PERCENT_WAT: 5 # ----------------------------------------------------------------------------- # bash alias for used GROMACS version # ----------------------------------------------------------------------------- GMX: gmx run as ClayCode builder -f path/to/input_Clay.yaml","title":"Required parameters"},{"location":"nont/","text":"Nontronites In this Tutorial we look at the two South Australian nontronite clays, part of the Source Clays of The Clay Minerals Society . These are commonly known as NAu-1 or the Uley green nontronite and NAu-2 or Uley brown nontronite. Their structures are listed under \"Physical and Chemical Data of Source Clays\" at the clays.org , as: NAu-1: \\mathrm{M^{+1} \\left[Si_{7}Al_{1}\\right] \\left[Al_{0.58}Fe_{3.38}Mg_{0.05}\\right]} NAu-2: \\mathrm{M^{+0.97} \\left[Si_{7.57}Al_{0.01}\\right] \\left[Al_{0.52}Fe_{3.32}Mg_{0.7}\\right]} , where \\mathrm{M^{charge}} indicates interlayer counter-balancing cationic charge. Assigning iron distribution and valence Iron can be present as either Fe(II) or Fe(III) and found in both, the tetrahedral and the octahedral sheets, as well as a charge compensating cation in the interlayer space space. Furthermore, in many samples, such as NAu-2, ferrihydrydes are adsorbed to clay surfaces. 1 While methods such as near-infrared (NIR), extended X-ray adsorption fine structures (EXAFS), Moessbauer spectroscopy, X-ray diffraction (XRD) and thermogravimetric analysis (TGA) have been used to determine the charge distributions of Fe in the sample, 2 3 4 the exact composition of these nontronites remains matter of debate. Conventionally, when Al and Fe(III), are present in a structure, because of their larger ionic radius, Fe(III) is assigned complitely to the octahedral sheet. Only once all octahedral spaces are occupied by Fe(III), the structure is assumed to also have Fe(III) in tetrahedral positions. However, this assignment is not necessarily correct and due to the detection limits of commonly used spectroscopic or chemical analysis techniques tetrahedral Fe(III) contents below 5% often remain undetected. 3 To this end, after a review of the literature, we use the structures identified by Gates et al 2 . We note that the octahedral occupancy fro NAu-2 is 3.93 instead of full 4. ClayCode will address this when generating the structure. Furthermore, we assign \\mathrm{Ca^{2+}} as counterbalancing ion to all the systems. Resulting structures are, therefore, as follows: NAu-1: \\mathrm{0.525 ~Ca^{2+} \\left[Si_{6.98}Al_{0.95}Fe_{0.07}\\right]^{-1.02} \\left[Al_{0.36}Fe_{3.61}Mg_{0.04}\\right]^{-0.03}} NAu-2: \\mathrm{0.36 ~Ca^{2+} \\left[Si_{7.55}Al_{0.16}Fe_{0.29}\\right]^{-0.45} \\left[Al_{0.34}Fe_{3.54}Mg_{0.05}\\right]^{-0.27}} Tutorial directory provides the clay_comp.csv file which contains the above clay structures. See CSV for details on this file. sheet element NAu-1-fe NAu-2-fe T Si 6.98 7.55 T Al 0.95 0.16 T Fe 0.07 0.29 O Fe 3.61 3.54 O Al 0.36 0.34 O Mg 0.04 0.05 I Ca 0.525 0.36 I Na 0 0 I Mg 0 0 I K 0 0 I Cl 0 0 C T -1.02 -0.45 C O -0.03 -0.27 C tot -1.05 -0.72 System specification We now create the system specification YAML file, which will contain the information necessary to build the clay structures of or interest. The files NAu-1.yaml and NAu-2.yaml are provided. The first section contains general parameters that are required for the model construction. If the directives in the optional section are not given by the user, ClayCode will use default values. # ============================================================================= # General specifications for clay model construction # ============================================================================= # ============================================================================= # Required Parameters # ============================================================================= OUTPATH: /path/to/output/directory # name of system SYSNAME: NAu-1-fe # name of CSV file with target stoichiometry CLAY_COMP: /path/to/clay_comp.csv # clay type available options in 'clay_units' directory: # Dioctahedral 2:1 - D21 # Trioctahedral 2:1 - T21 # Dioctahedral 1:1 - D11 # Trioctahedral 1:1 - T11 # layered double hydroxide 3:1 - L31 # layered double hydroxide 2:1 - L21 # Sepiolite - SEP CLAY_TYPE: D21 # ============================================================================= # Optional: Clay Sheet and Interlayer Specifications # ============================================================================= # number of unit cells in x direction (Default 7) X_CELLS: 7 # number of unit cells in y direction (Default 5) Y_CELLS: 5 # number of unit cells in z direction (Default 3) N_SHEETS: 3 # ---------------------------------------------------------------------------- # Optional: Unit Cell Composition and Ratios input # if not given, these will be calculated from data in the CLAY_COMP CSV file # (Default UC_INDEX_LIST: [], UC_RATIOS_LIST: []) # ----------------------------------------------------------------------------- # required UCs to builder system as list # UC_INDEX_LIST: [1] # probability list of unit cells in system # p(tot) = 1.00 # UC_RATIOS_LIST: [1] # ----------------------------------------------------------------------------- # interlayer solvent present or not (Default True) IL_SOLV: True # ----------------------------------------------------------------------------- # Optional: Interlayer Ion Specification Options (comment the other options!) # (Default UC_WATERS: 20) # ----------------------------------------------------------------------------- # 1. Number of water molecules that should be added per ion (ION_WATERS) # a. as ion species dictionary for hydration number # ION_WATERS = {'Ca': 12, # 'Na': 12 # } # b. as ion species int for hydration number # ION_WATERS = 12 # 3. OR per unit cell UC_WATERS: 20 # 4. OR for a target d-spacing value in A # SPACING_WATERS = 10.0 # ============================================================================= # Optional: Simulation Box Specifications # ============================================================================= # full simulation box height in A (Default 150.0) BOX_HEIGHT: 150.0 # ============================================================================= # Optional: Solvation and Bulk Ions Specifications # ============================================================================= # Bulk solvent added or not (Default: True) BULK_SOLV: True # Ion species and concentration in mol/L name to add in bulk solvent # (Default: BULK_IONS: # Na: 0.1 # Cl: 0.1) BULK_IONS: Na: 0.1 Cl: 0.1 # ----------------------------------------------------------------------------- # bash alias for used GROMACS version # ----------------------------------------------------------------------------- GMX: gmx_mpi ClayCode builder -f path/to/input_Clay.yaml Ray L. Frost, J. Theo Kloprogge, and Zhe Ding. The Garfield and Uley nontronites - An infrared spectroscopic comparison. Spectrochimica Acta - Part A Molecular and Biomolecular Spectroscopy , 58(9):1881\u20131894, 7 2002. doi:10.1016/S1386-1425(01)00638-2 . \u21a9 W. P. Gates, P. G. Slade, A. Manceau, and B. Lanson. Site Occupancies by Iron in Nontronites. Clays and Clay Minerals , 50(2):223\u2013239, 4 2002. doi:10.1346/000986002760832829 . \u21a9 \u21a9 Fabien Baron, Sabine Petit, Martin Pentr\u00e1k, Alain Decarreau, and Joseph W. Stucki. Revisiting the nontronite M\u00f6ssbauer spectra. American Mineralogist , 102(7):1501\u20131515, 7 2017. doi:10.2138/am-2017-1501x . \u21a9 \u21a9 A. Decarreau and S. Petit. Fe 3+ /Al 3+ partitioning between tetrahedral and octahedral sites in dioctahedral smectites. Clay Minerals , 49(5):657\u2013665, 12 2014. doi:10.1180/claymin.2014.049.5.03 . \u21a9","title":"Nontronite"},{"location":"nont/#nontronites","text":"In this Tutorial we look at the two South Australian nontronite clays, part of the Source Clays of The Clay Minerals Society . These are commonly known as NAu-1 or the Uley green nontronite and NAu-2 or Uley brown nontronite. Their structures are listed under \"Physical and Chemical Data of Source Clays\" at the clays.org , as: NAu-1: \\mathrm{M^{+1} \\left[Si_{7}Al_{1}\\right] \\left[Al_{0.58}Fe_{3.38}Mg_{0.05}\\right]} NAu-2: \\mathrm{M^{+0.97} \\left[Si_{7.57}Al_{0.01}\\right] \\left[Al_{0.52}Fe_{3.32}Mg_{0.7}\\right]} , where \\mathrm{M^{charge}} indicates interlayer counter-balancing cationic charge.","title":"Nontronites"},{"location":"nont/#assigning-iron-distribution-and-valence","text":"Iron can be present as either Fe(II) or Fe(III) and found in both, the tetrahedral and the octahedral sheets, as well as a charge compensating cation in the interlayer space space. Furthermore, in many samples, such as NAu-2, ferrihydrydes are adsorbed to clay surfaces. 1 While methods such as near-infrared (NIR), extended X-ray adsorption fine structures (EXAFS), Moessbauer spectroscopy, X-ray diffraction (XRD) and thermogravimetric analysis (TGA) have been used to determine the charge distributions of Fe in the sample, 2 3 4 the exact composition of these nontronites remains matter of debate. Conventionally, when Al and Fe(III), are present in a structure, because of their larger ionic radius, Fe(III) is assigned complitely to the octahedral sheet. Only once all octahedral spaces are occupied by Fe(III), the structure is assumed to also have Fe(III) in tetrahedral positions. However, this assignment is not necessarily correct and due to the detection limits of commonly used spectroscopic or chemical analysis techniques tetrahedral Fe(III) contents below 5% often remain undetected. 3 To this end, after a review of the literature, we use the structures identified by Gates et al 2 . We note that the octahedral occupancy fro NAu-2 is 3.93 instead of full 4. ClayCode will address this when generating the structure. Furthermore, we assign \\mathrm{Ca^{2+}} as counterbalancing ion to all the systems. Resulting structures are, therefore, as follows: NAu-1: \\mathrm{0.525 ~Ca^{2+} \\left[Si_{6.98}Al_{0.95}Fe_{0.07}\\right]^{-1.02} \\left[Al_{0.36}Fe_{3.61}Mg_{0.04}\\right]^{-0.03}} NAu-2: \\mathrm{0.36 ~Ca^{2+} \\left[Si_{7.55}Al_{0.16}Fe_{0.29}\\right]^{-0.45} \\left[Al_{0.34}Fe_{3.54}Mg_{0.05}\\right]^{-0.27}} Tutorial directory provides the clay_comp.csv file which contains the above clay structures. See CSV for details on this file. sheet element NAu-1-fe NAu-2-fe T Si 6.98 7.55 T Al 0.95 0.16 T Fe 0.07 0.29 O Fe 3.61 3.54 O Al 0.36 0.34 O Mg 0.04 0.05 I Ca 0.525 0.36 I Na 0 0 I Mg 0 0 I K 0 0 I Cl 0 0 C T -1.02 -0.45 C O -0.03 -0.27 C tot -1.05 -0.72","title":"Assigning iron distribution and valence"},{"location":"nont/#system-specification","text":"We now create the system specification YAML file, which will contain the information necessary to build the clay structures of or interest. The files NAu-1.yaml and NAu-2.yaml are provided. The first section contains general parameters that are required for the model construction. If the directives in the optional section are not given by the user, ClayCode will use default values. # ============================================================================= # General specifications for clay model construction # ============================================================================= # ============================================================================= # Required Parameters # ============================================================================= OUTPATH: /path/to/output/directory # name of system SYSNAME: NAu-1-fe # name of CSV file with target stoichiometry CLAY_COMP: /path/to/clay_comp.csv # clay type available options in 'clay_units' directory: # Dioctahedral 2:1 - D21 # Trioctahedral 2:1 - T21 # Dioctahedral 1:1 - D11 # Trioctahedral 1:1 - T11 # layered double hydroxide 3:1 - L31 # layered double hydroxide 2:1 - L21 # Sepiolite - SEP CLAY_TYPE: D21 # ============================================================================= # Optional: Clay Sheet and Interlayer Specifications # ============================================================================= # number of unit cells in x direction (Default 7) X_CELLS: 7 # number of unit cells in y direction (Default 5) Y_CELLS: 5 # number of unit cells in z direction (Default 3) N_SHEETS: 3 # ---------------------------------------------------------------------------- # Optional: Unit Cell Composition and Ratios input # if not given, these will be calculated from data in the CLAY_COMP CSV file # (Default UC_INDEX_LIST: [], UC_RATIOS_LIST: []) # ----------------------------------------------------------------------------- # required UCs to builder system as list # UC_INDEX_LIST: [1] # probability list of unit cells in system # p(tot) = 1.00 # UC_RATIOS_LIST: [1] # ----------------------------------------------------------------------------- # interlayer solvent present or not (Default True) IL_SOLV: True # ----------------------------------------------------------------------------- # Optional: Interlayer Ion Specification Options (comment the other options!) # (Default UC_WATERS: 20) # ----------------------------------------------------------------------------- # 1. Number of water molecules that should be added per ion (ION_WATERS) # a. as ion species dictionary for hydration number # ION_WATERS = {'Ca': 12, # 'Na': 12 # } # b. as ion species int for hydration number # ION_WATERS = 12 # 3. OR per unit cell UC_WATERS: 20 # 4. OR for a target d-spacing value in A # SPACING_WATERS = 10.0 # ============================================================================= # Optional: Simulation Box Specifications # ============================================================================= # full simulation box height in A (Default 150.0) BOX_HEIGHT: 150.0 # ============================================================================= # Optional: Solvation and Bulk Ions Specifications # ============================================================================= # Bulk solvent added or not (Default: True) BULK_SOLV: True # Ion species and concentration in mol/L name to add in bulk solvent # (Default: BULK_IONS: # Na: 0.1 # Cl: 0.1) BULK_IONS: Na: 0.1 Cl: 0.1 # ----------------------------------------------------------------------------- # bash alias for used GROMACS version # ----------------------------------------------------------------------------- GMX: gmx_mpi ClayCode builder -f path/to/input_Clay.yaml Ray L. Frost, J. Theo Kloprogge, and Zhe Ding. The Garfield and Uley nontronites - An infrared spectroscopic comparison. Spectrochimica Acta - Part A Molecular and Biomolecular Spectroscopy , 58(9):1881\u20131894, 7 2002. doi:10.1016/S1386-1425(01)00638-2 . \u21a9 W. P. Gates, P. G. Slade, A. Manceau, and B. Lanson. Site Occupancies by Iron in Nontronites. Clays and Clay Minerals , 50(2):223\u2013239, 4 2002. doi:10.1346/000986002760832829 . \u21a9 \u21a9 Fabien Baron, Sabine Petit, Martin Pentr\u00e1k, Alain Decarreau, and Joseph W. Stucki. Revisiting the nontronite M\u00f6ssbauer spectra. American Mineralogist , 102(7):1501\u20131515, 7 2017. doi:10.2138/am-2017-1501x . \u21a9 \u21a9 A. Decarreau and S. Petit. Fe 3+ /Al 3+ partitioning between tetrahedral and octahedral sites in dioctahedral smectites. Clay Minerals , 49(5):657\u2013665, 12 2014. doi:10.1180/claymin.2014.049.5.03 . \u21a9","title":"System specification"},{"location":"output/","text":"The OUTPUT directory: TheClayCode.siminp
coming soon ...
This package requires python version >=3.9 and pipx, and it also uses some of the functionality of GROMACS.
+ gh repo clone Erastova-group/ClayCode
+ cd ClayCode
+ bash install.sh
+
+ClayCode builder -f path/to/input_Clay.yaml
+
+For further details see:
+swa.md
+Ferruginous Smectite SWa-1
+STRUCTURE: (Mg.18 Ca.36 K.01)[Al.61 Fe(III) 3.08 Mntr Mg.24 Ti.07][Si7.09 Al.91]O20(OH)4, Octahedral charge:-.18, Tetrahedral charge:-.91, Interlayer charge:-1.09, Unbalanced charge:0.00,
+The supplied exp_clay.csv
file and contains clay structures corresponding to the Source Clays listed under "Physical and Chemical Data of Source Clays" clays.org.
Run with:
+ClayCode builder -f Tutorial/SWa1.yaml --comp Tutorial/clay_comp.csv
+
+
+ In this section we show how to set up the following clay systems:
+All the necessary input files (the .CSV
and corresponding .YAML
files) can be found in the Tutorial
directory.
The supplied exp_clay.csv
file and contains clay structures corresponding to the Source Clays listed under "Physical and Chemical Data of Source Clays" clays.org.
1:1 (TO) dioctohedral smectite:
+2:1 (TOT) dioctohedral smectite:
+example Al-Mg 3:1 layered double hydroxide:
+Note, that Pyrophyllite composition is not given in the .CSV file, and it s fully described in the .YAML.
+ +ClayCode is compatible with UNIX operating systems.
+It relies on the following python libraries: NumPy (1.21.2), Pandas (1.3.4) and MDAnalysis (2.0.0).
+Furthermore, solvent molecules and ions are added as GROMACS subprocesses. Therefore, in order to execute builder, a local GROMACS installation is required.
+The data files store information necessary to construct the clay structures for MD simulation.
+The files are stored within ClayCode/data/
directory:
ClayCode
+│
+...
+│
+└── data
+ ├── FF
+ │ └── ClayFF_Fe.ff
+ │ └── Ions.ff
+ ├── MDP
+ ├── UCS
+ │ ├── D11
+ │ ├── D21
+ │ └── LDH31
+ └── user
+
+
+
+where:
+data/FF
contains force fields files, as dictated by GROMACS format, currently included:
+ - ClayFF force field12 (with added Fe parameters based on personal communication with Andrey Kalinichev) in a directory ClayFF_Fe.ff
, and
+ - Ions by Pengfei Li 34 in Ions.ff
, default is IOD-type, HFE and CN also included.data/UCS
contains unit cell structures in .GRO format and their corresponding .ITP, topology assigned to ClayFF force field. The files are grouped per type, where D21
us dioctohedral 2:1 clay, D11
is dioctohedral 1:1 and LDH31
is a layered double hydroxide. To include new UCs, see Adding Unit Cells.data/MDP
contains GROMACS version-specific .MDP files for energy minimisation and equilibration.data/user
reserved for user files.The file in .CSV format containing the reduced unit cell structure, including partial atomic occupancies, charge balancing ions and layer charges for each clay listed.
+See full details in the Input files: CSV
+It is also possible to supply clay composition within the .YAML input only. See Pyrophyllite as an example
+System specification for the set-up are done given in .YAML format. See full details in Input files: YAML
+Parameters
+See Output files
+Use of ClayCode should not be dictated only by the Unite Cells provided with this release. To add a new unit cell, one needs to:
+1 - Obtain a crystal structure.
+We recommend downloading .cif from the American Mineralogist Crystal Structure Database.
2 - Convert it to full occupancy expanded structure .gro (or .pdb).
+We recommend using one of the the following OpenBabel, Avogadro5 (not Avogadro2) or Mercury by CCDC (licence needed). We prefer Avogadro.
3 - Manually rename the atoms in the .gro to have unique names.
4 - Create an include topology file (.itp), please reffer to GROMACS manual.
+Assign each unique atom name in the .gro to an atom type, as given in the ClayFF.ff/atomtypes.atp
:
hw 1.008 ; water hydrogen
+ho 1.008 ; hydroxyl hydrogen
+ow 16.00 ; water hydrogen
+oh 16.00 ; hydroxyl oxygen
+ob 16.00 ; bridging oxygen
+obos 16.00 ; bridging oxygen with octahedral substitution
+obts 16.00 ; bridging oxygen with tetrahedral substitution
+obss 16.00 ; bridging oxygen with double substitution
+ohs 16.00 ; hydroxyl oxygen with substitution
+st 28.09 ; tetrahedral silicon
+ao 26.98 ; octahedral aluminum
+at 26.98 ; tetrahedral aluminum
+mgo 24.31 ; octahedral magnesium
+mgh 24.31 ; hydroxide magnesium
+cao 40.08 ; octahedral calcium
+cah 40.08 ; hydroxide calcium
+feo 55.85 ; octahedral iron (III)
+fe2 55.85 ; octahedral iron (II)
+lio 6.941 ; octahedral lithium
+
+A unit cell for Dioctohedral 1:1 (Kaolinite-type) with stocheometery D101.gro
:
Dioctahedral 1:1 unit cell 1
+ 34
+ 1D101 AO1 1 0.061 0.433 0.332
+ 1D101 AO2 2 0.321 0.283 0.332
+ 1D101 AO3 3 0.320 0.880 0.332
+ 1D101 AO4 4 0.064 0.730 0.332
+ 1D101 ST1 5 0.237 0.749 0.065
+ 1D101 ST2 6 0.500 0.594 0.067
+ 1D101 ST3 7 0.493 0.301 0.065
+ 1D101 ST4 8 0.244 0.147 0.067
+ 1D101 OB1 9 0.225 0.751 0.226
+ 1D101 OB2 10 0.255 0.135 0.227
+ 1D101 OB3 11 0.258 0.000 0.000
+ 1D101 OB4 12 0.359 0.651 0.021
+ 1D101 OB5 13 0.360 0.236 0.001
+ 1D101 OB6 14 0.480 0.304 0.226
+ 1D101 OB7 15 0.510 0.582 0.227
+ 1D101 OB8 16 0.002 0.447 0.000
+ 1D101 OB9 17 0.100 0.204 0.021
+ 1D101 OB10 18 0.104 0.683 0.001
+ 1D101 OH1 19 0.223 0.413 0.232
+ 1D101 OH2 20 0.123 0.581 0.433
+ 1D101 OH3 21 0.164 0.855 0.431
+ 1D101 OH4 22 0.162 0.306 0.434
+ 1D101 OH5 23 0.480 0.860 0.232
+ 1D101 OH6 24 0.379 0.134 0.433
+ 1D101 OH7 25 0.420 0.408 0.431
+ 1D101 OH8 26 0.420 0.753 0.434
+ 1D101 HO1 27 0.530 0.940 0.233
+ 1D101 HO2 28 0.410 0.129 0.527
+ 1D101 HO3 29 0.400 0.434 0.522
+ 1D101 HO4 30 0.137 0.264 0.519
+ 1D101 HO5 31 0.272 0.497 0.233
+ 1D101 HO6 32 0.150 0.576 0.527
+ 1D101 HO7 33 0.136 0.880 0.522
+ 1D101 HO8 34 0.400 0.712 0.519
+ 0.51540 0.89420 0.63910
+
+and corresponding D101.itp
:
[ moleculetype ]
+; name nrexcl
+ D101 1
+
+[ atoms ]
+; nr type resnr residue atom cgnr charge mass typeB chargeB massB
+; residue 1 KAO rtp KAO q 0.0
+ 1 ao 1 D101 AO1 1 1.575 26.98 ;
+ 2 ao 1 D101 AO2 2 1.575 26.98 ;
+ 3 ao 1 D101 AO3 3 1.575 26.98 ;
+ 4 ao 1 D101 AO4 4 1.575 26.98 ;
+ 5 st 1 D101 ST1 5 2.1 28.09 ;
+ 6 st 1 D101 ST2 6 2.1 28.09 ;
+ 7 st 1 D101 ST3 7 2.1 28.09 ;
+ 8 st 1 D101 ST4 8 2.1 28.09 ;
+ 9 ob 1 D101 OB1 9 -1.05 16 ;
+ 10 ob 1 D101 OB2 10 -1.05 16 ;
+ 11 ob 1 D101 OB3 11 -1.05 16 ;
+ 12 ob 1 D101 OB4 12 -1.05 16 ;
+ 13 ob 1 D101 OB5 13 -1.05 16 ;
+ 14 ob 1 D101 OB6 14 -1.05 16 ;
+ 15 ob 1 D101 OB7 15 -1.05 16 ;
+ 16 ob 1 D101 OB8 16 -1.05 16 ;
+ 17 ob 1 D101 OB9 17 -1.05 16 ;
+ 18 ob 1 D101 OB10 18 -1.05 16 ;
+ 19 oh 1 D101 OH1 19 -0.95 16 ;
+ 20 oh 1 D101 OH2 20 -0.95 16 ;
+ 21 oh 1 D101 OH3 21 -0.95 16 ;
+ 22 oh 1 D101 OH4 22 -0.95 16 ;
+ 23 oh 1 D101 OH5 23 -0.95 16 ;
+ 24 oh 1 D101 OH6 24 -0.95 16 ;
+ 25 oh 1 D101 OH7 25 -0.95 16 ;
+ 26 oh 1 D101 OH8 26 -0.95 16 ;
+ 27 ho 1 D101 HO1 27 0.425 1.008 ;
+ 28 ho 1 D101 HO2 28 0.425 1.008 ;
+ 29 ho 1 D101 HO3 29 0.425 1.008 ;
+ 30 ho 1 D101 HO4 30 0.425 1.008 ;
+ 31 ho 1 D101 HO5 31 0.425 1.008 ;
+ 32 ho 1 D101 HO6 32 0.425 1.008 ;
+ 33 ho 1 D101 HO7 33 0.425 1.008 ;
+ 34 ho 1 D101 HO8 34 0.425 1.008 ;
+
+[ bonds ]
+; i j funct length force.c.
+19 31 1 0.1 463532.808
+20 32 1 0.1 463532.808
+21 33 1 0.1 463532.808
+22 30 1 0.1 463532.808
+23 27 1 0.1 463532.808
+24 28 1 0.1 463532.808
+25 29 1 0.1 463532.808
+26 34 1 0.1 463532.808
+
+Randall T. Cygan, Jian Jie Liang, and Andrey G. Kalinichev. Molecular models of hydroxide, oxyhydroxide, and clay phases and the development of a general force field. Journal of Physical Chemistry B, 108(4):1255–1266, 1 2004. doi:10.1021/JP0363287. ↩
+Randall T. Cygan, Jeffery A. Greathouse, and Andrey G. Kalinichev. Advances in Clayff Molecular Simulation of Layered and Nanoporous Materials and Their Aqueous Interfaces. Journal of Physical Chemistry C, 125(32):17573–17589, 8 2021. doi:10.1021/ACS.JPCC.1C04600. ↩
+Pengfei Li. Advances in metal ion modeling. Michigan State University, 2016. ↩
+Madelyn Smith, Zhen Li, Luke Landry, Kenneth M Merz Jr, and Pengfei Li. Consequences of overfitting the van der waals radii of ions. Journal of Chemical Theory and Computation, 19(7):2064–2074, 2023. doi:10.1021/acs.jctc.2c01255. ↩
+Marcus D Hanwell, Donald E Curtis, David C Lonie, Tim Vandermeersch, Eva Zurek, and Geoffrey R Hutchison. Avogadro: an advanced semantic chemical editor, visualization, and analysis platform. Journal of cheminformatics, 4(1):1–17, 2012. doi:10.1186/1758-2946-4-17. ↩
+