Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Diamide Geometry Creation

A Python package for generating naive diamide geometries using OpenBabel, intended to be used as starter geometries for further optimisation.

Chemical System

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

Usage

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.

Installation

  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Unix/macOS
# or
.\venv\Scripts\activate  # On Windows
  1. Install the required packages:
pip install numpy
pip install openbabel-wheel==3.1.1.21

Special Note: OpenBabel Installation

The OpenBabel Python package requires the OpenBabel C++ library to be installed first. Here are the steps:

For macOS:

# Install OpenBabel using Homebrew
brew install openbabel

# Then install the Python package
pip install openbabel-wheel==3.1.1.21

A note on troubleshooting macOS installations of openBabel on M1

If 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

For Linux:

# Install OpenBabel using apt
sudo apt-get install libopenbabel-dev

# Then install the Python package
pip install openbabel-wheel==3.1.1.21

For Windows:

  1. Download and install OpenBabel from the official website
  2. Add OpenBabel to your system PATH
  3. Install the Python package:
pip install openbabel-wheel==3.1.1.21

Project Structure

  • diamide_geometry_creation.py: Main module containing core functionality
  • config.py: Configuration file containing constants and geometry definitions
  • base_xyz_geometries/: Directory for input XYZ/PDB files
  • conformers/: Directory where generated conformers are saved

License

[Add your license information here]

About

A Python script for programatically and manipulating diamide geometries using OpenBabel.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages