Giter Club home page Giter Club logo

ribbon's Introduction

Protein Ribbon Diagrams

Parse PDB files and render ribbon diagrams of proteins in pure Go.

4HHB

Installation

Go should be installed and your GOPATH should be set (defaults to $HOME/go in Go 1.8+). $GOPATH/bin should be on your $PATH if you want to run the binaries easily.

$ go get -u github.com/fogleman/ribbon/cmd/rcsb

Example Usage

Provide a 4-digit RCSB Structure ID. The PDB file will automatically be downloaded and an image will be rendered. The triangle mesh will also be saved.

$ rcsb 4hhb  # generates 4hhb.png and 4hhb.stl

Resources

RCSB Protein Data Bank - Find PDB files of proteins here. Over 100,000 in the database.

PDB File Format - Details on the PDB file format.

Package pdb

Documentation

The pdb package parses PDB files. The following entities are currently parsed:

ATOM   => *pdb.Atom
HETATM => *pdb.Atom
CONECT => *pdb.Connection
HELIX  => *pdb.Helix
SHEET  => *pdb.Strand
BIOMT  => pdb.Matrix
SMTRY  => pdb.Matrix

Additionally, some higher-level constructs are produced:

*pdb.Residue
*pdb.Chain

Package ribbon

Documentation

The ribbon package generates 3D meshes given a pdb.Model. It can produce the following types of meshes:

  • Ribbon
  • Ball & stick (for ligands)
  • Space filling
  • Backbone

Package fauxgl

The fauxgl library is used for rendering the 3D meshes in pure Go.

Samples

Sample Sample Sample Sample

ribbon's People

Contributors

fogleman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ribbon's Issues

PDB/PDBx parser

I don't actively maintain this code any more, but there are working PDB and PDBx (using the underlying CIF format) parsers here if you're interested: https://github.com/TuftsBCB/io

I'm not necessarily suggesting you use them directly, but they may be helpful in other ways!

Api-gateway

Personally, I like your work but used your code as API-gateway (direct access to the functions). Please change access from private to public. It's my humble request Thankyou

Optimise for low memory?

HI, I've built this on a low memory embedded system and it runs out of memory when rendering. I noticed in your example code that it renders a 1920x1080 image, is this default? How can I specify image size or optimise for low memory system?

Thanks.

Missing residues

Some residues at the beginning and at the end of the chains are missing in the mesh.

If you compare a cartoon mesh from pymol/VMD/avogadro... and the mesh created by ribbon.go, you can see that some parts are missing.

For example :

Beginning of the chain:
image

End of the chain
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.