https://pymolwiki.org/index.php?title=Discrete_objects&feed=atom&action=historyDiscrete objects - Revision history2022-05-21T03:28:36ZRevision history for this page on the wikiMediaWiki 1.31.14https://pymolwiki.org/index.php?title=Discrete_objects&diff=12716&oldid=prevSpeleo3: created2018-01-03T13:58:20Z<p>created</p>
<p><b>New page</b></p><div>A [[discrete objects|discrete object]] is a molecular object where every state has its own atom instances.<br />
<br />
== Details ==<br />
<br />
Properties of discrete objects include:<br />
<br />
* states can be colored independently<br />
* states can be selected independently<br />
* bonds can be created/deleted per state (see [[bond]], [[unbond]])<br />
<br />
In regular objects, PyMOL stores most atom data (like identifiers, properties, color, visibility of representation, etc.) in an atom table which is shared across all states. Coordinates are stored in separate tables per state. In a discrete object, atom data is not shared, every atom exists in only one state. If the same atom (same identifiers) exists in a another state, it's actually a full copy which can also be selected or colored independently from the other states.<br />
<br />
== Creating a discrete object ==<br />
<br />
Commands line [[load]], [[fetch]] and [[create]] have a '''discrete=-1/0/1''' argument.<br />
<br />
load 1nmr.pdb, discrete=1<br />
<br />
fetch 1nmr, discrete=1<br />
<br />
fragment ala<br />
fragment his<br />
create discreteobj, ala, 1, 1, discrete=1<br />
create discreteobj, his, 1, 2, discrete=1<br />
<br />
File formats like '''.sdf''' and '''.mol2''' are [[load|loaded]] as discrete objects by default, because they typically contain a library of different molecules rather than an ensemble of different conformations. To load them as regular objects, use '''discrete=0'''.<br />
<br />
== Examples ==<br />
<br />
Load a 20-state NMR model, once regular, once discrete:<br />
<br />
<syntaxhighlight lang="python"><br />
fetch 1nmr, 1nmr_regular, async=0<br />
fetch 1nmr, 1nmr_discrete, async=0, discrete=1<br />
<br />
count_atoms 1nmr_regular<br />
# -> 1290 atoms, every atom counts only once (state count doesn't matter)<br />
<br />
count_atoms 1nmr_discrete & state 1<br />
# -> 1290 atoms, same number of atoms in first state of discrete object<br />
<br />
count_atoms 1nmr_discrete<br />
# -> 25800 atoms (= 1290 * 20), discrete object has 20 copies of each atom<br />
</syntaxhighlight><br />
<br />
== See Also ==<br />
<br />
* [[load]]<br />
* [[create]]</div>Speleo3