void ReferenceAtoms::printAtoms( OFile& ofile, const double& lunits ) const { plumed_assert( indices.size()==reference_atoms.size() && align.size()==reference_atoms.size() && displace.size()==reference_atoms.size() ); for(unsigned i=0;i<reference_atoms.size();++i){ ofile.printf("ATOM %4d X RES %4u %8.3f%8.3f%8.3f%6.2f%6.2f\n", indices[i].serial(), i, lunits*reference_atoms[i][0], lunits*reference_atoms[i][1], lunits*reference_atoms[i][2], align[i], displace[i] ); } }
void PointWiseMapping::print( const std::string& method, const double & time, OFile& afile, const std::string& fmt ){ std::string descr2, descr="DESCRIPTION: results from %s analysis performed at time " + fmt +"\n"; afile.printf(descr.c_str(), method.c_str(), time ); if(fmt.find("-")!=std::string::npos){ descr="REMARK WEIGHT=" + fmt + " %s=" + fmt + " "; descr2="%s=" + fmt; } else { // This ensures numbers are left justified (i.e. next to the equals sign std::size_t psign=fmt.find("%"); plumed_assert( psign!=std::string::npos ); descr="REMARK WEIGHT=%-" + fmt.substr(psign+1) + " %s=%-" + fmt.substr(psign+1) + " "; descr2="%s=%-" + fmt.substr(psign+1); } for(unsigned i=0;i<frames.size();++i){ afile.printf(descr.c_str(), frames[i]->getWeight(), property[0].c_str(), low_dim[i][0] ); for(unsigned j=1;j<property.size();++j) afile.printf(descr2.c_str(), property[j].c_str(), low_dim[i][j]); afile.printf("\n"); frames[i]->print( afile, fmt ); } }