Skip to content
Snippets Groups Projects
Commit 56fc9552 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Using h36encode in another place

cc: @gtribello

This code is not going through regtests
https://www.plumed.org/coverage-master/coverage/tools/PDB.cpp.gcov.html
so I am a bit worried in editing it
parent 99833f76
No related branches found
No related tags found
No related merge requests found
......@@ -546,8 +546,12 @@ void PDB::print( const double& lunits, SetupMolInfo* mymoldat, OFile& ofile, con
}
} else {
for(unsigned i=0; i<positions.size(); ++i) {
ofile.printf("ATOM %5d %-4s %3s %4u %8.3f%8.3f%8.3f%6.2f%6.2f\n",
numbers[i].serial(), mymoldat->getAtomName(numbers[i]).c_str(),
std::array<char,6> at;
const char* msg = h36::hy36encode(5,numbers[i].serial(),&at[0]);
plumed_assert(msg==nullptr) << msg;
at[5]=0;
ofile.printf("ATOM %s %-4s %3s %4u %8.3f%8.3f%8.3f%6.2f%6.2f\n",
&at[0], mymoldat->getAtomName(numbers[i]).c_str(),
mymoldat->getResidueName(numbers[i]).c_str(), mymoldat->getResidueNumber(numbers[i]),
lunits*positions[i][0], lunits*positions[i][1], lunits*positions[i][2],
occupancy[i], beta[i] );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment