semvec/pypi-packages huggingface dataset:
tksamc 1.0.1
TKSA - Electrostatic Free Energy calculation for each ionizable residue
Requires Python: >=3.6

# TKSA-MC (Python 3)

**Tanford-Kirkwood Surface Accessibility - Monte Carlo**

This software calculates protein charge-charge interactions via the Tanford-Kirkwood Surface Accessibility model, using either an Exact method (for small systems) or Monte Carlo sampling (for larger systems) to determine protonation states and electrostatic free energies.

## Description

This is a Python 3 port of the original TKSA-MC code. It uses `mdtraj` for structure parsing and SASA calculation, and `numpy`/`numba` for efficient computation of electrostatic energies.

The method calculates the electrostatic free energy contribution ($\Delta G_{qq}$) for each ionizable residue.

## Requirements

*   Python 3.x
*   `numpy`
*   `scipy`
*   `matplotlib`
*   `mdtraj`
*   `numba` (for performance optimization of MC solver)

Install dependencies:

```bash
pip install numpy scipy matplotlib mdtraj numba
```

## Installation

You can install the package using pip:

```bash
pip install .
```

This will make the `tksamc` command available in your terminal.

## Usage

### Method 1: Installed Package

Run the `tksamc` command:

```bash
tksamc -f sample_pdb_1ubq.pdb -ph 7.0 -T 300.0 -s MC
```

### Method 2: Running Locally (No Install)

If you prefer not to install the package (e.g., for development or testing), you can use the `run_local.py` script provided in the root directory:

```bash
python3 run_local.py -f sample_pdb_1ubq.pdb -ph 7.0 -T 300.0 -s MC
```

Alternatively, run as a module:

```bash
python3 -m tksamc.cli -f sample_pdb_1ubq.pdb -ph 7.0 -T 300.0 -s MC
```

### Arguments

*   `-f`: Input PDB file.
*   `-ph`: pH value (default: 7.0).
*   `-T`: Temperature in Kelvin (default: 300.0).
*   `-s`: Solver method. Choices: `EX` (Exact) or `MC` (Monte Carlo). Default: `MC`.
*   `-e`: Electrostatic method. Default: `TK`.
*   `-plot`: Generate plot (`yes` or `no`). Default: `yes`.
*   `-aref`: Reference Max SASA set (`header` or `mdtraj`). `header` uses legacy values. `mdtraj` uses theoretical values for Bondi radii (Tien et al. 2013). Default: `header`.

### Output

*   **CSV File**: A CSV file (e.g., `Output_MC_sample_pdb_1ubq_pH_7.0_T_300.0.csv`) containing detailed results for each charged residue, including coordinates, pKa, SASA, Charge, and $\Delta G_{qq}$.
*   **Plot**: A JPG plot (e.g., `Fig_MC_sample_pdb_1ubq_pH_7.0_T_300.0.jpg`) showing the electrostatic free energy per residue. Red bars indicate positive values (unfavorable), and blue bars indicate negative values (favorable).

## References

> "TKSA-MC: A Web Server for rational mutation through the optimization of protein charge interactions -
> Vinícius G Contessoto, Vinícius M de Oliveira, Bruno R Fernandes, Gabriel G Slade, Vitor B. P. Leite, bioRxiv 221556; doi: https://doi.org/10.1101/221556"
matiopy 1.0.5
A library for 2D transformations and vector operations
Requires Python: >=3.8

from src.matiopy.transform2d.transform2d import Transform2D

# Matiopy

(Transform Python)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Github: Repo](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/FrigatZero/matiopy)

---

A library for 2D transformations and vector operations

## Dependencies

---

- [Numpy](https://pypi.org/project/numpy/)
- [Python (>=3.8)](https://www.python.org/downloads/)

## Install

---

You can install ```Matiopy``` from ```PyPI```

```bash
pip install matiopy
```

## Examples

---

1. Constructor
```python
import math
import numpy
from matiopy import Transform2D as t2d

# Make new Transform from SVG
"""
    a c e
    b d f
    0 0 1
"""
matrix = t2d.svg(1, 0, 0, 1, 0, 0)
print(matrix) # Result: Transform2D(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)

# Make new Transform from components
_matrix = t2d.compose(
    translate_x=0,
    translate_y=0,
    scale_x=3,
    scale_y=4,
    angle=math.pi/3 # radians default
)
print(_matrix) # Result: Transform2D(1.50.., 3.46.., -2.59.., 2.00.., 0.0, 0.0)
```

2. Translation
```python
# Translate by dx=2, dy=2
matrix.translate(2, 2)
print(matrix) # Result: Transform2D(1.0, 0.0, 0.0, 1.0, 2.0, 2.0)
```
3. Scaling
```python
# Scale by x=2, y=3
matrix.scale(2, 3)
print(matrix) # Result: Transform2D(2.0, 0.0, 0.0, 3.0, 2.0, 2.0)
```
4. Rotation
```python
# Rotate by 45 degrees/radians (radians default)
matrix.rotate(45, atype='deg')
print(matrix) # Result: Transform2D(1.41.., 2.12.., -1.41.., 2.12.., 2.0, 2.0)
matrix.rotate(-math.pi/4)
print(matrix) # Result: Transform2D(2.0.., 0.0.., 0.00.., 3.0.., 2.0, 2.0)
```
5. Use
```python
# Apply to a dot list or Numpy array
dots_numpy = numpy.array([[0, 0], [1, 0], [1, 1], [0, 1]])
# You can use tuple as dots
dots_list = [[0, 0], (1, 0), [1, 1], (0, 1)]
print(matrix * dots_numpy)
# Result:
# [[2. 2.]
#  [4. 2.]
#  [4. 5.]
#  [2. 5.]]
print(matrix * dots_list)
# Result:
# [[2. 2.]
#  [4. 2.]
#  [4. 5.]
#  [2. 5.]]
```
6. Inversion
```python
# Invert Transform Matrix
matrix.inverse()
print(matrix)
# Original: Transform2D(2.0.., 0.0.., 0.00.., 3.0.., 2.0, 2.0)
# Result:   Transform2D(0.49.., 0.00.., 0.00.., 0.33.., -0.99.., -0.66..)
```
7. Set Origin
```python
# Set Transform origin
matrix.set_origin(0, 0)
print(matrix)
# Result:   Transform2D(0.49.., 0.00.., 0.00.., 0.33.., 0.0, 0.0)
```
8. Reflect by axis
```python
# Reflect Matrix
matrix.reflect(rtype='origin')
print(matrix) # Result: Transform2D(-0.49.., 0.00.., 0.00.., -0.33.., 0.0, 0.0)
matrix.reflect(rtype='x')
print(matrix) # Result: Transform2D(-0.49.., 0.00.., 0.00.., 0.33.., 0.0, 0.0)
matrix.reflect(rtype='y')
print(matrix) # Result: Transform2D(0.49.., 0.00.., 0.00.., 0.33.., 0.0, 0.0)
```
rapporteur 0.1.3
Report run status and results to Slack and others
Requires Python: >=3.11


# Rapporteur

A simple package to log the result of the execution of a program, as well as status updates, to Slack (and possibly other backends).


## Install

```bash
pip install rapporteur
# or #
uv add rapporteur
```


## Getting the information you need

To make rapporteur work, you need:

1. A Slack app installed in the workspace (https://api.slack.com/apps). Make sure that it has the scope to write to channels. Then, add it to the relevant channels (Edit Settings for the channel, go to Integrations, Add App, then select the app).
2. A token for that app. You can find it in OAuth&Permissions
3. The channel ID. If you click on the name of a channel, you can see its Channel ID at the bottom, which typically starts with C. If you are in a browser, it is also the last part of the URL.


## Basic usage

```python
from rapporteur.report import Report
from rapporteur.slack import SlackReporter

report = Report(
    description="My test report",
    reporters=[
        SlackReporter(token="xoxb-your-token", channel="C12345678")
    ],
)
with report:
    logger.info("Hello, world!")
    logger.error("oh no!")  # Will be in the Slack report
```


## With serieux

The configuration for a report can be stored in a file and deserialized using serieux (>=0.2.9).

**Configuration**

```yaml
description: "test test test"
reporters:
  - $class: rapporteur.slack:SlackReporter
    token: "xoxb-your-token"
    show_logs: 5   # Show last 5 error logs
    channel: "C12345678"
```

To encrypt the token using PASSWORD, set the `$SERIEUX_PASSWORD` environment variable to PASSWORD and run:

```bash
serieux patch -m rapporteur.report:Report -f path/to/config.yaml
```

The above command will patch the config inplace to replace the token with an encrypted version of the token, using the provided password. The argument to `-m` is a reference to the model for the whole configuration file, so you may want to adjust it if the report config is part of a bigger config.

**Code**

```python
import os
from serieux import deserialize
from serieux.features.encrypt import EncryptionKey

# You can omit EncryptionKey if it's not encrypted
report = deserialize(Report, Path("path/to/config.yaml"), EncryptionKey(os.environ[SERIEUX_PASSWORD]))
with report:
    logger.info("Hello, world!")
    logger.error("oh no!")  # Will be in the Slack report

    # Optional: set a custom message to be displayed at the end
    report.set_message("It is done.")
```
tparton 2.0.0
Evolution of the transversity parton distribution functions via two methods: (1) direct integration of the DGLAP equations along the energy scale and (2) fast Mellin inversion.
Requires Python: >=3.8

# tParton

Copyright 2024 Congzhou M Sha

This is an evolution code for the transversity parton distribution functions encountered in hadronic physics.

## Installation

First, install this package using `pip install tparton`.

## Running tParton as a standalone script

To evolve a transversity pdf, run the command `python -m tparton m`. This uses the Mellin moment by default. To use the energy scale integration method, run the command `python -m tparton t`. Use `python -m tparton m -h` or `python -m tparton t -h` for help.

An example run will look like:

`python -m tparton m INPUTPDF.dat 3.1 10.6 --morp plus -o OUTPUTPDF.dat`

We are evolving the `INPUTPDF.dat` from 3.1 to 10.6 GeV<sup>2</sup>, for the plus type distribution, and with output written to `OUTPUTPDF.dat`.

## Importing the tParton package

To use the Hirai ODE integration method:
`from tparton.t_evolution import evolve`

To use the Vogelsang Mellon moment method:
`from tparton.m_evolution import evolve`

Run `help(evolve)` for a description of the inputs.