Code Monkey home page Code Monkey logo

lammps_thermo's Introduction

LAMMPS Thermo

License

Overview

LAMMPSThermo is a lightweight class to extract and manipulate thermodynamic info from lammps log files. The goal is to make for easy averaging (via e.g., numpy) and plotting (via, e.g., matplotlib) of thermodynamic properties from LAMMPS simulations.

Warning

LAMMPSThermo is still in early development (0.x releases). The API may change unexpectedly.

Usage

LAMMPSThermo only supports a few modes of use. You can load a LAMMPS log file into the LAMMPSThermo class and then retrieve properties.

import lammps_thermo
# Create the LAMMPSThermo object
thermo = lammps_thermo.load("example.log")
# Extract the volume data (assuming it exists in the log file)
volume = thermo.prop("Volume")

The prop method will return a numpy array of with the requested property. You can also specify multiple properties at once.

data = thermo.prop(["Step", "Volume"])

If Step or Time data exist in the log file, you can request only certain time/step bounds:

volume = thermo.prop("Volume", time_start=1000.0, time_end=10000.0)
volume = thermo.prop("Volume", step_start=1000, step_end=10000)

Installation

Installation from source is currently the only option. You can use conda to get the requirements.

git clone [email protected]:rsdefever/lammps_thermo
cd lammps_thermo
conda create --name lt --file requirements.txt
conda activate lt
pip install .

lammps_thermo's People

Contributors

rsdefever avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.