Introduction

HQS Molecules is a tool that can be used in conjunction with other HQStage modules by HQS Quantum Simulations GmbH. HQS Molecules is a user-friendly Python package designed to streamline computational chemistry workflows. It offers functionalities for converting 2D chemical structures to 3D coordinates, accessing the PubChem database, interfacing with the xTB and CREST programs for energy calculations and conformer searches, and handling XYZ files. These functionalities enhance efficiency, accuracy, and ease of use, making it a valuable resource for chemists and researchers.

Associated Functionality

HQS Molecules is providing the following functionalities to the users:

  • Converting chemical structures from two-dimensional connectivity representations (SMILES strings or Molfiles) to three-dimensional coordinates. This is achieved using the RDKit and Open Babel packages.
  • API access to the PubChem database, permitting name-to-structure and structure-to-name searches directly via Python scripts.
  • Providing a Python interface for important functionalities of the semiempirical xTB program, such as single-point energy calculations, geometry optimizations and frequency calculations.
  • Performing conformer searches through a Python interface for the CREST program. New: HQS Molecules includes a procedure to refine conformer ensembles obtained via CREST by reassigning equivalent structures and completing the rotamer ensemble, combined with a screening for saddle points.
  • Reading and writing XYZ files.

Functionality in this package makes extensive use of Pydantic to define classes used for input and output.

Why it is Useful

  • For quantum-chemical calculations, a 3D structure is essential, providing the spatial coordinates of all atoms. The larger the molecule, the more likely it is to have multiple possible conformations that are in thermodynamic equilibrium. HQS Molecules allows chemists and researchers in other fields to easily transition from simple 2D representations of molecules to more complex and informative 3D structures. This is crucial for understanding molecular geometry, predicting behavior and properties, and performing computational chemistry simulations.

  • Direct access to the PubChem database enables users to quickly retrieve chemical information and structures by simply providing a chemical name or SMILES string. This streamlines the process of gathering data for research and development, saving time and reducing the potential for errors in manual searches.

  • Integrating xTB functionalities into Python scripts allows for automated and efficient computational chemistry workflows. Users can perform energy calculations, optimize molecular geometries, and conduct frequency analyses seamlessly within their Python environment, enhancing productivity and enabling more complex simulations.

  • Conformer searches are essential for identifying the most stable molecular conformations and understanding the conformational flexibility of molecules. By providing a Python interface for the CREST program with in-house developed post-processing, HQS Molecules simplifies the process of conformer searching, making it more accessible and easier to integrate into larger computational workflows.

  • XYZ files are a common format for representing molecular structures. The ability to read and write these files ensures compatibility with a wide range of computational chemistry tools and facilitates the exchange of molecular data between different software packages.

  • Pydantic provides data validation and parsing using Python type annotations. By leveraging Pydantic, the package ensures that input and output data are correctly formatted and validated, reducing the likelihood of errors and improving the robustness of the software.

Summary

With HQS Molecules, we utilize multiple existing packages to cover various configurations with a single tool, allowing users to work flexibly without having to choose between different programs. HQS Molecules provides a unified input for all available packages and outputs data in a format that can be used for further processing steps in computational chemistry simulations.

Sample Use Cases

HQS Molecules provides an easy-to-use Python interface to generate three-dimensional structures, optimize geometries, calculate molecular energies or vibration frequencies, and to sample molecular conformations. These functionalities are crucial building blocks in molecular simulation workflows for the chemical and pharmaceutical industries.

Example use cases:

  • The input for quantum chemistry calculations, such as density functional theory (DFT), is rarely identical with the content of chemical in-house databases. With functionality as implemented in this package, HQS computed thermodynamic properties for a customer using DFT, starting from a text file containing thousands of molecule names.
  • Converting chemical structures from 2D to 3D representations, finding and comparing geometries, sampling conformers: computational chemistry workflows require many steps before any DFT calculation can even start. HQS Molecules combines the established expertise of open-source packages such as RDKit, Open Babel, xTB or CREST behind a Python interface, while improving critical aspects. HQS Molecules can be used as part of your own workflow to provide the input for a quantum chemistry software, which simulates chemical reactions or calculates spectroscopic parameters.
  • Quantum algorithms for molecular electronic structure problems normally require a three-dimensional structure, for example in XYZ format, as an input. Obtaining such an XYZ file can be a nuisance for specialists and non-specialists alike. With HQS Molecules, the name of a molecule is all you need to generate three-dimensional geometries for a vast number of catalogued compounds.
  • As many other packages, the open-source Active Space Finder by HQS requires a molecular geometry as part of its input. HQS Molecules provides starting geometries for further calculations with PySCF and the Active Space Finder.

Further Materials

In addition to this manual, please check the example notebooks for a practical demonstrations of the utilities in this module.