Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
A library for analysing LAMMPS Simulation output
Basic Info
- Host: GitHub
- Owner: chappertron
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://chappertron.github.io/thermotar/
- Size: 12.9 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
- Releases: 1
Metadata Files
README.md
thermotar
For importing LAMMPS log and chunk files, with a light bit of analysing too.
Docs are located at: chappertron.github.io/thermotar/
Installation:
Quick install:
Clone the repository and run from the root directory of the project:
sh
pip install .
Alternatively build without explicitly cloning first:
sh
pip install git+https://github.com/chappertron/thermotar
Currently no pip or conda distribution.
Basic usage
Reading a lammps log file:
``` python import thermotar as th # Read LAMMPS log file # By default reads the last runs output thermo = th.create_thermos('log.lammps')
import matplotlib.pyplot as plt plt.plot(thermo.Step,thermo.Temp) plt.show()
The columns of data can be accessed from the `Thermo` object using indexing or the accessor syntax,
python
temp = thermo['Temp']
temp = thermo.Step
``
The latter can only be used if the columns are valid Python identifiers.
To aid with this, thecreate_thermos` function tidies up the column names.
Alternatively, the Thermo object has a .data attribute which contains the underlying Pandas DataFrame.
Then any normal Pandas operations can be used on it.
By default only the last 'run' from the log file is loaded with th.create_thermos.
Using the keyword arguments last=False and join=False will create a list of Thermo objects, one for each run.
Using last=False and join=True will create a single Thermo object, with all the runs in a single file.
last=True and join=True are the defaults.
Reading 'Chunk' Files
Chunks are spatial data outputted from the LAMMPS fix chunk/ave.
This file contains multiple tables, each of which is a sub-average over the course of the simulation.
If the ave running argument is provided to fix chunk/ave, then only the last frame is needed.
The th.create_chunk function reads just the last frame of this file.
python
# Read data from chunk ave or RDF
# Reads only the last table
chunk = th.create_chunk('chunk.prof')
plt.plot(chunk.Coord1,chunk.temp)
plt.show()
If you need all the frames, then the th.create_multi_chunks function can create a MultiChunk object to load them all.
python
# Read all the chunks from a chunk/ave file
chunks = th.create_multi_chunks('chunk.prof')
# Average the different frames of `MultiChunk` into a single `Chunk`
chunk = chunks.flatten_chunk()
As with the Thermo class, Chunk and MultiChunk instances have a .data attribute, and can be indexed or use the getter syntax.
The Chunk format is also outputted by the LAMMPS command fix ave/time in vector mode.
The constructor th.create_chunk can also optionally read data outputted by the numpy function savetxt using the style='np' kwarg,
python
chunk = th.create_chunk('data.txt',style='np')
Owner
- Name: Aidan Chapman
- Login: chappertron
- Kind: user
- Repositories: 2
- Profile: https://github.com/chappertron
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: thermotar
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Aidan
family-names: Chapman
email: aidan.chapman16@imperial.ac.uk
affiliation: Imperial College London
orcid: 'https://orcid.org/0000-0002-7064-0164'
GitHub Events
Total
- Issues event: 1
- Push event: 13
- Pull request event: 2
Last Year
- Issues event: 1
- Push event: 13
- Pull request event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- chappertron (4)