How biocharmodeling/biocharatomisticmodels works
Project Overview and Main Purpose
• The project is centered on constructing atomistic representations of biochar using multiple data sources (e.g., 13C NMR, ultimate analysis, helium density, BPCA yields) and incorporating these into a cross-linked, large-scale molecular simulation.
• It is built mainly using Jupyter notebooks, Python scripts, and visualization via PyMOL – with auxiliary conversion to LAMMPS data files for molecular dynamics simulations.
Main Components (Building Blocks)
a. Data Input & Characterization:
– Inputs include experimental characterization data (e.g., ultimate analysis data, 13C NMR) as suggested in the README, and possibly BPCA yields.
– There’s also a BPCA directory containing an Excel file (BPCA_PAH.xlsx) which likely stores data related to the BPCA analysis.
b. Molecular Templates:
– Directories contain numerous molecule files in .mol2 format (aromatic hydrocarbons, ring defects, functional groups). They act as the fundamental building blocks of the biochar model.
– The “functional_groups” directories store various functional group molecules (aldehyde, aniline, hydroxyl groups, etc.).
c. Processing & Modification Modules:
– Several Python scripts (e.g., Get_Atom_Index.py, Get_Atom_Info.py, Get_Atom_Names.py, Get_Object_Names.py, Examine_CNMR.py) are used to extract chemical information, process molecular data, and implement modifications to the base structures.
– Jupyter Notebooks (BPCA.ipynb, Biochar.ipynb) serve as high-level orchestrators, controlling the workflow and visualization.
– Versioned subdirectories (v2, v3) indicate iterations or enhancements in the implementation.
d. Visualization & Conversion Tools:
– PyMOL modules (pymol_module.py, pymol_rpc.py) support the visualization of molecular structures.
– There is conversion from generated PDB files to LAMMPS data files, indicating interaction with the LAMMPS simulation engine.
e. Simulation & Post Processing:
– The README describes a workflow which includes grid-based molecule placement, cross-linking, and molecular dynamics simulation under LAMMPS using a force field for C/H/O/N.
– OVITO is mentioned as the tool for file conversion, so that data transformation is an integral step in the pipeline.
f. Supporting Material:
– Additional directories such as “Cellulose Database,” “Spectral Database,” “XYZ models…” provide extra datasets and models that might be used for validation or alternative structural modeling.
Relationships and Data Flow
• The characterization data (experimental inputs) is ingested and then used by the Jupyter Notebooks to select and modify molecular templates.
• Python modules process the libraries of molecules and functional groups by extracting atom indices, names, and other chemical properties.
• The notebooks then combine these building blocks in a stepwise fashion – first placing molecules on a dispersed grid, then cross-linking them, and finally repositioning them closer to mimic actual biochar structures.
• The intermediate results (likely in PDB format) are then fed into LAMMPS (after conversion via OVITO) for relaxation and simulation under controlled conditions (NVT at 298 K).
• PyMOL modules provide a visualization interface for checking intermediate results.
Architectural Patterns and Design Principles
– Modular Design: Different directories and scripts handle distinct parts of the process (data parsing, molecule assembly, visualization, simulation input generation).
– Versioning: The v2 and v3 directories indicate an iterative development process where improvements or changes are tracked as separate versions.
– Workflow Orchestration: Jupyter notebooks serve as the orchestration layer connecting data input, processing modules, and simulation workflows.
– Pipeline Strategy: The system is designed as a sequential pipeline from data input, molecule selection/modification, molecular cross-linking, conversion, simulation, and finally visualization.