Integrating external programs

In this tutorial, we show how to call an external executable from SAMSON, in order to perform calculations based on selected atoms in the document. Setting up the external executable Implement the following program, and compile it to produce an executable called Barycenter: #include <sstream> #include <fstream> #include <string> #include <iostream>   int main() {   unsigned int numberOfAtoms;   // open the file   std::ifstream input("input.txt");   // read the number of atoms   std::string line; std::getline(input, line); std::stringstream…

More…