Frac-to-cart-coordinates
The Frac-to-cart-coordinates package allows users to easily convert atomic coordinates from Cartesian to fractional format and vice versa, based on the unit cell parameters.
Overview
In crystallography, atomic positions within a crystal's unit cell can be described using:
- Fractional coordinates $(x/a, y/b, z/c)$, which refer to the natural axes (a, b, c), scaled by their respective unit cell lengths.
- Orthogonal coordinates $(X, Y, Z)$, which use a right-angled Cartesian system with distances measured in Ångstroms.
For triclinic unit cells, the relationship between these coordinate systems involves a transformation matrix with non-trivial elements.
This implementation follows the methodology described on Jon Cooper's website, fractorth. It relies on the fundamental principles of spherical trigonometry (see implementation_details).
Installation
Run the following command in your terminal:
pip install Frac-to-cart-coordinates
Make sure you have numpy installed and Python 3.6 or higher.
Usage
Importing the Module
from Fractocart import convert_to_fractional_coordinates, convert_to_cartesian_coordinates
Functions
-
Convert to Fractional Coordinates
fractional_coords = convert_to_fractional_coordinates(cartesian_coords, unit_cell)
-
Convert to Cartesian Coordinates
cartesian_coords = convert_to_cartesian_coordinates(fractional_coords, unit_cell)
Contributing
Contributions are welcome! To contribute:
- Fork the repository, then clone the fork (see there).
- Create a feature branch (
git checkout -b feature-name). - Commit your changes (
git commit -m "Add new feature"). - Push to the branch (
git push origin feature-name). - Open a merge request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for Frac-to-cart-coordinates 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Frac-to-cart-coordinates-1.1.6.tar.gz | 5.1 kB | Without provenance | Details for Frac-to-cart-coordinates-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Frac_to_cart_coordinates-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for Frac_to_cart_coordinates-1.1.6-py3-none-any.whl |
Total release size: 11.1 kB
Release files / Frac-to-cart-coordinates-1.1.6.tar.gz
| Download URL | Frac-to-cart-coordinates-1.1.6.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c81d731f2ee35eac4675b9ca947c475950265497e5ca80a3554b573e014aad3c
|
|
BLAKE2b-256 checksum How to use checksums |
609ffbe275e136c4eee7474abb4c260d197ba2e0cec45a02de5147ab0c2afc73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.20
|
Release files / Frac_to_cart_coordinates-1.1.6-py3-none-any.whl
| Download URL | Frac_to_cart_coordinates-1.1.6-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e19cf409e50f3558ed590fe13d6094920ea67518b5b4dd737b3fa1041b97a2a1
|
|
BLAKE2b-256 checksum How to use checksums |
93d39b86aa67c19734809837743580af2d752137b4f83b94d3d93ffe80684f82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.20
|
Security for Frac-to-cart-coordinates 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.