entities.Trajectory

entities.Trajectory(self, universe, world_scale=0.01)

Attributes

Name Description
uframe Get the current frame number of the linked Universe.trajectory.

Methods

Name Description
add_selection Adds a new selection with the given name, selection string and selection parameters.
add_selection_from_atomgroup Create a Selection object from an AtomGroup
adjust_periodic_positions Returns the input pos2 with a periodic correction potentially applied
position_cache_mean Return the mean position from the currently cached positions
remove_selection Removes the selection with the given name
reset_playback Set the playback settings to their default values
set_frame Update the positions, selections and calculations for this trajectory, based on
update_position_cache Update the currently cached positions, based on the new frame

add_selection

entities.Trajectory.add_selection(
    name,
    selection_str,
    updating=True,
    periodic=True,
)

Adds a new selection with the given name, selection string and selection parameters.

add_selection_from_atomgroup

entities.Trajectory.add_selection_from_atomgroup(atomgroup, name='NewSelection')

Create a Selection object from an AtomGroup

adjust_periodic_positions

entities.Trajectory.adjust_periodic_positions(pos1, pos2)

Returns the input pos2 with a periodic correction potentially applied

position_cache_mean

entities.Trajectory.position_cache_mean(frame)

Return the mean position from the currently cached positions

remove_selection

entities.Trajectory.remove_selection(name)

Removes the selection with the given name

reset_playback

entities.Trajectory.reset_playback()

Set the playback settings to their default values

set_frame

entities.Trajectory.set_frame(frame)

Update the positions, selections and calculations for this trajectory, based on frame number of the current scene, not the frame number of the Universe

update_position_cache

entities.Trajectory.update_position_cache(frame, cache_ahead=True)

Update the currently cached positions, based on the new frame