Input Files
There are two types of input files required to run ClayCode.builder. A mandatory .yaml file and an optional .csv file. It should be noted that if a .csv file is omitted, these parameters should be in the .yaml file. See the Pyrophyllite tutorial for an example.
CSV File
For the .csv file to be read by ClayCode.builder, the relative path needs to be referenced in the .yaml file. See Input files: YAML more for information.
A CSV file is supplied with ClayCode within the Tutorial directory. The file (exp_clay.csv) contains clay structures from the Clay Mineral Society’s Source Clays. 1,2
File Structure
The file should be comprised of at least 3 columns:
First column -
sheetwith each row containing one of the following options:Tfor tetrahedral occupanciesOfor octahedral occupanciesIfor interlayer ion occupancies (if the total layer charge is non-zero)Cfor the tetrahedral, octahedral and total unit cell charges
Second column -
elementcontaining either:Atom names
The oxidation state of clay atoms can be specified by adding the charge after the element name (e.g. Fe2)
If the specified atom is not supported by
ClayFF.ff,ClayCode.builderwill try to assign it to a supported atom of same charge and re-assign the occupancies
Whether the charge (
sheet: C) is for theTlayer,Olayer or thetottotal
Subsequent columns - the clay name(s) with each row giving the corresponding value for that clay. One of these should match the
SYSNAMEoption in the corresponding .yaml file.
The file structure for the CSV file.
Iron Oxidation State
There is no need to specify how much of the total iron content is Fe2+ or Fe3+ if at least two
charge values are given (T layer, O layer or the tot total). ClayCode.builder will
determine the iron content splitting based on these values.
Rules
Occupancies:
Tetrahedral (
T) unit cell occupancies should sum to 4 for each sheetDioctahedral (
O) unit cell occupancies should sum to 4 for each sheetTrioctahedral (
O) unit cell occupancies should sum to 3 for each sheet
For example, a dioctahedral 2:1 clay (TOT) should have 8 tetrahedral occupancies and 4 octahedral occupancies
Experimental stoichiometries do not necessarily sum up to integer 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
TandOsheet substitutionsThe sum of all ion contributions should be 1
Only ion species of the opposite sign to the layer charge will be considered
Example File
For the Nontronite clays NAu-1 and NAu-2, the CSV file would be written as follows:
sheet |
element |
NAu-1 |
NAu-2 |
|---|---|---|---|
T |
Si |
6.98 |
7.55 |
T |
Al |
0.95 |
0.16 |
T |
Fe3 |
0.07 |
0.29 |
O |
Al |
0.36 |
0.34 |
O |
Fe |
3.61 |
3.54 |
O |
Mg |
0.04 |
0.05 |
I |
Ca |
0.525 |
0.36 |
C |
T |
-1.02 |
-0.45 |
C |
O |
-0.03 |
-0.27 |
C |
tot |
-1.05 |
-0.72 |
YAML file
For the .yaml file to be read by ClayCode.builder, the relative path must be specified when calling the function.
Multiple YAML files are supplied with ClayCode within the Tutorial directory. The files are named by their corresponding clay system (e.g. NAu1.yaml), and can be used as examples.
Required Parameters
The required input parameters are general directives for model construction.
OUTPUT: /path/to/directory [ str ]CLAY_COMP: /path/to/file.csv [ str ]SYSNAME: clay_name [ str ]CLAY_TYPE: unit_cell [ str ]data/UCS/ (see data files). For example, a Dioctahedral 2:1 unit cell is D21.Optional Parameters
There are a number of optional parameters. If no directives are given by the user, ClayCode.builder will use the default values.
Clay Sheet Size
X_CELLS: x_unit_cells [ int ] (Default = 5)Y_CELLS: y_unit_cells [ int ] (Default = 5)N_SHEETS: sheet_number [ int ] (Default = 5)Clay Composition
ClayCode.builder uses the supplied .csv file to calculate the number and type of unit cells necessary to match the desired composition. The way in which ClayCode will match this target composition can be specified.
OCC_TOL: occupation_tolerance [ float ] (Default = 0.1)csv:T total unit cell occupancy of 4 and OCC_TOL of 0.1, any composition with tetrahedral occupancies between 3.9 and 4.1 will be automatically adjusted to match the expected value.ZERO_THRESHOLD: threshold [ float ] (Default = 0.05)SEL_PRIORITY: charge_correction [ str ] (Default = charges)charges: Conserve specified charges and adjust substitution occupancies. E.g. mgo: 0.4 -> 0.3occupancies: Conserve occupancies and adjust charges. E.g. -0.3 e -> -0.4 eCHARGE_PRIORITY: charge_correction [ str ] (Default = total_charge)total_charge: Conserve the total charge and adjust tetrahedral and octahedral occupancies. E.g. tetrahedral charge: -0.70 -> -0 .65 and octahedral charge: -0.40 -> -0.35sheet_charges: Conserve the sheet charges and adjust total charge. E.g. total charge: -1.00 -> 1.10MATCH_TOLERANCE: tolerance [ float ] (Default = 0.02)No CSV File
The clay composition can also be supplied manually in the .yaml file using the following parameters. See the Pyrophyllite tutorial for an example.
UC_INDEX_LIST: unit_cells [ list ].gro and .itp files in the data/UCS/CLAY_TYPE directory.UC_RATIOS_LIST: cell_probabilities [ list ]IL_ION_RATIOS: ions_and_ratios [ dict[str: int] ] (Default = Ca: 1 Cl: 1)Interlayer Solvent and Ions
IL_SOLV: solvent_presence [ bool ] (Default = True)UC_WATERS: 20.ION_WATERS: waters_per_ion [ int, dict[str: int] ]UC_WATERS: waters_per_uc [ int ] (Default = 20)SPACING_WATERS: hydrated_spacing [ float ]Simulation Box
BOX_HEIGHT: z_box_length [ float ] (Default = 15.0)BULK_SOLV: solvent_presence [ bool ] (Default = True)BULK_IONS: ion_type_conc [ dict[str: int] ] (Default = ‘Na’: 0.0 ‘Cl’: 0.0)GROMACS version
GMX: bash_alias [ str ]- 1
J Fripiat and H van Olphen, editors. Data Handbook for Clay Minerals and Other Non-metallic Minerals. Pergamon Press, 1979.
- 2
Clay Mineral Society. Physical and chemical data of source clays. URL: https://www.clays.org/sourceclays_data/.