Convert ball-stick model to STL from the command line
I would suggest using OpenSCAD for this. OpenSCAD does not natively support reading data files that aren't 3D/2D models or images, but you can write a simple program to generate OpenSCAD code.

I would suggest first writing an OpenSCAD file that implements your chosen type of "ball" and "stick", perhaps like:

module ball(x, y, z) {
    translate([x, y, z]) 
        sphere(d=10, $fn=60);
}
module stick(x, y, z, length, rx, ry, rz) {
    translate([x, y, z]) 
    rotate([rx, ry, rz]) 
        cylinder(d=5, length=length, $fn=60, center=true);
}


Then, take your data file — let's suppose it's a CSV —

ball,0,0,0
ball,100,0,0
stick,50,0,0,100,0,90,0


and convert it into OpenSCAD by adding the appropriate syntax (this could even be done using a basic find-and-replace tool):

import &lt;ball-and-stick-definitions.scad&gt;
ball(0,0,0);
ball(100,0,0);
stick(50,0,0,100,0,90,0);


Then, producing the STL is just a matter of running the openscad command on your generated OpenSCAD source code.

If your stick parameters are not Euler angles but "start point" and "end point" you'll have to add the "rotate to point at…" math yourself, but that is within OpenSCAD's capabilities as it has vector math operations and multmatrix, or trigonometry if you prefer to generate Euler angles; you don't need to do that math at the file-conversion stage.