pub struct StructureEditor { /* private fields */ }Expand description
A private copy-on-write snapshot that becomes visible only on commit.
Implementations§
Source§impl StructureEditor
impl StructureEditor
Sourcepub fn set_annotation(
&mut self,
name: &str,
column: AtomAnnotation,
) -> Result<(), Diagnostic>
pub fn set_annotation( &mut self, name: &str, column: AtomAnnotation, ) -> Result<(), Diagnostic>
Adds or replaces a typed per-atom annotation column.
§Errors
Returns a diagnostic when the name is empty or the column length differs from the structure’s atom count.
Sourcepub fn remove_annotation(&mut self, name: &str) -> bool
pub fn remove_annotation(&mut self, name: &str) -> bool
Removes a custom annotation, returning whether it existed.
Sourcepub fn clear_extensions(&mut self)
pub fn clear_extensions(&mut self)
Explicitly discards domain extensions before a topology-changing edit.
Sourcepub fn rename_chain(
&mut self,
chain: ChainIndex,
label: &str,
) -> Result<(), Diagnostic>
pub fn rename_chain( &mut self, chain: ChainIndex, label: &str, ) -> Result<(), Diagnostic>
Renames a chain in both identifier namespaces.
§Errors
Returns a diagnostic when the chain does not exist, the new label is empty, or the bounded identifier dictionary cannot accept it.
Sourcepub fn transform<F>(
&mut self,
selection: &AtomSelection,
transform: F,
) -> Result<(), Diagnostic>
pub fn transform<F>( &mut self, selection: &AtomSelection, transform: F, ) -> Result<(), Diagnostic>
Applies one coordinate transform to selected atoms in every dense frame.
§Errors
Returns a diagnostic for an out-of-range atom, a non-finite result, or a ragged ensemble whose models must be edited as independent snapshots.
Sourcepub fn delete_atoms(
&mut self,
selection: &AtomSelection,
) -> Result<(), Diagnostic>
pub fn delete_atoms( &mut self, selection: &AtomSelection, ) -> Result<(), Diagnostic>
Deletes selected atom rows and remaps residues, coordinates and bonds.
§Errors
Returns a diagnostic for an out-of-range atom or a ragged ensemble.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StructureEditor
impl RefUnwindSafe for StructureEditor
impl Send for StructureEditor
impl Sync for StructureEditor
impl Unpin for StructureEditor
impl UnsafeUnpin for StructureEditor
impl UnwindSafe for StructureEditor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more