A Python package for generating naive diamide geometries using OpenBabel, intended to be used as starter geometries for further optimisation.
This package is designed to work with a covalent diamide dimer system. The default input structure is a PDB file containing a covalent dimer with initial phi-psi angles of (-90°, -90°). The system consists of:
- Two peptide units connected by a covalent bond
- Each peptide unit contains the standard backbone atoms (N, CA, C, O)
- The system allows for manipulation of:
- Phi angle (N-CA-C-N)
- Psi angle (CA-C-N-CA)
The package generates conformers based on common secondary structure regions in the Ramachandran plot:
- β-sheet regions
- α-helix regions
- Left-handed helix regions
- Polyproline II regions
The package provides functions for:
- Creating molecules from XYZ and PDB files
- Manipulating molecular geometries
- Generating conformers based on Ramachandran plot regions
- Calculating and modifying dihedral angles
Example usage To create the geometries with the default parameters:
python diamide_geometry_creation.py
This will create a directory called 'conformers/' with the naive xyz files.
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Unix/macOS
# or
.\venv\Scripts\activate # On Windows- Install the required packages:
pip install numpy
pip install openbabel-wheel==3.1.1.21The OpenBabel Python package requires the OpenBabel C++ library to be installed first. Here are the steps:
# Install OpenBabel using Homebrew
brew install openbabel
# Then install the Python package
pip install openbabel-wheel==3.1.1.21If you encounter a CMake error during OpenBabel installation that looks like this:
CMake Error: Compatibility with CMake < 3.5 has been removed from CMake.
Try installing with the following command that sets the minimum CMake policy version:
CMAKE_POLICY_VERSION_MINIMUM=3.5 pip install openbabel-wheel==3.1.1.21# Install OpenBabel using apt
sudo apt-get install libopenbabel-dev
# Then install the Python package
pip install openbabel-wheel==3.1.1.21- Download and install OpenBabel from the official website
- Add OpenBabel to your system PATH
- Install the Python package:
pip install openbabel-wheel==3.1.1.21diamide_geometry_creation.py: Main module containing core functionalityconfig.py: Configuration file containing constants and geometry definitionsbase_xyz_geometries/: Directory for input XYZ/PDB filesconformers/: Directory where generated conformers are saved
[Add your license information here]