Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed protein loader (HETATM) #112

Merged
merged 1 commit into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions brayns/io/ProteinLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct ProteinColorMap
short R,G,B;
};

const size_t colorMapSize = 119;
const size_t colorMapSize = 113;
static ProteinColorMap colorMap[colorMapSize] = {
{ "H", 0xDF,0xDF,0xDF} ,
{ "He",0xD9,0xFF,0xFF} ,
Expand Down Expand Up @@ -182,7 +182,13 @@ static ProteinColorMap colorMap[colorMapSize] = {
{ "Sg",0xD9,0x00,0x45} ,
{ "Bh",0xE0,0x00,0x38} ,
{ "Hs",0xE6,0x00,0x2E} ,
{ "Mt",0xEB,0x00,0x26}
{ "Mt",0xEB,0x00,0x26},

// TODO
{ "",0xFF,0xFF,0xFF},
{ "",0xFF,0xFF,0xFF},
{ "",0xFF,0xFF,0xFF},
{ "",0xFF,0xFF,0xFF}
};

static AtomicRadius atomic_radii[colorMapSize] = // atomic radii in microns
Expand Down Expand Up @@ -330,12 +336,13 @@ bool ProteinLoader::importPDBFile(
std::string line;
std::string value;
std::getline( file, line );
if( line.find( "ATOM" ) == 0 )
if( line.find( "ATOM" ) == 0 || line.find( "HETATM" ) == 0)
{
// Atom
Atom atom;
atom.chainId = 0;
atom.residue = 0;
atom.processed = false;
atom.index = index;
index++;
std::string atomName;
Expand Down
Binary file modified tests/testdataProtein.bin
Binary file not shown.
Binary file modified tests/testdataProteinStereo.bin
Binary file not shown.