Selection class

rmsd(selection1, frame1, selection2, frame2)

Computes RMSD of two selections of the same size for given frames

Returns:RMSD value
Return type:float
fit(selection1, selection2)

Fits selection1 to selection2

fit_transform(selection1, selection2)

Computes fit transform for fitting selection1 to selection2

Returns:fit transform matrix
Return type:4x4 matrix
non_bond_energy(selection1, selection2[, cutoff=0.25[, fr=-1[, periodic=True]]])

Computes non-bond interaction energy between two selections within given cut-off distance. If fr is not specified the current frame of selection1 is used.

class Selection
__init__(system, sel_str)

Create selection from selection string


Create empty selection bound to system


Create selection from other selection

__init__(system, ind1, ind2)

Create selection from the range of absolute indexes

__init__(system, seq)

Create selection from the sequence of indexes

Parameters:seq (sequence) – list or tuple of indexes

Returns selection size


Appends another selection to this one.


Appends absolute index to selection.

Parameters:ind (int) – index to append

Removes all atoms of sel from current selection

Parameters:sel (Selection) – selection to remove

Removes absolute index from selection.

Parameters:ind (int) – index to remove

Sets new system for selection.


This clears selection index and leaves it empty!

Previous topic

System class

This Page