Skip to content

Using LOOS AtomicGroups with numpy arrays. #53

Answered by lgsmith
acnash asked this question in Users
Discussion options

You must be logged in to vote

For what it's worth, numpy arrays are designed to hold continuous memory objects where each object is the same size. For example, an array of double precision floats (which is what most python implementations use for the type 'float'). Atomic groups are a more complicated, variable size object. In python, each AG is itself a list of Atoms, which may have potentially different lengths. So I don't think it would be possible to put AGs into a numpy array, and to be honest I'd wonder whether that's really what you'd want, since I have a feeling it'd imply allocating blocks of memory that were sized to the largest group and having lots of wasted space.

I'm a late-commer to the other conversati…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by agrossfield
Comment options

You must be logged in to vote
1 reply
@acnash
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants