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.15.tar.gz (2.4 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.15-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xyz_parser-0.0.15.tar.gz
  • Upload date:
  • Size: 2.4 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.15.tar.gz
Algorithm Hash digest
SHA256 86aeb4e013ae3e3f72d97fa09e8dccc749e7bb85a0a2b111639ffc920315f603
MD5 fb2d6bbee93e5eabfa82405411fa43e4
BLAKE2b-256 5861c010ace8c04f812ac1596a3c5261418fb381d3f01220b8fcbb040c9c1cc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xyz_parser-0.0.15-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.15-py3-none-any.whl
Algorithm Hash digest
SHA256 5b2fabcff5260c55e0954bd137c22977261f3a06697c38c072fec056547bbdaf
MD5 d8ae5e315cb5723b13c5f0b118598c03
BLAKE2b-256 b86df36e203272867fabc4f64fa14da15c482c423c4a5f8e911b02215fcf2aae

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