diff --git a/src/biotite/structure/__init__.py b/src/biotite/structure/__init__.py index 3dd06a1dd..3c9f85d88 100644 --- a/src/biotite/structure/__init__.py +++ b/src/biotite/structure/__init__.py @@ -15,7 +15,7 @@ An `Atom` contains data for a single atom, it stores the annotations as scalar values and the coordinates as length 3 `ndarray`. An `AtomArray` stores data for an entire structure model containing *n* -atoms. Therefore the annotations are represented as `ndarray`s of +atoms. Therefore the annotations are represented as `ndarray` objects of length *n*, so called annotation arrays. The coordinates are a (n x 3) `ndarray`. `AtomArrayStack` stores data for *m* models. Each `AtomArray` in diff --git a/src/biotite/structure/atoms.py b/src/biotite/structure/atoms.py index 0f91a3e7c..3b0b7b1d8 100644 --- a/src/biotite/structure/atoms.py +++ b/src/biotite/structure/atoms.py @@ -333,8 +333,10 @@ def __dir__(self): attr = super().__dir__() attr.append("coord") attr.append("bonds") + attr.append("box") for name in self._annot.keys(): attr.append(name) + return attr def __eq__(self, item): """ @@ -819,7 +821,7 @@ def __init__(self, depth, length): if depth == None or length == None: self._coord = None else: - self._coord = np.zeros((depth, length, 3), dtype=float) + self._coord = np.full((depth, length, 3), np.nan, dtype=float) def get_array(self, index): """