Skip to main content

Parser of the xyz file format. Used in chemistry.

Project description

xyz_parser

A python parser for the fileformat (.xyz) used for storing computational chemistry data.

Install

pip install xyz_parser

Use

import xyz_parser

with open('molecules.xyz') as molecules_file:
    molecule = xyz_parser.parse(molecules_file)

for molecule in molecules:
    print(f'{molecule.natoms=}')
    print(f'{molecule.comment=}')
    for atom in molecule.atoms:
        print(f'{atom.symbol=}', end='')
        print(f' {atom.x=}', end='')
        print(f' {atom.y=}', end='')
        print(f' {atom.z=}', end='')
        print(f' {atom.extra=}')

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

xyz_parser-0.0.13.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

xyz_parser-0.0.13-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file xyz_parser-0.0.13.tar.gz.

File metadata

  • Download URL: xyz_parser-0.0.13.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for xyz_parser-0.0.13.tar.gz
Algorithm Hash digest
SHA256 94072f2e561c0a823413615e018bd5ddce8e851cc3d27813f6add8a08b7aa2da
MD5 c43a83868949b1e7563ffc916e0ec8d9
BLAKE2b-256 f8db9215b550f1341783a7f565723d40e868f2eaa1b36eead27ad104df88efe3

See more details on using hashes here.

File details

Details for the file xyz_parser-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: xyz_parser-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for xyz_parser-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 7b8bd101df88401cea0626f8c6e6caff0ec6cd617f1b1fdd1bf24d59057a3f6f
MD5 228bf4e5c1c06e9e32ba64f451447380
BLAKE2b-256 e8933e3b8a75272d7e4ad4c06afaeb2a7c3675e19dda29005f5263704d06070f

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