Skip to content

CBB752Spring2016/Dihedral_Angle_Calc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README for Calculating Dihedral Angles from a PDB-file

Python tool that calculates the dihedral angle based on a pdb file and an input-id file containing the corresponing atom ids of four atoms in said file. A tool that accomplishes this task in the language R can be found [here] (https://github.com/kevkid/CBB_Bioinformatics_FinalProject_4.3). This tool is part of a set of bioinformatic and biological structure tools created for CBB752 at Yale University in the Spring 2016. The website containing the set of tools can be found [here] (http://cbb752spring2016.github.io/Structure).

General

The tool is named dihedrals.py. It takes 2 required inputs (input, inputids) and has one optional (output) The tool is called from the command line as exemplified below. It takes in a pdb file and a text file containing sets of 4 atom ids which define the dihedral angle in the pdb file. Sample files (sample-input.pdb and sample-ids.txt) are included in the repository. The corresponding output is given in sample-output.txt.

Usage

Usage: python3 distcalc.py -i < input file name > -n < input id file name > -o <.txt output filename>

Examples:

# Usage from terminal:
python3 dihedrals.py -i sample-input.pdb -n sample-ids.txt -o sample-output.txt
python3 dihedrals.py -i sample-input.pdb -n sample-ids.txt
   		 

Input and Output formats

Input Formats (-Flags):

  • input (-i): string of corresponding pdb file
  • input ids (-n): string corresponding to text file containing integers for atom ids. Each line is a set of 4 which defines the dihedral angle.
  • output (-o): string containing the name of the file to which the angles are output

Format of Input ID file:

  • Text file containing integers in the format of four atom ids per row. The atom ids of each row define each dihedral angle.
Atom ID1 Atom ID2 Atom ID3 Atom ID4
1 2 3 12
1 2 5 6
2 5 6 7
5 6 7 8
... ... ... ...
... ... ... ...

Order of Output file formatting:

--------Atom Names------- ----------Atom IDs---------- Angle
A1 A2 A3 A4 A1 A2 A3 A4 Angle (°)
N CA C N 1 2 3 12 99.285
N CA CB CG 1 2 5 6 -69.859
CA CB CG CD 2 5 6 7 -176.012
CB CG CD NE 5 6 7 8 176.505
... ... ... ... ... ... ... ... ...
... ... ... ... ... ... ... ... ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%