Right after the 'import yasara' statement,
the following variables can be accessed. Note that [i] specifies the number of the selection window,
counting starts with zero at each chain of selection windows leading to a 'Request' keyword.
[j] specifies the number of the selected item, counting starts with zero in every selection window.
|
yasara.request
| The request string sent by YASARA to the plugin |
yasara.opsys
| The current operating system, "Linux", "MacOS" or
"Windows" |
yasara.version
| The YASARA version string X.Y.Z |
yasara.serialnumber
| YASARA's serial number |
yasara.stage
| The YASARA stage View, Model, Dynamics or Structure |
yasara.plugin.name
| The name of the plugin (e.g. ftppdb.py) |
yasara.plugin.config
| A Python dictionary with the options from the plugin config file
*.cnf |
yasara.plugin.exitcode
| The exit code returned to YASARA when the plugin ends |
yasara.owner.firstname
| Your first name |
yasara.owner.email
| Your e-mail address |
yasara.selection
| A list of selections with one entry for every selection menu you defined |
yasara.selection[i].objects
| The number of objects selected in the ith selection menu |
yasara.selection[i].object[j]
| The obj_descriptor (see below) for the jth selected object in the ith selection menu |
yasara.selection[i].molecules
| The number of molecules selected in the ith selection menu |
yasara.selection[i].molecule[j]
| The mol_descriptor (see below) for the jth selected molecule in the ith selection menu |
yasara.selection[i].residues
| The number of residues selected in the ith selection menu |
yasara.selection[i].residue[j]
| The res_descriptor (see below) for the jth selected residue in the ith selection menu |
yasara.selection[i].atoms
| The number of atoms selected in the ith selection menu |
yasara.selection[i].atom[j]
| The atom_descriptor (see below) for the jth selected atom in the ith selection menu |
yasara.selection[i].texts
| The number of text input boxes in the ith selection menu |
yasara.selection[i].text[j]
| The text typed into the jth text input box in the ith selection menu |
yasara.selection[i].numbers
| The number of number input boxes in the ith selection menu |
yasara.selection[i].number[j]
| The number typed into the jth number input box in the ith selection menu |
yasara.selection[i].checkboxes
| The number of checkboxes in the ith selection menu |
yasara.selection[i].checkbox[j]
| The state of the jth checkbox in the ith selection menu (1=hooked,
0=not hooked) |
yasara.selection[i].switchbox
| The number of the hooked switchbox in the ith selection menu,
None if there was no switchbox |
yasara.selection[i].listentries
| The number of selected list entries in the ith selection menu |
yasara.selection[i].listentry[j]
| The jth selected list entry in the ith selection menu |
yasara.selection[i].filenames
| The number of selected filenames in the ith selection menu |
yasara.selection[i].filename[j]
| The jth selected filename in the ith selection menu |
|
 | Object descriptors are instances of the class obj_descriptor. Typically,
you loop over all object descriptors in the ith selection menu:
for j in range(yasara.selection[i].objects):
object=yasara.selection[i].object[j]
And then access various object properties: |
object.name
| The name of the object |
object.number.inyas
| The unique number/ID of the object in YASARA (a string, starting with
1) |
object.number.inall
| The sequential number of the object in the soup (a string, starting with
1) | |
You could then color the object red:
yasara.ColorObj(object.number.inyas+",Red")
Molecule descriptors are instances of the class mol_descriptor. Typically,
you loop over all molecule descriptors in the ith selection menu:
for j in range(yasara.selection[i].molecules):
molecule=yasara.selection[i].molecule[j]
And then access various molecule properties: |
molecule.name
| The name of the molecule (that's the chain name in the PDB file) |
molecule.number.inyas
| The unique number/ID of the molecule in YASARA (a string) |
molecule.number.inall
| The sequential number of the molecule in the soup (a string,
starting with 1) |
molecule.number.inobj
| The sequential number of the molecule in the object (a string,
starting with 1) |
molecule.object
| The object descriptor
for the object the molecule belongs to | |
You could then display the molecule as sticks:
yasara.StickMol(molecule.number.inyas)
Or delete the entire object containing this molecule:
yasara.DelObj(molecule.object.number.inyas)
Residue descriptors are instances of the class res_descriptor. Typically,
you loop over all residue descriptors in the ith selection menu:
for j in range(yasara.selection[i].residues):
residue=yasara.selection[i].residue[j]
And then access various residue properties: |
residue.name3
| The name of the residue in three letter code. |
residue.name1
| The name of the residue in one letter code. |
residue.number.inyas
| The unique number/ID of the residue in YASARA (a string). |
residue.number.inall
| The sequential number of the residue in the soup (a string, starting with
1). |
residue.number.inobj
| The sequential number of the residue in the object (a string,
starting with 1). |
residue.number.inmol
| The sequential number of the residue in the molecule (a string,
starting with 1). |
residue.number.inpdb
| The number of the residue in the PDB file (a string, last character may be the insertion code). |
residue.object
| The object descriptor
for the object the residue belongs to. |
residue.molecule
| The molecule descriptor
for the molecule the residue belongs to. | |
You could then color the residue yellow:
yasara.ColorRes(residue.number.inyas+",Yellow")
Or display a ribbon for the entire molecule containing this residue:
yasara.ShowSecMol(residue.molecule.number.inyas,"Ribbon")
If you wonder why a '+' is used to combine the arguments in the first case,
while a comma ',' is used in the second case, look here
.
Atom descriptors are instances of the class atom_descriptor. Typically,
you loop over all atom descriptors in the ith selection menu:
for j in range(yasara.selection[i].atoms):
atom=yasara.selection[i].atom[j]
And then access various atom properties: |
atom.name
| The name of the atom |
atom.namespaced
| The name of the atom including spaces (always four characters) |
atom.altloc
| The alternate location indicator of the atom |
atom.position
| The position of the atom, a list with three cartesian coordinates |
atom.occupancy
| The occupancy field of the atom in the original PDB file |
atom.bfactor
| The B-factor of the atom |
atom.number.inyas
| The unique number/ID of the atom in YASARA (a string). |
atom.number.inall
| The sequential number of the atom in the soup (a string, starting with
1, the same as .inyas). |
atom.number.inobj
| The sequential number of the atom in the object (a string, starting with
1, usually the same number as in the PDB file). |
atom.number.inmol
| The sequential number of the atom in the molecule (a string,
starting with 1). |
atom.number.inres
| The sequential number of the atom in the residue (a string, starting with
1). |
atom.object
| The object descriptor
for the object the atom belongs to. |
atom.molecule
| The molecule descriptor
for the molecule the atom belongs to. |
atom.residue
| The residue descriptor
for the residue the atom belongs to. | |
You could then color the atom green:
yasara.ColorAtom(atom.number.inyas+",Green")
Or delete the entire residue the atom belongs to:
yasara.DelRes(atom.residue.number.inyas)
|