semvec/pypi-packages huggingface dataset:
pyneva 0.7.51
Custom library for electricity meters Neva MT
License: MIT
Requires Python: >=3.9

## Library for electricity meters Neva MT

Working via serial port or RFC2217 server. 
IEC 61107 protocol is used (currently IEC 62056-21) and OBIS codes.

## Installation

```shell
python -m pip install pyneva
```

## Usage examples

### CLI

```shell
$ python -m pyneva connect -i rfc2217://192.168.88.109:1884 -m NevaMT324AOS --val active_energy current --obis 60.01.00*FF
Connected to: [NEVAMT324.1106 : 11111111]

Values:
total_energy     ActiveEnergy(total=16484.51, T1=12896.28, T2=3588.23, T3=0.0, T4=0.0)
active_power     ActivePower(phaseA=5.0, phaseB=1372.4, phaseC=122.3, total=1499.8)

OBIS:
60.01.00*FF      60089784
```

### Code

```python
from pyneva import NevaMT324AOS

# /dev/ttyX for linux local port
# comX or COMX for Windows local port
with NevaMT324AOS("rfc2217://192.168.88.109:1884") as meter:
    print(meter.model)
    # MT324 A OS 5(60)A

    print(meter.serial_number)
    # 11111111

    print(meter.active_energy)
    # ActiveEnergy(total=16348.84, T1=12790.08, T2=3558.76, T3=0.0, T4=0.0)

    print(meter.voltage)
    # Voltage(l1=233.81, l2=233.02, l3=232.15)

    print(meter.active_power)
    # ActivePower(l1=5.0, l2=1833.4, l3=130.3, total=1968.8)

    print(meter.seasonal_schedules)
    # (SeasonSchedule(month=1, day=1, weekday_skd_num=1, sat_skd_num=1, sun_skd_num=1),)
    # Returns tuple with seasonal schedules.
    # Each schedule specifies from which date the tariff starts,
    # and the numbers of tariff schedules on weekdays, Saturdays, Sundays separately.

    print(meter.special_days_schedules)
    # ()
    # Returns empty tuple if you have no special days tariff schedules (max 32 days).
    
    print(meter.tariff_schedules)
    # (
    #     TariffSchedule(parts=(
    #         TariffSchedulePart(hour=7, minute=0, T_num=1),
    #         TariffSchedulePart(hour=23, minute=0, T_num=2)
    #     )),
    # )
    # Returns tuple with tariff schedules.
    # Each tariff schedule contains parts of the schedule.
    # Each schedule part describes from what time of day the tariff starts
    # and tariff number (T1, T2, T3, T4).
```

## Supported models

- MT 324 A OS 5(60)A (NEVAMT324.11XX)
- MT 324 AR E4BS 5(60)A (NEVAMT324.25XX)
srbogrid 0.2.1
Package for calculating space-reduced bond-order grids for diatomics
License: MIT
Requires Python: >=3.7,<3.10
Keywords: chemistry,diatomics,grid,curve,energy

# SRBOgrid - Space-Reduced Bond Order Grid

This module calculates the Space-Reduced Bond Order grids for optimal
configuration space sampling of the potenial energy curves for diatomics.

The code is based on the work described in: Rampino, S. (2016). Configuration-Space Sampling in Potential Energy Surface Fitting: A Space-Reduced Bond-Order Grid Approach. The Journal of Physical Chemistry A, 120(27), 4683–4692. [doi: 10.1021/acs.jpca.5b10018](http://doi.org/10.1021/acs.jpca.5b10018)

## Getting Started

These instructions will give you a copy of the project up and running on
your local machine for development and testing purposes. See deployment
for notes on deploying the project on a live system.

### Installation

Best way to install `srbogrid` is with `pip`:

```bash
pip install srbogrid
```

### Example

```python
from srbogrid.srbo import SRBO
```

The most straightforward way to compute the grid is to provide the parameters

- `Re` :  eqilibrium bond distance in atomic units [bohr]
- `De` : dissociation energy in atomic units [hartree]
- `ke` : force constant in atomic units [hartree / bohr^2]

#### Hydrogen molecule

For hydrogen molecule we can compute a SRBO grid with the following values:

```python
h2 = SRBO(Re=1.4034, De=0.1727, ke=0.3707)
h2.grid
array([0.63152744, 0.7632642 , 0.90460173, 1.05705019, 1.2225067 ,
       1.4034    , 1.60290972, 1.82531189, 2.07654928, 2.36522877,
       2.70449828, 3.1159375 , 3.63878276, 4.35671283, 5.50882366,
       8.7400997 ])
```

By default the grid will contain:

- 5 points on the repulsive part of the potential energy curve (left from `Re`)
- 10 points on the attractive part of the potential energy curve (right from `Re`)
- `Re` point itself

You can get more information by printing the `summary`:

```python
print(h2.summary())

System info:
	Re        :   1.403400
	De        :   0.172700
	ke        :   0.370700
	alpha     :   1.035977

Boundaries:
	rmin      :   0.631527
	rmax      :   8.740100
	Vfact     :   1.500000
	Vthrs     :   0.001000

	Beta      :   0.515422

Grid:
	nrep      :          5
	natt      :         10
	npoints   :         16
	f         :   2.000000

Grid points:
[0.63152744 0.7632642  0.90460173 1.05705019 1.2225067  1.4034
 1.60290972 1.82531189 2.07654928 2.36522877 2.70449828 3.1159375
 3.63878276 4.35671283 5.50882366 8.7400997 ]
```

You can visualize the grid on a model Morse potential with:

```python
h2.plot_morse()
```

<p align="center">
    <img src=".media/h2.png" alt="H2" width="800">
</p>

### More examples

A short tutorial is available
[here](http://nbviewer.jupyter.org/github/lmmentel/srbogrid/blob/master/notebooks/tutorial.ipynb) as a jupyter notebook.

## License

This project is licensed under the [MIT](LICENSE.md)
License - see the [LICENSE.md](LICENSE.md) file for
details.