Skip to content

kzfm/FMOkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FMOkit: A Python toolkit for the preparation and analysis of FMO calculations

Introduction

FMOkit is a command-line toolkit written in Python for both preprocessing and postprocessing of Fragment Molecular Orbital(FMO) calculations.
It consists of three main commands:

  • mmcifprep
    Adds hydrogen atoms and assigns partial charges to PDB structures. It also repairs missing residues or loops to produce mmCIF files suitable for FMO calculations.

  • mkfmoinp/mkfmodftbinp
    Generates GAMESS input files for FMO calculations from the mmCIF files processed by mmcifprep. Alternatively, you can generate a GAMESS FMO input file from an MAE file processed with Maestro’s Protein Preparation tool.

  • gamoutparser
    Processes GAMESS output files and extracts data into analysis-ready CSV/TSV format.

Installation

To install FMOkit, clone the repository and install it in editable mode:

git clone https://github.com/kzfm/FMOkit.git
cd FMOkit
pip install -e .

This will register the commands mmcifprep, mkfmoinp, and gamoutparser for use in your terminal.

Usage

1. Preprocess a structure for FMO calculations

mmcifprep INPUT_FILE LIGAND_ID SMILES_STRING

As this is the most important step, we recommend referring to the accompanying Jupyter notebook, which demonstrates the process interactively and step by step.

Note: If you are using molecular modeling tools such as Maestro or MOE, you can skip this step. Instead of using mmcifprep, please perform preprocessing steps such as hydrogen addition within those tools and export the structure as an mmCIF format file.

2. Generate GAMESS input files

mkfmoinp INPUT

Generates a GAMESS input file for FMO calculations from a preprocessed mmCIF/mae file. Optionally, you can specify GAMESS computational resources such as the number of nodes, CPU cores, and memory size. The system is automatically divided into fragments based on residue IDs. Each fragment’s formal charge is computed by summing the partial charges of the atoms it contains, so partial charge information is required.

Note: If you are converting a CIF file exported from Maestro, there are two important points to keep in mind:

  1. Atomic charge information is stored in the pdbx_formal_charge attribute.
  2. The chain ID corresponds to auth_asym_id instead of label_asym_id.

Therefore, you need to specify the following two options explicitly:

mkfmoinp INPUT -–asym_id=auth_asym_id -–charge=pdbx_formal_charge

Alternatively, you can use the predefined shortcut option:

mkfmoinp -M INPUT

3. Extract results into a CSV/TSV file

gamoutparser GAMOUT

Parses GAMESS output files and extracts PIEDA analysis results into CSV/TSV format, making the data compatible with common data science tools.

Example

License

Code released under the BSD license.

Contributions

Pull requests and feature suggestions are welcome. Please open an issue to discuss what you’d like to change.

Version history

0.4 (2025/07/13)

  • Implemented FMO-DFTB input support via the mkfmodftbinp utility
  • Enhanced gamoutparser to output inter-fragment distance (R) and charge transfer (Q)
  • Introduced a new option in gamoutparser to rename fragment identifiers for improved readability and sorting

0.3 (2025/06/15)

  • Support for Maestro mae format
  • Since mmcif2fmoinp now supports the MAE format, it has been renamed to mkfmoinp
  • Some bug fix

0.2 (2025/06/08)

  • Support for DNA/RNA Fragmentation
  • Support for Maestro mmCIF file
  • Some bug fix

0.1 (2025/05/10)

  • initial version

About

Python toolkit for pre- and post-processing of FMO calculations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages