Skip to main content

A Python tool for visualizing atomic systems and properties of condensed matter.

Project description

XtraCrysPy

A Python tool for visualizing atomic systems and spatial properties of condensed matter.

Alt text Alt text

Alt text Alt text

Features:

  • Plot molecular systems with minimal setup
  • Plot systems from DFT or MD input/output files
  • Interact with the system to caluclate distances, angles, or receive atomic information
  • Display relaxation or MD steps from QE relax output, raw coordinates, LAMMPS trajectory files, or CP2K (xyz)
  • Animate trajectories, with control over frames per second and steps per frame.
  • Display reciprocal space features
  • Plot real space iso-surfaces (charge density, etc)
  • Plot reciprocal iso-surfaces (Fermi surface, spin-texture, etc)

Supported File Types:

  • Quantum ESPRESSO input or output
  • POSCAR
  • CIF
  • XSF
  • CP2K
  • BXSF (coming soon)
  • Any ASE supported format

Requirements:

Installation:

The Anaconda Python distribution is recommended.

Install with pip:

  • pip install xtracryspy

Install from source:

  • python setup.py install
  • python setup.py install --user

(only use --user if you do not have permission to install python packages)

Display atomic models directly from the command line:

  • xcp --help
  • xcp -fn <input_file> -ff <file_format> -bl <bond_distance>

Control Inputs:

  • 'u' : Toggle UI visibility
  • 'a' : Toggle Axis visibility
  • 'b' : Toggle Boundary visiblity
  • 'c' : Toggle constraint of atoms within cell
  • 'k' : Toggle the reciprocal lattice vector visibility
  • 's' : Togle the selection type panel visibility
  • 'n' : Toggle the cell repition panel visibility
  • '>' : Step forward in relax or MD
  • '<' : Step backward in relax or MD
  • CTRL + ('>' or '<') : Step 5% through the relaxation or MD steps
  • SPACE : Pause or resume an active animation
  • SHIFT + 'o' : Report the camera position and orientation
  • SHIFT + 'c' : Reset camera to default position
  • SHIFT + 's' : Take snapshot
  • CTRL + 'w' : Exit
  • Arrow Keys : Rotate model
  • SHIFT + Arrow Keys : Translate camera
  • CTRL + Arrow Keys (+ SHIFT) : Rotate (or Translate) in smaller steps

Display an atomic model from inputfile, with the examples/main.py script:

  • python main.py <input_file>
  • python main.py <input_file> <bond_distance>

Examples:

Available in the examples directory

From scratch:

  • python CNO3.py
  • python caffeine.py
  • python silicon_fcc.py
  • python example_motion.py
  • python example_textured_isosurface.py

From inputfile (with main.py script):

  • python main.py <input_file>
  • python main.py <input_file> <bond_distance>

From inputfile (programmatic):

  • python SnTe_2D.py
  • python example_cif.py
  • python example_cp2k.py
  • python example_qe_in.py
  • python example_poscar.py

Relax QE outputfile:

  • python example_relax.py

LAMMPS MD trajectory:

  • python example_lammps_md.py

Charge Density:

  • python example_charge_density.py

Reciprocal Space:

  • python example_BZ.py

Isosurfaces:

  • python example_isosurface1.py
  • python example_isosurface2.py
  • python example_isosurface_clip.py
  • python example_colored_isosurface.py
  • python example_textured_isosurface.py
  • python example_textured_isosurface_clip.py

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

XtraCrysPy-1.1.2.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

XtraCrysPy-1.1.2-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file XtraCrysPy-1.1.2.tar.gz.

File metadata

  • Download URL: XtraCrysPy-1.1.2.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.8

File hashes

Hashes for XtraCrysPy-1.1.2.tar.gz
Algorithm Hash digest
SHA256 bded253a0e82772027b3339ed69c046d21a221ecf812c6cbe02d97282d702def
MD5 26760d72fb298a2f1ffcbcd2febd0815
BLAKE2b-256 0e4309d53917291b5c2b26d88ea605acd9112bfce71e5fa54480da17264df68c

See more details on using hashes here.

File details

Details for the file XtraCrysPy-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: XtraCrysPy-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.8

File hashes

Hashes for XtraCrysPy-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9278b175140be17a8d78592a53095240e4801c6406d7edf5ebff5e387b301d33
MD5 c90de6fb2503a0d75e1aba96bfe28f58
BLAKE2b-256 b20001298216fed36e13859719af79967204606276e37a2094f7213ded349b68

See more details on using hashes here.

Supported by

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