You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grossfield Lab edited this page Dec 20, 2019
·
5 revisions
Many scientific programming tools, including scikitlearn and scipy, use NumPy arrays as their fundamental data types. For this reason, pyLOOS provides simple functions to get coordinates in and out of NumPy objects:
Of course, you would actually do this using native LOOS:
molecule.translate(loos.GCoord(1., 0., 0.))
However, the intervening code could do something far more interesting (PCA, t-SNE, clustering, whatever). The point is just that you can get to and from Numpy easily.
When called from the C++ layer, getCoords() and setCoords() return pointers to allocated memory for floats, which are similarly useful for interoperating with external libraries.