Author: bugman Date: Mon Feb 18 18:08:05 2013 New Revision: 18484 URL: http://svn.gna.org/viewcvs/relax?rev=18484&view=rev Log: Added the 'model_num' argument to the structure.add_model user function. Modified: trunk/generic_fns/structure/main.py trunk/user_functions/structure.py Modified: trunk/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/main.py?rev=18484&r1=18483&r2=18484&view=diff ============================================================================== --- trunk/generic_fns/structure/main.py (original) +++ trunk/generic_fns/structure/main.py Mon Feb 18 18:08:05 2013 @@ -79,7 +79,7 @@ cdp.structure.add_atom(mol_name=mol_name, atom_name=atom_name, res_name=res_name, res_num=res_num, pos=pos, element=element, atom_num=atom_num, chain_id=chain_id, segment_id=segment_id, pdb_record=pdb_record) -def add_model(): +def add_model(model_num=None): """Add a new model to the empty structural data object.""" # Test if the current data pipe exists. @@ -98,7 +98,8 @@ raise RelaxError("The internal structural object is not empty.") # Add a model. - cdp.structure.structural_data.add_item() + cdp.structure.structural_data.add_item(model_num=model_num) + print("Created the empty model number %s." % model_num) def connect_atom(index1=None, index2=None): Modified: trunk/user_functions/structure.py URL: http://svn.gna.org/viewcvs/relax/trunk/user_functions/structure.py?rev=18484&r1=18483&r2=18484&view=diff ============================================================================== --- trunk/user_functions/structure.py (original) +++ trunk/user_functions/structure.py Mon Feb 18 18:08:05 2013 @@ -131,6 +131,12 @@ uf = uf_info.add_uf('structure.add_model') uf.title = "Add a new model." uf.title_short = "Model creation." +uf.add_keyarg( + name = "model_num", + py_type = "int", + desc_short = "model number", + desc = "The number of the new model." +) # Description. uf.desc.append(Desc_container()) uf.desc[-1].add_paragraph("This allows new models to be added to the internal structural object. Note that no structural information is allowed to be present")