VMDAtomsAdapterMixin

class sknano.core.atoms.mixins.VMDAtomsAdapterMixin[source] [edit on github][source]

Bases: object

An Atoms mixin adapter class with atom attributes consistent with VMD atom attributes.

Notes

The VMD indices are only consistent with VMD when the number of atoms equals the maximum id.

Attributes

vmd_indices Array of VMD atom index attribute.

Methods

filter_vmd_indices(vmd_indices[, invert]) Filter Atoms by VMDAtomsAdapterMixin.vmd_indices.
filtered_vmd_indices(vmd_indices[, invert]) Return new Atoms filtered by vmd_indices.
get_atom_from_vmd_index(vmd_index) Get Atom by VMD atom index.
get_vmd_selection_string(keyword) Get a VMD selection string for the VMD keyword.

Attributes Summary

vmd_indices Array of VMD atom index attribute.

Methods Summary

filter_vmd_indices(vmd_indices[, invert]) Filter Atoms by VMDAtomsAdapterMixin.vmd_indices.
filtered_vmd_indices(vmd_indices[, invert]) Return new Atoms filtered by vmd_indices.
get_atom_from_vmd_index(vmd_index) Get Atom by VMD atom index.
get_vmd_selection_string(keyword) Get a VMD selection string for the VMD keyword.

Attributes Documentation

vmd_indices

Array of VMD atom index attribute.

Methods Documentation

filter_vmd_indices(vmd_indices, invert=False)[source] [edit on github][source]

Filter Atoms by VMDAtomsAdapterMixin.vmd_indices.

Parameters:
  • vmd_indices (array_like) –
  • invert (bool, optional) –
filtered_vmd_indices(vmd_indices, invert=False)[source] [edit on github][source]

Return new Atoms filtered by vmd_indices.

Parameters:
  • vmd_indices (array_like) –
  • invert (bool, optional) –
Returns:

filtered_atoms – An instance of Atoms (sub)class.

Return type:

Atoms

get_atom_from_vmd_index(vmd_index)[source] [edit on github][source]

Get Atom by VMD atom index.

Parameters:vmd_index (int) –
Returns:
Return type:Atom or None
get_vmd_selection_string(keyword)[source] [edit on github][source]

Get a VMD selection string for the VMD keyword.