symexp module¶
Expansion of molecular & crystal symmetry.
- usage: - SymExp [options] [input-pdb-file]
symexp.py [options] [input-pdb-file]
- For help in stand-alone usage:
Command-line options:
symmetry.py -h
Commands: at the
(Cmd)
prompt:help
orhelp <command>
This is a front-end for module symmetry.py that is called by several packages.
Module author: Michael S. Chapman <chapmanms@missouri.edu>
- Authors:
Michael S. Chapman <chapmanms@missouri.edu>
Oregon Health & Science University & University of Missouri
Changed in version 0.1.1: 09/09/11 refactoring into python, support of rsref / use of modules
Changed in version 0.4.1: 07/01/13 Space group / lattice symmetry
Changed in version 0.5.0: 03/12/15 Restructured text documentation
Changed in version 0.5.5: 10/20/15 Riding anisotropic Us
Changed in version 1.0.0: 11/06/20 Python 2.7 –> 3.6
- class symexp.Tasks¶
Bases:
object
Program-specific tasks, supporting just-in-time execution.
Methods with names ending _prereq define tasks whose prerequisites will be met, if possible, prior to execution.
- read_coords(new_file=None)¶
Read coordinates without recalculating statistics
- Parameters:
new_file (string) – PDB file to be read.
- read_coords_prereq(*args, **kwargs)¶
Pass-through, trying to meet the prerequisites.
- symmetry_expand(target_atoms=None, center=None, distance=None)¶
Identify self.atom neighbors of target (or self.atoms) + symm equivs.
Pass through for Symmetry.neighbors.
- Parameters:
center ([float, float, float]) – atoms w/in distance of this point instead of other atoms.
distance (float) – within which considered close (Å).
- symmetry_expand_prereq(*args, **kwargs)¶
Pass-through, trying to meet the prerequisites.
- symmetry_init(distance=None)¶
Initialize symmetry calculation & identify neighbors.
- Parameters:
distance (float) – neighbor cut-off; default (None) is 3.5 Å, different from RSRef.
- symmetry_init_prereq(*args, **kwargs)¶
Pass-through, trying to meet the prerequisites.
- write_coords(new_file=None, header=None, neighbors_only=False, anisotropic=False)¶
- Parameters:
new_file (str) – PDB file to be written.
header (str) – to be inserted at top of PDB file.
boolneighbors_only – output atoms that are close, but not selected evaluation (non-standard), noting “close” can contain “evaluation” atoms after residue or chain completion.
anisotropic (bool) – Write riding anisotropic Us.
- write_coords_prereq(*args, **kwargs)¶
Pass-through, trying to meet the prerequisites.
- class symexp.TopCommands(tasks, initial_commands=None, py_locals={}, parser=None)¶
Bases:
TopCmd
,ProgCmd
Top-level commands for Program Prog.
- Parameters:
tasks (
Control
) – class instance that defines methods to be called.initial_commands (str or list of str) – file(s) of commands to run before interactive loop at the top level, and before any command-line commands.
py_locals (dict) – objects added to the local namespace in the python interpreter invoked by ‘py’ commands.
parser (
ArgumentParser
(argparse) orOptionParser
(optparse)) – to which -t / –test option will be added for cmd2 regression testing. Should only be used once / program.
- do_neighbors(args)¶
Identify neighbors within distance of (selected) atoms.
- do_pdbout(args)¶
Write coordinates (symmetry expansion as per command-line arguments).
- do_sphere(args)¶
Find atoms & symmetry equivalents near given point.
- do_test(rest)¶
Run a program developer’s test.
- help_test()¶
- neighbors_parser = ArgumentParser(prog='sphinx-build', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)¶
- pdbout_parser = ArgumentParser(prog='sphinx-build', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)¶
- sphere_parser = ArgumentParser(prog='sphinx-build', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)¶
- symexp.startup()¶
Program initialization, reading options etc..
- Returns:
parser
- Return type:
Arguments.ArgumentParser