Skip to content

Support reading molecule through MDAnalysis? #11

@xiki-tempula

Description

@xiki-tempula

Currently, the ASE is used for loading coordinate, box size and element information. I wonder if it is possible to load the data through MDAnalysis.Universe?
The coordinate, cell, atom type can be accessed via

>>> from MDAnalysis import Universe
>>> from MDAnalysis.tests.datafiles import CRD
>>> u = Universe(CRD)
>>> u.dimensions
array([0., 0., 0., 0., 0., 0.], dtype=float32)
>>> u.atoms.positions
array([[-11.921,  26.307,  10.41 ],
       [-11.447,  26.741,   9.595],
       [-12.44 ,  27.042,  10.926],
       ...,
       [-12.616,  28.099,  21.258],
       [-13.786,  28.568,  21.198],
       [-12.417,  26.877,  21.494]], dtype=float32)
>>> u.atoms.types
array(['N', 'H', 'H', ..., 'C', 'O', 'O'], dtype=object)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions