Skip to content

Commit

Permalink
various changes to get rid of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kain88-de committed Apr 16, 2017
1 parent 45eca15 commit be5e87b
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 20 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ matrix:
env: NAME="Doc"
MAIN_CMD="cd package && python setup.py build_sphinx"
BUILD_DOCS=true
SPHINX_VERSION=1.5.1
BUILD_CMD="cd ${TRAVIS_BUILD_DIR}/package && python setup.py build_ext --inplace"
CONDA_DEPENDENCIES=${CONDA_ALL_DEPENDENCIES}

Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/hbonds/hbond_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def __init__(self, universe, selection1='protein', selection2='all', selection1_
Parameters
----------
universe : universe
universe : Universe
Universe object
selection1 : str (optional)
Selection string for first selection ['protein']
Expand Down
28 changes: 15 additions & 13 deletions package/MDAnalysis/core/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class TransTable(object):
Attributes
----------
n_atoms, n_residues, n_segments : int
:ivar:`n_atoms`, n_residues, n_segments : int
number of atoms, residues, segments in topology
size
tuple describing the shape of the TransTable
Expand Down Expand Up @@ -428,24 +428,26 @@ class Topology(object):
to residues, residues to segments, and vice-versa, are handled internally
by this object.
Parameters
----------
n_atoms, n_residues, n_segments : int
number of atoms, residues, segments in topology; there must be at least
1 element of each level in the system
attrs : TopologyAttr objects
components of the topology to be included
atom_resindex : array
1-D array giving the resindex of each atom in the system
residue_segindex : array
1-D array giving the segindex of each residue in the system
"""

def __init__(self, n_atoms=1, n_res=1, n_seg=1,
attrs=None,
atom_resindex=None,
residue_segindex=None):
"""
Parameters
----------
n_atoms, n_residues, n_segments : int
number of atoms, residues, segments in topology; there must be at least
1 element of each level in the system
attrs : TopologyAttr objects
components of the topology to be included
atom_resindex : array
1-D array giving the resindex of each atom in the system
residue_segindex : array
1-D array giving the segindex of each residue in the system
"""
self.tt = TransTable(n_atoms, n_res, n_seg,
atom_resindex=atom_resindex,
residue_segindex=residue_segindex)
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/core/universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Universe(object):
Parameters
----------
topology : filename, Topology object or stream
topology : str, Topology object or stream
A CHARMM/XPLOR PSF topology file, PDB file or Gromacs GRO file; used to
define the list of atoms. If the file includes bond information,
partial charges, atom masses, ... then these data will be available to
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/lib/NeighborSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def search(self, atoms, radius, level='A'):
Parameters
----------
atoms : AtomGroup or Atom
atoms : AtomGroup or :class:`Atom`
list of atoms
radius : float
Radius for search in Angstrom.
Expand Down
4 changes: 2 additions & 2 deletions package/MDAnalysis/lib/formats/libmdaxdr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ cdef class TRRFile(_XDRFile):
Parameters
----------
xyz : ndarray, shape=(n_atoms, 3)
xyz : ndarray, shape=(natoms, 3)
cartesion coordinates
box : ndarray, shape=(3, 3)
Box vectors for this frame
Expand Down Expand Up @@ -685,7 +685,7 @@ cdef class XTCFile(_XDRFile):
Parameters
----------
xyz : ndarray, shape=(n_atoms, 3)
xyz : ndarray, shape=(number, 3)
cartesion coordinates
box : ndarray, shape=(3, 3)
Box vectors for this frame
Expand Down
4 changes: 3 additions & 1 deletion package/MDAnalysis/topology/guessers.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def guess_bonds(atoms, coords, **kwargs):
atoms with altloc A and B maybe very close together and there should be
no chemical bond between them. [0.1]
box : dimensions, optional
box : array_like, optional
Bonds are found using a distance search, if unit cell information is
given, periodic boundary conditions will be considered in the distance
search. [``None``]
Expand Down Expand Up @@ -204,6 +204,8 @@ def guess_bonds(atoms, coords, **kwargs):
lower_bound = kwargs.get('lower_bound', 0.1)

box = kwargs.get('box', None)
if box:
box = np.asarray(box)

# to speed up checking, calculate what the largest possible bond
# atom that would warrant attention.
Expand Down
2 changes: 1 addition & 1 deletion package/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## depend on whether the current version is a release or not.
## Uncomment the following two lines to get the _release_ behavior.
#use_cython=False
#keep_cythonized=True
keep_cythonized=True
[wheel]
universal = 1

Expand Down

0 comments on commit be5e87b

Please sign in to comment.