Skip to content

Commit

Permalink
Migrating structure download toward rcsb pdb .pdb files
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGuillaume committed Jul 5, 2024
1 parent 0de3652 commit c172af1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/define.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace VTX
const std::string VTX_RELEASES_CLICKABLE_URL = "<a href=\"" + VTX_RELEASES_URL + "\">" + VTX_RELEASES_URL + "</a>";

// API.
const std::string API_URL_MMTF = "https://mmtf.rcsb.org/v1.0/full/";
const std::string API_URL_MMTF = "https://files.rcsb.org/download/";

// Constants.
constexpr float FLOAT_MIN = std::numeric_limits<float>::lowest();
Expand Down
4 changes: 2 additions & 2 deletions src/network/request/download_mmtf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace VTX::Network::Request
{
DownloadMMTF::DownloadMMTF( const std::string & p_id ) :
NetworkRequest( std::string( API_URL_MMTF + p_id ) ), _id( p_id )
NetworkRequest( std::string( API_URL_MMTF + p_id + ".pdb" ) ), _id( p_id )
{
VTX_INFO( "Downloading " + p_id + "..." );
}
Expand All @@ -14,7 +14,7 @@ namespace VTX::Network::Request
{
VTX_INFO( "Downloaded" );
std::map<IO::FilePath, std::string *> mapBuffers = std::map<IO::FilePath, std::string *>();
mapBuffers.emplace( IO::FilePath( _id + ".mmtf" ), new std::string( p_reply->readAll().toStdString() ) );
mapBuffers.emplace( IO::FilePath( _id + ".pdb" ), new std::string( p_reply->readAll().toStdString() ) );

VTX_ACTION( new Action::Main::Open( mapBuffers ) );
}
Expand Down

0 comments on commit c172af1

Please sign in to comment.