Metadata-Version: 2.1
Name: GeKiM
Version: 0.2.0
Summary: Generalized Kinetic Modeler: A Python package for modeling arbitrary kinetic schemes.
Home-page: https://github.com/kghaby/GeKiM
Author: Kyle Ghaby
Author-email: kyleghaby@gmail.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.8.2
Requires-Dist: numpy>=1.26.4
Requires-Dist: scipy>=1.13.0
Requires-Dist: setuptools>=67.8.0
Requires-Dist: sympy>=1.12

# GeKiM (Generalized Kinetic Modeler)

## Description
GeKiM (Generalized Kinetic Modeler) is a Python package designed for creating, interpreting, and modeling arbitrary kinetic schemes. Schemes are defined by the user in a dictionary of species and transitions, which is used to initialize an instance of the NState class. Choose (or make) and initialize a simulator for the instance and run it. Included applications are focused on covalent inhibition.

## Installation
With pip:
```bash
pip install gekim
```

Or directly from the source code (recommended):
```bash
git clone https://github.com/kghaby/GeKiM.git
cd GeKiM
pip install .
```

## Usage
Here is a basic example of how to use GeKiM to create and simulate a kinetic system:
```python
import gekim as gk
from gekim.analysis import covalent_inhibition as ci

# Define your kinetic scheme in a configuration dictionary
concI0,concE0 = 100,1
scheme = {
    'species': {
        "I": {"y0": concI0, "label": "I"},
        "E": {"y0": concE0, "label": "E"},
        "EI": {"y0": 0, "label": "EI"},
    },    
    'transitions': {
        "kon": {"k": 0.01, "source": ["2E","I"], "target": ["EI"]},
        "koff": {"k": 0.1, "source": ["EI"], "target": ["2E","I"]},
    }
}

# Initialize a system with your schematic dictionary
system = gk.schemes.NState(scheme)

# Choose a simulator and go. In this example we're doing a deterministic 
# simulation of the concentrations of each species over time.
# Note that `system.simulator() = gk.simulators.ODESolver(system)` may be more doc-hint friendly
system.set_simulator(gk.simulators.ODESolver)
system.simulator.simulate() 

# Fit the data to experimental models to extract mock-experimental measurements
final_state = system.species["EI"].simout["y"]
all_bound = system.sum_species_simout(blacklist=["E","I"])

fit_output = ci.kobs_uplim_fit_to_occ_final_wrt_t(
    t,final_state,nondefault_params={"Etot":{"fix":concE0}})

print(f"Fit: {fit_output.fitted_params}\n")
```
For more detailed examples, please refer to the examples directory.

## Documentation
Documentation and example notebook(s) are pending.

## Contributing
If you have suggestions or want to contribute code, please feel free to open an issue or a pull request.

## License
GeKiM is licensed under the GPL-3.0.

## Contact
kyleghaby@gmail.com
