Skip to main content

Convert strained SMILES to XYZ coordinates with stereocontrol

Project description

strainedSMILES2xyz

PyPI version

strainedSMILES2xyz is a Python tool that uses RDKit and ORCA to generate 3D .xyz geometries from SMILES strings — specifically designed for strained molecules. It provides a simple interface for both scripting and command-line use.

📄 Note: A publication describing the method is in preparation. Link will be added here once available.


📦 Installation

Install via pip (requires Python 3.8+):

pip install strainedsmiles2xyz

⚠️ RDKit must be installed separately via conda or similar:

conda install -c conda-forge rdkit=2025.03.1

You will also need ORCA version 6.0 or higher in your PATH or set as ORCA_PATH to enable ORCA based corrections.


🚀 Usage

🔧 From the command line:

python -m strainedsmiles2xyz "SMILES"

or:

strainedsmiles2xyz "SMILES"

This prints an XYZ-formatted structure to stdout.


🐍 From Python:

from strainedsmiles2xyz import smiles_to_xyz

mol, info = smiles_to_xyz(
    "C1=CCC1",                     # SMILES input
    print_level=1,                # log verbosity
    no_chirality_enforced_allowed=True,  # allow fallback if stereochemistry fails
    use_orca_corrections=False,  #  apply ORCA optimization corrections
    n_cores=1                     # number of threads for ORCA
)
  • mol is an RDKit Mol object
  • info is a dictionary containing metadata and the "xyz_string" (raw XYZ output)

📁 Included Data

  • notebooks/: Notebooks demonstrating the inner workings of the method, including how RDKit, Open Babel, and strainedSMILES2xyz perform in different cases
  • benchmark/: Benchmarking results — XYZ files generated by different methods and re-optimized using GFN2-xTB

⚙ Requirements

  • RDKit ≥ 2025.03.0 (Must be installed via Conda or other method — not available via PyPI)
  • ORCA ≥ 6.0 (strongly recommended; used for correction step)

🧪 Example

strainedsmiles2xyz "C1=CCC1" > cyclobutene.xyz

📝 Citation

Coming soon — publication in preparation.


📨 Contact

Maintained by Dennis Svatunek. Contributions and suggestions are welcome.

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

strainedsmiles2xyz-0.2.3.tar.gz (47.4 kB view details)

Uploaded Source

Built Distribution

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

strainedsmiles2xyz-0.2.3-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file strainedsmiles2xyz-0.2.3.tar.gz.

File metadata

  • Download URL: strainedsmiles2xyz-0.2.3.tar.gz
  • Upload date:
  • Size: 47.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for strainedsmiles2xyz-0.2.3.tar.gz
Algorithm Hash digest
SHA256 b0840bb64a8ce81e3c0632329e18343ec357b447feff599784e9e01736b41394
MD5 66808449aa9f8a8cf79241123fd71246
BLAKE2b-256 bcbcf9147269354de66a68f8f1e1563b7e20ab9b45e6b3f3a72ba050afbfaab0

See more details on using hashes here.

File details

Details for the file strainedsmiles2xyz-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for strainedsmiles2xyz-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8ed1bebf51e5aeb11ce94abb182bea9c4f888b995312db4d32d63e13aef32d54
MD5 509b94e07cc149f4f5934dfcfc8189e8
BLAKE2b-256 7a2dc457335d5c0f6dac36b91e4b03f257db7e94c84f9afb43b3ba6255ab79e6

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