Skip to main content

A tool for converting atomic structure files

Project description

Atomorph

English | 中文

Atomorph

Atomorph is a tool for converting and manipulating atomic structure files. It supports conversions between various file formats, as well as handling atomic constraints.

Current Version: 1.0.0

Features

  • Support for multiple file formats (VASP, XYZ, EXTXYZ, etc.)
  • Multi-frame structure file processing
  • Atomic constraints (fixed layers, specific elements, specific indices)
  • Atom sorting
  • Parallel processing
  • Both command-line and Python API interfaces
  • Detailed logging and error handling
  • Comprehensive documentation with bilingual support

Installation

pip install atomorph

Usage

Command-line Usage

Basic conversion:

atomorph input.xyz output.vasp

Specify formats:

atomorph input.xyz output.vasp --input-format xyz --output-format vasp

Fix specific elements:

atomorph input.xyz output.vasp --constraints "elements:C,H"

Fix specific layers:

atomorph input.xyz output.vasp --constraints "layers:0.3,0.5" --use-fractional

Fix specific atoms:

atomorph input.xyz output.vasp --constraints "indices:1,2,5-10"

Python API Usage

from atomorph import StructureConverter

converter = StructureConverter()

# Basic conversion
converter.convert(
    input_path="input.xyz",
    output_path="output.vasp"
)

# Fix specific layers
converter.convert(
    input_path="input.xyz",
    output_path="output.vasp",
    constraints=["layers", "0.3,0.5"],
    use_fractional=True
)

Version History

See CHANGELOG.md for a complete version history.

License

MIT


Atomorph 中文说明

Atomorph是一个用于转换和操作原子结构文件的工具,支持多种文件格式间的转换,以及原子约束的处理。

当前版本: 1.0.0

特性

  • 支持多种文件格式转换(VASP, XYZ, EXTXYZ等)
  • 支持多帧结构文件处理
  • 支持原子约束(固定层、指定元素、指定索引)
  • 支持原子排序
  • 支持并行处理
  • 命令行和Python API两种使用方式
  • 详细的日志和错误处理
  • 全面的双语文档支持

安装

pip install atomorph

使用方法

命令行使用

基本转换:

atomorph input.xyz output.vasp

指定格式:

atomorph input.xyz output.vasp --input-format xyz --output-format vasp

固定特定元素:

atomorph input.xyz output.vasp --constraints "elements:C,H"

固定特定层:

atomorph input.xyz output.vasp --constraints "layers:0.3,0.5" --use-fractional

固定特定原子:

atomorph input.xyz output.vasp --constraints "indices:1,2,5-10"

Python API使用

from atomorph import StructureConverter

converter = StructureConverter()

# 基本转换
converter.convert(
    input_path="input.xyz",
    output_path="output.vasp"
)

# 固定特定层
converter.convert(
    input_path="input.xyz",
    output_path="output.vasp",
    constraints=["layers", "0.3,0.5"],
    use_fractional=True
)

版本历史

完整的版本历史请参见CHANGELOG.md

许可证

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atomorph-1.0.2.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

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

atomorph-1.0.2-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file atomorph-1.0.2.tar.gz.

File metadata

  • Download URL: atomorph-1.0.2.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for atomorph-1.0.2.tar.gz
Algorithm Hash digest
SHA256 81bc692f04510419290f96b95a9bf465894e58a11e215a35d2e531916ed403ea
MD5 4bb3c9ac1e195d2efe15bd5141fb5b24
BLAKE2b-256 af15b4b932b66a443a4eec96993d6b8788a03aab04dae9af05c5f2401c67c621

See more details on using hashes here.

File details

Details for the file atomorph-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: atomorph-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for atomorph-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d82c8b4ef716bb13b5bbaf70bdd023dd7df4f5d432e308d803f446296ad5cc3
MD5 39f76c6ee5cdd61fa7fc799e8acf652c
BLAKE2b-256 6f12d07c6945d012f409ef562bceccaf282d8270742cdf3589b17db8d8e480c5

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