Metadata-Version: 2.1
Name: catflow
Version: 0.5.1
Summary: Analyzing tool for deep learning based chemical research.
Home-page: https://github.com/chenggroup/CatFlow
License: Apache-2.0
Author: Cloudac7
Author-email: scottryuu@outlook.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: ai2-kit (>=0.9.0)
Requires-Dist: ase (>=3.21.1,<4.0.0)
Requires-Dist: click
Requires-Dist: dpdata
Requires-Dist: dpdispatcher (>=0.5.6,<0.6.0)
Requires-Dist: dpgen (>=0.11.1,<0.12.0)
Requires-Dist: dscribe (>=1.2.2,<2.0.0)
Requires-Dist: dynaconf
Requires-Dist: fire (>=0.5.0,<0.6.0)
Requires-Dist: h5py (>=3.10.0,<4.0.0)
Requires-Dist: matplotlib (>=3.7.1,<4.0.0)
Requires-Dist: mdanalysis (>=2.2,<3.0)
Requires-Dist: numpy (>=1.24,<2.0)
Requires-Dist: pandas (>=1.3.3,<2.0.0)
Requires-Dist: pymatgen (>=2023.5.10,<2024.0.0)
Requires-Dist: ruamel-yaml (>=0.17.21,<0.18.0)
Requires-Dist: scipy (>=1.10,<2.0)
Requires-Dist: seaborn (>=0.12.2,<0.13.0)
Project-URL: Repository, https://github.com/chenggroup/CatFlow
Description-Content-Type: text/markdown

# CatFlow

> Parts of the code to be open source.

[![Python package](https://github.com/chenggroup/catflow/actions/workflows/ci.yml/badge.svg)](https://github.com/chenggroup/catflow/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/chenggroup/catflow/graph/badge.svg?token=NGFDZX7WDO)](https://codecov.io/gh/chenggroup/catflow)


Machine learning aided catalysis reaction free energy calculation and post-analysis workflow, thus, analyzer for catalysis.

As is known to all, cat is fluid and thus cat flows. 🐱

> Former Miko-Analyzer and Miko-Tasker
> This repository is a temporary branch of original CatFlow.
> It would be merged into main repo after active refactor.

## Analyzer

### Installation

To install, clone the repository:

```
git clone https://github.com/chenggroup/catflow.git
```

and then install with `pip`:

```
cd catflow
pip install .
```

### Acknowledgement
This project is inspired by and built upon the following projects:
- [ai2-kit](https://github.com/chenggroup/ai2-kit): A toolkit featured artificial intelligence × ab initio for computational chemistry research.
- [DP-GEN](https://github.com/deepmodeling/dpgen): A concurrent learning platform for the generation of reliable deep learning based potential energy models.
- [ASE](https://wiki.fysik.dtu.dk/ase/): Atomic Simulation Environment.
- [DPDispatcher](https://github.com/deepmodeling/dpdispatcher): Generate and submit HPC jobs.
- [Metadynminer](https://github.com/spiwokv/metadynminer): Reading, analysis and visualization of metadynamics HILLS files produced by Plumed. As well as its Python implementation [Metadynminer.py](https://github.com/Jan8be/metadynminer.py).
- [stringmethod](https://github.com/apallath/stringmethod): Python implementation of the string method to compute the minimum energy path.

## Tasker

### Potential of Mean Force Calculation

A simple workflow designed for free energy calculation from Potential of Mean Force (PMF).

### Usage

#### Commandline

First, prepare a yaml file for workflow settings in detial. For example, `config.yaml`.


```yaml
job_config:
  work_path: "/some/place"
  machine_name: "machine_name"
  resources:
    number_node: 1
    cpu_per_node: 1
    gpu_per_node: 1
    queue_name: gpu
    group_size: 1
    module_list:
      - ...
    envs:
      ...
  command: "cp2k.ssmp -i input.inp"

  reaction_pair: [0, 1] # select indexes of atoms who would be constrained
  steps: 10000000 # MD steps
  timestep: 0.5 # unit: fs
  restart_steps: 10000000 # extra steps run in each restart
  dump_freq: 100 # dump frequency
  cell: [24.0, 24.0, 24.0] # set box size for initial structure
  type_map: # should be unified with DeePMD potential
    O: 0
    Pt: 1
  model_path: "/place/of/your/graph.pb"
  backward_files:
    - ...

flow_config:
  coordinates: ... # a list of coordinations to be constrained at
  t_min: 300.0 # under limit of simulation temperature
  cluster_component:
    - Pt # select elements of cluster
  lindemann_n_last_frames: 20000 # use last 20000 steps to judge convergence by calculate Lindemann index
  init_artifact:
    - coordinate: 1.4
      structure_path: "/place/of/your/initial_structure.xyz"
    - coordinate: 3.8
      structure_path: "/place/of/your/initial_structure.cif"
job_type: "dp_pmf" # dp_pmf when using DeePMD
```

Then, just type command like this:

```bash
catflow tasker pmf config.yaml
```

And enjoy it!

