Update MTK documentation
[hoomd-blue.git] / python-module / hoomd_script / sorter.py
blob6e141e092e4b3f5f3b550251dfef61d2d28b1263
1 # -- start license --
2 # Highly Optimized Object-oriented Many-particle Dynamics -- Blue Edition
3 # (HOOMD-blue) Open Source Software License Copyright 2009-2014 The Regents of
4 # the University of Michigan All rights reserved.
6 # HOOMD-blue may contain modifications ("Contributions") provided, and to which
7 # copyright is held, by various Contributors who have granted The Regents of the
8 # University of Michigan the right to modify and/or distribute such Contributions.
10 # You may redistribute, use, and create derivate works of HOOMD-blue, in source
11 # and binary forms, provided you abide by the following conditions:
13 # * Redistributions of source code must retain the above copyright notice, this
14 # list of conditions, and the following disclaimer both in the code and
15 # prominently in any materials provided with the distribution.
17 # * Redistributions in binary form must reproduce the above copyright notice, this
18 # list of conditions, and the following disclaimer in the documentation and/or
19 # other materials provided with the distribution.
21 # * All publications and presentations based on HOOMD-blue, including any reports
22 # or published results obtained, in whole or in part, with HOOMD-blue, will
23 # acknowledge its use according to the terms posted at the time of submission on:
24 # http://codeblue.umich.edu/hoomd-blue/citations.html
26 # * Any electronic documents citing HOOMD-Blue will link to the HOOMD-Blue website:
27 # http://codeblue.umich.edu/hoomd-blue/
29 # * Apart from the above required attributions, neither the name of the copyright
30 # holder nor the names of HOOMD-blue's contributors may be used to endorse or
31 # promote products derived from this software without specific prior written
32 # permission.
34 # Disclaimer
36 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' AND
37 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR ANY
39 # WARRANTIES THAT THIS SOFTWARE IS FREE OF INFRINGEMENT ARE DISCLAIMED.
41 # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
42 # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
43 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
45 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
46 # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
47 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 # -- end license --
50 # Maintainer: joaander
52 from hoomd_script import globals;
53 from hoomd_script import util;
55 ## \package hoomd_script.sorter
56 # \brief Wrapper for "global" sorter commands
58 # This package is a thin wrapper around globals.sorter. It takes the place of the old model for making the
59 # global sorter available as "sorter" in the __main__ namespace. Moving it into the hoomd_script namespace
60 # is backwards compatible as long as the user does "from hoomd_script import *" - but it also makes it much easier
61 # to reference the sorter from modules other than __main__.
63 # Backwards compatibility is only ensured if the script only uses the public python facing API. Bypassing this to get
64 # at the C++ interface should be done through globals.sorter
67 ## \internal
68 # \brief Thin wrapper for set_params
69 def set_params(*args, **kwargs):
70 util.print_status_line();
71 util._disable_status_lines = True;
72 globals.sorter.set_params(*args, **kwargs);
73 util._disable_status_lines = False;
75 ## \internal
76 # \brief Thin wrapper for disable
77 def disable(*args, **kwargs):
78 util.print_status_line();
79 util._disable_status_lines = True;
80 globals.sorter.disable(*args, **kwargs);
81 util._disable_status_lines = False;
83 ## \internal
84 # \brief Thin wrapper for enable
85 def enable(*args, **kwargs):
86 util.print_status_line();
87 util._disable_status_lines = True;
88 globals.sorter.enable(*args, **kwargs);
89 util._disable_status_lines = False;
91 ## \internal
92 # \brief Thin wrapper for set_period
93 def set_period(*args, **kwargs):
94 util.print_status_line();
95 util._disable_status_lines = True;
96 globals.sorter.set_period(*args, **kwargs);
97 util._disable_status_lines = False;