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:

This program opens a text file named input.txt containing atoms coordinates and creates a file named output.txt that contains the coordinates of the barycenter of the atoms (or the string “No atoms” if the initial fileā€¦

More…