Skip to content

This program can be used to plot the structure of a protein in the 2D HP model.

Notifications You must be signed in to change notification settings

douglas444/2dhp-plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

2dhp-plot

This program can be used to plot the structure of a protein in the 2D HP model. It takes as input the sequence of aminoacids, the direction of the edges between the aminoacids and the output file name. In the sequence, H stands for hydrophobic and P stands for polar. In the directions, R stands for right, L stands for left and S stands for straight.

Bellow there's an example of a figure plotted for the sequence HHHHHHHHHHHHPHPHPPHHPPHHPPHPPHHPPHHPPHPPHHPPHHPPHPHPHHHHHHHHHHHH and directions RLLSLRRLLRSRRLRLRRLLRRLLRRLRRLLRRLLRRLRRLLRRLLRRLRLRRSRLSSSLLSS.

alt text

The following projects can be used to predict the directions given the sequence

Requirements

  • gcc
  • SDL2

How to install SDL2:

http://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/

If the link is broken, try this other one:

https://web.archive.org/web/20220706232201/http://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/

Compilation

To compile, execute each one of the following commands from the root of the project:

gcc -Wall -O2  -c ./main.c -o ./main.o 
gcc  -o ./2dhp-plot ./main.o -lSDL2 -lm -s

How to run

After compiling it, you can run the 2dhp-plot binary by executing the following command from the root of the project.

./2dhp-plot "HHHHHHHHHHHHPHPHPPHHPPHHPPHPPHHPPHHPPHPPHHPPHHPPHPHPHHHHHHHHHHHH" "RLLSLRRLLRSRRLRLRRLLRRLLRRLRRLLRRLLRRLRRLLRRLLRRLRLRRSRLSSSLLSS" ./example_figure.bmp

About

This program can be used to plot the structure of a protein in the 2D HP model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages