Skip to main content

A library for advanced scientific calculations and visualization

Project description

sage_lib

Overview

sage_lib is a versatile library designed for advanced scientific computations and visualization. It enables users to process atomic structures, perform thermodynamic analyses, generate band structures, and handle various tasks commonly required in quantum mechanical and molecular dynamics studies. The primary focus of this library is to simplify complex workflows, enabling researchers to conduct simulations, generate graphical representations, and export data in multiple formats with ease.

Features

Atomic Position Export: Converts atomic position files from one format to another, making data compatible with different simulation tools or visualization software.

Plot Generation: Generates plots based on simulation data, such as band structures or molecular arrangements. This includes support for visualizing results from popular tools like VASP.

Thermodynamic Analysis: Provides methods to calculate thermodynamic properties based on ab initio data. This includes phase diagrams, ensemble analysis, and more.

Blender Integration for Rendering: Uses Blender to render atomic structures and molecular arrangements. Supports customization like resolution, camera angles, and the addition of fog effects.

Dynamic Molecular Analysis: Analyzes molecular dynamics data, tracking species counts, evaluating force fields, and computing properties such as diffusion coefficients and bond distances.

Configuration Generation and Editing: Reads atomic structures and configurations, applies specified editing operations, and exports new structures. This includes operations like creating supercells, rattling atomic positions, and applying compressions.

Solvent Environment Generation: Creates a solvent environment around a given molecular or atomic structure, supporting various solvents and configurations to simulate realistic environments.

Dimer Search and Analysis: Facilitates dimer search to analyze interactions between specific pairs of atoms, which is useful for studying catalytic activity and other atomic-scale interactions.

Surface Disassembly: Generates configurations that allow the disassembly of surfaces, which is particularly useful for understanding surface stability and catalysis.

Customizable File Management: Provides functionalities for handling, reading, and exporting files in different formats including VASP, XYZ, and others.

Installation

To install sage_lib, use the following command:

pip install sage_lib

Ensure that you have Python 3.7 or higher.

Usage

sage_lib can be used from the command line or programmatically.

Command Line Usage

The library includes a console command sage which can be used to execute various subcommands:

sage export --path ./data --source VASP --output_path ./converted --output_source PDB

This command will convert atomic position files from VASP format to PDB format, saving the output in the ./converted directory.

Another example for generating a plot:

sage plot --path ./data --plot bands --fermi 5.0 --output_path ./plots

This command generates a band structure plot using the data found in the specified directory.

Programmatic Usage

Below is a Python example that demonstrates how to use sage_lib programmatically:

from sage_lib.partition import Partition

Initialize a Partition object

PT = Partition(path='./data')

Read files from a specified location

PT.read_files(file_location='./data', source='VASP', verbose=True)

Export files in a different format

PT.export_files(file_location='./output', source='PDB', verbose=True)

This example initializes a Partition object, reads files from a directory, and exports them to a different format.

Dependencies

sage_lib requires the following packages:

numpy: for numerical operations

matplotlib: for plotting and visualization

scipy: for scientific computations

imageio: for managing image files

Optional dependencies include:

pytest: for testing

flake8: for code linting

sphinx: for generating documentation

License

sage_lib is licensed under the MIT License. For more details, refer to the LICENSE file.

Contributing

Contributions are welcome! Please feel free to open an issue or a pull request on the GitHub repository to contribute to the project.

Contact

For questions, please contact the author via email: lombardi@fhi-berlin.mpg.de

For bug reports or feature requests, visit the issues page.

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

sage_lib-0.1.6.15.tar.gz (373.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sage_lib-0.1.6.15-py3-none-any.whl (491.8 kB view details)

Uploaded Python 3

File details

Details for the file sage_lib-0.1.6.15.tar.gz.

File metadata

  • Download URL: sage_lib-0.1.6.15.tar.gz
  • Upload date:
  • Size: 373.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sage_lib-0.1.6.15.tar.gz
Algorithm Hash digest
SHA256 efd63885d3252bcbe92812485e4b3afcc60c0c6a6af98a542f53ebf1f4d4174d
MD5 e8fac5e8d8ac8e0b3249fc24aa140796
BLAKE2b-256 1fdac6126b373e20bf2031ce85a52d39154532232b2b2ead7d2024382beb6314

See more details on using hashes here.

File details

Details for the file sage_lib-0.1.6.15-py3-none-any.whl.

File metadata

  • Download URL: sage_lib-0.1.6.15-py3-none-any.whl
  • Upload date:
  • Size: 491.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sage_lib-0.1.6.15-py3-none-any.whl
Algorithm Hash digest
SHA256 e669cf030f2c186cd6d3cb11885c9eb350c12d97e97280a8556c7726a567d0e4
MD5 d885a6709b67a7dea9139dee5224b64e
BLAKE2b-256 fd274d64ed08be5e7ab9b9fc3e8cfa90ea8ac7150d8e5fdffd4d110d0bb938a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page