Read lammps data infomations.
Project description
readlammpsdata
A script for reading and modifying LAMMPS data
Install
# install from github
git clone git@github.com:eastsheng/readlammpsdata.git
cd readlammpsdata
pip install .
# install from pypi
pip install readlammpsdata
Usages
import readlammpsdata as rld
# 0. read Atoms, Masses etc.
Atoms = rld.read_data(lmp, data_sub_str = "Atoms # full")
Masses = rld.read_data(lmp, data_sub_str = "Masses")
PairCoeffs = rld.read_data(lmp, data_sub_str = "Pair Coeffs")
Bonds = rld.read_data(lmp, data_sub_str = "Bonds")
# 1. read box size
xyz = rld.read_box(lmp)
Lx = xyz["xhi"]-xyz["xlo"]
print(xyz)
print(Lx)
# 2. read atomic number
Natoms = rld.read_atom_info(lmp,"atoms")
print("Number of atoms is %s" %Natoms)
# 3. read charges
charges = rld.read_charges(lmp)
print("Charges of atoms are %s" %charges)
print(round(sum(charges),6))
# 4. ......
print(help(rld)) # for read all functions
Fixes
-
2025-04-29
- Added the
msi2clayff_modifiedfunction
- Added the
-
2023-11-24
- Fixed bugs of
addH
- Fixed bugs of
-
2023-11-22
- Added the
change_lmp_axisfunction - Added the
coord2zerofunction - Added the
addHfunction - Added the
cut_lmp_atomsfunction
- Added the
-
2023-10-21
- Added the
exchange_positionfunction
- Added the
-
2023-10-20
- Added the
change_type_orderfunction - Added the
combine_lmpfunction - Added the
cut_lmpfunction
- Added the
-
2023-10-17
-
Added the
move_boundaryfunction; -
Added the
densityfunction;
-
-
2023-10-16
- Added the
modify_methane_hydratefunction; - Added the
modify_headerfunction; - Added the
add_atomsfunction; - Added the
array2strfunction;
- Added the
-
2023-10-12
-
Added the
sort_lmpfunction; -
Added the
lmp2xyzfunction; -
Added the
msi2clayfffunction; -
Added the
lmp2tip4pfunction;
-
-
2023-10-08
- Added the
pdb2xyzfunction; - Added the
read_formulafunction; - Added the
modify_posfunction; - Added the
modify_pore_sizefunction;
- Added the
-
2023-09-23
- Replaced the
read_Natomsto theread_atom_infofunction; - Added the
read_volfunction; - Added the
read_xyzfunction; - Added the
read_pdbfunction;
- Replaced the
-
2023-09-22
- Added the
read_termsfunction for reading complex LAMMPS data;
- Added the
-
2023-09-11
- Added
read_boxfunction; - Added
read_Natomsfunction; - Added
read_chargesfunction;
- Added
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
readlammpsdata-1.1.2.tar.gz
(33.2 kB
view details)
File details
Details for the file readlammpsdata-1.1.2.tar.gz.
File metadata
- Download URL: readlammpsdata-1.1.2.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c1333fe59238f7db73da379ce129d9043ad544a3633605f7611bb026c80f668
|
|
| MD5 |
13f20b846d803c9edcbc42d1850a96ca
|
|
| BLAKE2b-256 |
6e219e67247ab85638c1461494255a0f45446b8c459a8710c44ee69485fab377
|