Author: bugman
Date: Fri Sep 12 10:58:26 2014
New Revision: 25772
URL: http://svn.gna.org/viewcvs/relax?rev=25772&view=rev
Log:
Introduction of the model argument to the structure.delete user function.
This argument is passed all the way into the internal structural object, but is
not used yet.
Modified:
trunk/lib/structure/internal/object.py
trunk/pipe_control/structure/main.py
trunk/user_functions/structure.py
Modified: trunk/lib/structure/internal/object.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=25772&r1=25771&r2=25772&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py (original)
+++ trunk/lib/structure/internal/object.py Fri Sep 12 10:58:26 2014
@@ -1509,9 +1509,11 @@
mol.atom_connect(index1=index1, index2=index2)
- def delete(self, atom_id=None, verbosity=1):
+ def delete(self, model=None, atom_id=None, verbosity=1):
"""Deletion of structural information.
+ @keyword model: Individual structural models from a loaded
ensemble can be deleted by specifying the model number.
+ @type model: None or int
@keyword atom_id: The molecule, residue, and atom identifier string.
This matches the spin ID string format. If not given, then all structural
data will be deleted.
@type atom_id: str or None
@keyword verbosity: The amount of information to print to screen.
Zero corresponds to minimal output while higher values increase the amount of
output. The default value is 1.
Modified: trunk/pipe_control/structure/main.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=25772&r1=25771&r2=25772&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py (original)
+++ trunk/pipe_control/structure/main.py Fri Sep 12 10:58:26 2014
@@ -247,11 +247,13 @@
status.observers.result_file.notify()
-def delete(atom_id=None, verbosity=1, spin_info=True):
+def delete(atom_id=None, model=None, verbosity=1, spin_info=True):
"""Delete structural data.
@keyword atom_id: The molecule, residue, and atom identifier string.
This matches the spin ID string format. If not given, then all structural data
will be deleted.
@type atom_id: str or None
+ @keyword model: Individual structural models from a loaded ensemble
can be deleted by specifying the model number.
+ @type model: None or int
@keyword verbosity: The amount of information to print to screen. Zero
corresponds to minimal output while higher values increase the amount of
output. The default value is 1.
@type verbosity: int
@keyword spin_info: A flag which if True will cause all structural
information in the spin containers and interatomic data containers to be
deleted as well. If False, then only the 3D structural data will be deleted.
@@ -265,7 +267,7 @@
if hasattr(cdp, 'structure'):
if verbosity:
print("Deleting structural data from the current pipe.")
- cdp.structure.delete(atom_id=atom_id, verbosity=verbosity)
+ cdp.structure.delete(model=model, atom_id=atom_id, verbosity=verbosity)
elif verbosity:
print("No structures are present.")
Modified: trunk/user_functions/structure.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/user_functions/structure.py?rev=25772&r1=25771&r2=25772&view=diff
==============================================================================
--- trunk/user_functions/structure.py (original)
+++ trunk/user_functions/structure.py Fri Sep 12 10:58:26 2014
@@ -455,6 +455,13 @@
can_be_none = True
)
uf.add_keyarg(
+ name = "model",
+ py_type = "int",
+ desc_short = "structural model",
+ desc = "Individual structural models from a loaded ensemble can be deleted
by specifying the model number.",
+ can_be_none = True
+)
+uf.add_keyarg(
name = "verbosity",
default = 1,
py_type = "int",
@@ -470,7 +477,7 @@
)
# Description.
uf.desc.append(Desc_container())
-uf.desc[-1].add_paragraph("This will delete structural information from the
current data pipe. All spin and sequence information loaded from these
structures will be preserved - this only affects the structural data. The atom
ID argument can be used to restrict deletion to parts of the loaded molecules.")
+uf.desc[-1].add_paragraph("This will delete structural information from the
current data pipe. All spin and sequence information loaded from these
structures will be preserved - this only affects the structural data. The atom
ID argument can be used to restrict deletion to parts of the loaded molecules,
or the model argument can be used to delete individual structural models from
an ensemble.")
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
uf.desc[-1].add_paragraph("To delete everything, simply type:")
@@ -481,7 +488,7 @@
uf.backend = pipe_control.structure.main.delete
uf.menu_text = "&delete"
uf.gui_icon = "oxygen.actions.list-remove"
-uf.wizard_size = (700, 500)
+uf.wizard_size = (800, 550)
uf.wizard_apply_button = False
uf.wizard_image = WIZARD_IMAGE_PATH + 'structure' + sep + '2JK4.png'
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits