DoMD (ChemFAST) Documentation ========================================================= .. image:: _static/logo.png :align: center :alt: DoMD Logo :width: 600px **DoMD** is a general-purpose platform designed for molecular dynamics simulations. **ChemFAST** (Chemical-Friendly Automated Simulation Toolkit) is a specialized toolkit within DoMD focused on **high-throughput modeling and simulation**. ChemFAST functions as a "chemical compiler," translating high-level chemical descriptions (SMILES/SMARTS) directly into simulation-ready all-atom models, enabling automated construction of complex polymer and biological systems. Installation ============ Quick installation for the release ---------------------------------- Please download the lastest version of ChemFAST at `Github Release `_. Release includes the large database files ``opls.db``, which are required for the force field assignment. After downloading and unzipping the release zip file, you can set up the environment and test the installation with the following commands: .. code-block:: bash # Download and unzip the release zip file $ cd $ conda env create -f environment.yml $ conda activate domd-toolkit $ python -c 'from domd_tools import *; print("Success install domd.")' Step-by-step installation from repo ----------------------------------- This is the installation process if you want to install from the git repository, which is recommended for developers or users who want to use the latest features. For users who just want to use the stable version, we recommend downloading the release version as described above. This process needs to be done in the root directory of DoMD, where `setup.py` is located. .. code-block:: bash # Setup Environment $ conda create -n domd-toolkit -c conda-forge numpy nomkl rdkit=2025.03.6 openbabel numba networkx pandas scipy jupyter scikit-learn matplotlib python==3.12 $ conda activate domd-toolkit $ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu $ pip3 install torch_geometric pdbreader # Download DoMD $ git clone https://github.com/DoMD-toolkit/DoMD.git # Download and move `opls.db` to `DoMD/domd_forcefield/oplsaa/resources/opls.db` # Or you can download the release .zip file, it contains the `opls.db` file # cd to the root directory of DoMD, for example `DoMD` if cloned from github # where `setup.py` is under the root directory $ pip install -e . Database Setup (Large Files) ---------------------------- **Important:** DoMD requires specific large database files for force field parameterization. These are not included in the git repository due to size limits. .. code-block:: text DoMD/ └── domd_forcefield/ └── oplsaa/ └── resources/ └──opls.db <-- Required for parameterization **Download Link:** `Google Drive `_ * ``domd_database/forcefield/oplsaa/data/ligpargen/AllData.pkl``: **This file is the OPLS-AA force field database, for training the force field model, this file is NOT NEEDED for the program.** * ``domd_forcefield/oplsaa/resources/opls.db``: **This file is required for force field assignment.** Usage Examples & Testing ======================== Navigate to the polyimide example directory: .. code-block:: bash $ cd /pi 1. End-to-End Workflow ---------------------- Run the main script to process a pre-equilibrated Coarse-Grained (CG) configuration: .. code-block:: bash $ python polyimides.py **Outputs:** * ``chemfast.gro``: The back-mapped All-Atom (AA) conformation. * ``chemfast.top``: The GROMACS-compatible force field and topology file. * ``out_chemfast.xml``: The PyGAMD xml input. **Purpose:** These files are ready for immediate use in atomistic simulations using **GROMACS**. 2. Step-by-Step Module Testing ------------------------------ We also provide individual tests for specific **S-CGFG** functions to demonstrate the underlying workflow: * **CG Topology Generation** .. code-block:: bash $ python cg.py Generates an initial CG configuration (e.g., linear chains) and force field parameters based on **HSP (Hansen Solubility Parameters)** predictions. This is typically used for pre-equilibration or reaction runs. *(Note: This step is optional as a pre-equilibrated configuration is already provided).* * **Output:** ``out_chemfast_cg.xml`` file for PyGAMD, and ``cg_params.txt`` as CG forcefield parameters. * **CG Parameterization** .. code-block:: bash $ python cg_params.py Generates CG simulation force field parameters only from specific monomers and reaction templates. * **Output:** ``cg_parameters.txt`` * **Back-mapping (CG to FG)** .. code-block:: bash $ python fg.py Tests the Coarse-Grained to Fine-Grained (AA) conversion. * **Outputs:** AA conformations (stored in the ``aa_confs/`` folder) and topology metadata (``meta_aa_top.pkl``). * **Force Field Parameterization** .. code-block:: bash $ python ff.py Performs force field parameterization by reading ``meta_aa_top.pkl``. * **Output:** ``meta_ffs.pkl`` * **Final Assembly** .. code-block:: bash $ python output.py Assembles the AA conformations and force field data into standard GROMACS input formats. * **Outputs:** Final ``.gro``, ``.top`` and ``.xml`` (for PyGAMD) files. Documentation ============= .. toctree:: :maxdepth: 1 :caption: Manual: manuals/00_preface manuals/01_introduction manuals/02_installation manuals/03_run_the_example manuals/04_code_component manuals/05_domd_tools_intro manuals/06_input_format manuals/07_s-cgfg_algorithm manuals/08_forcefield manuals/09_custom_forcefield .. toctree:: :maxdepth: 1 :caption: Tutorials: tutorials/polyimides tutorials/spes_brush tutorials/spes_network tutorials/lipid_np_membrane tutorials/core_shell .. toctree:: :maxdepth: 2 :caption: API Reference: domd_cgbuilder domd_database domd_forcefield domd_topology domd_xyz domd_tools misc Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`