Skip to main content

Companion library to the MiMiC framework for input preparation.

Project description

MiMiCPy

MiMiCPy is the companion library to the MiMiC framework for streamline preparation of input files. It includes a suite of command line tools and plugins for PyMOL/VMD. Visit the MiMiC homepage for more details and documentation.

Requirements

Python

  • Python >= 3.5, < 3.12 (Python 3.11 and below)

Core Dependencies

  • pandas >= 0.24.0
  • numpy >= 1.12.0

Force Matching Module

The force matching module requires additional dependencies:

  • h5py >= 3.0.0
  • MDAnalysis >= 2.0
  • GROMACS (must be installed and accessible in the system PATH)

Optional

  • PyMOL (for PrepQM plugin) - tested with version 2.3.4
  • VMD (for PrepQM plugin) - tested with version 1.9.4a38

Installation

To install, run the following command:

pip install mimicpy

The PrepQM plugins for PyMOL and/or VMD can be optionally installed by running:

mimicpy_plugin_installer -pymoldir /path/to/plugin/ -vmddir /path/to/plugin/

The path to the plugin is usually either the path to the PyMOL/VMD installation, or the user home directory.

Demo

A demo of atom selection for the QM region, and generation of the MiMiC-based CPMD input file using MiMiCPy is shown below.

user@system:~$ mimicpy prepqm -top acetone.top -coords acetone.gro


 	                ***** MiMiCPy *****

 	 For more information type mimicpy [subcommand] --help

=====> Running prepqm <=====


**Reading topology**

Cannot find path to Gromacs installation.
Read atoms from acetone.itp.
No atoms found in acetone.top.

Some atom types had no atom numbers information.
They were guessed as follows:

+---------------------+
| Atom Type | Element |
+---------------------+
|     c     |    C    |
+---------------------+
|     c3    |    C    |
+---------------------+
|     o     |    O    |
+---------------------+
|     hc    |    H    |
+---------------------+

**Reading coordinates**  |Done

Please enter selection below. For more information type 'help'
> add resname is ACT
> q
Using default values for maxstep and timestep
Wrote Gromacs index file to index.ndx
Wrote new CPMD input script to cpmd.inp

=====> Done <=====

Force Matching

The force matching module in MiMiCPy automates the parameterization of molecular mechanics (MM) force field parameters by fitting to reference QM/MM data. It optimizes both non-bonded interactions (atomic charges via DRESP) and bonded interactions (bonds, angles, dihedrals) to reproduce QM forces and electrostatic properties.

Required Input Files

The force matching workflow requires the following input files:

  • -top: GROMACS topology file (.top)
  • -sele: QM region selection file (.txt or .dat) - specifies which atoms are in the QM region
  • -fmdata: Force matching data file (.json or .h5) - contains QM/MM reference data (forces, charges, electrostatic potentials/fields)
  • -fi: Force matching input file (.dat) - configuration file with optimization parameters
  • -trr: GROMACS trajectory file (.trr) - trajectory from QM/MM simulation
  • -ndx: GROMACS index file (.ndx) - atom index groups
  • -coords: Coordinate file (.gro) - initial structure
  • -mdp: GROMACS MDP file (.mdp, optional) - MD parameters for force recalculation

Basic Usage

The basic force matching command is:

mimicpy fm -top system.top -sele qm_selection.txt -fmdata fm_data.json -fi fm_input.inp -trr trajectory.trr -ndx index.ndx -coords system.gro -mdp run.mdp

Common Options

  • -dresp: Run only DRESP charge optimization (skip bonded parameter optimization)
  • -opt_ff: Run only force field parameter optimization (skip DRESP, uses existing charges)
  • -grid_search: Perform grid search over DRESP weight parameters (wv, we, wh)
  • -ff: Path to force field data directory (optional)
  • -gmx: GROMACS executable name (default: gmx)
  • -n_processes: Number of processes for parallel force computation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mimicpy-0.3.0.tar.gz (125.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mimicpy-0.3.0-py3-none-any.whl (141.4 kB view details)

Uploaded Python 3

File details

Details for the file mimicpy-0.3.0.tar.gz.

File metadata

  • Download URL: mimicpy-0.3.0.tar.gz
  • Upload date:
  • Size: 125.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mimicpy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c207b850461f7b40fc6919f7209288a3a0f4e764181b03960d882a357add236d
MD5 4615e3860f27ea2c009d6fa703fd2f27
BLAKE2b-256 1b930930f528d76162039d8af9c38c83593baa3d2e47797bb08780bdc15dfd12

See more details on using hashes here.

File details

Details for the file mimicpy-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mimicpy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 141.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mimicpy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb5680e49bd305cd7dfbccf67be8b6522d0c1f9bdcc411f2106863597f40bab9
MD5 b5ef3e55f5208ea117c1ce98bb9f67c1
BLAKE2b-256 02ad77e81216d4a5961df1001352380badaaae0cc949c24f9cd4ea010d0872ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page