pub struct AtomView<'a, T: ModelInfo> { /* private fields */ }

Implementations§

Examples found in repository?
src/atom/mod.rs (line 66)
62
63
64
65
66
67
68
69
70
71
    fn from(src: AtomView<'a, T>) -> Self {
        Self {
            element_symbol: src.element_symbol().into(),
            atomic_number: *src.atomic_number(),
            xyz: src.xyz().to_owned(),
            fractional_xyz: src.fractional_xyz().copied(),
            atom_id: *src.atom_id(),
            format_type: T::default(),
        }
    }
More examples
Hide additional examples
src/model_type/msi.rs (line 184)
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            r#"  ({item_id} Atom
    (A C ACL "{elm_id} {elm}")
    (A C Label "{elm}")
    (A D XYZ ({x:.12} {y:.12} {z:.12}))
    (A I Id {atom_id})
  )
"#,
            item_id = self.atom_id() + 1,
            elm_id = self.atomic_number(),
            elm = self.element_symbol(),
            x = self.xyz().x,
            y = self.xyz().y,
            z = self.xyz().z,
            atom_id = self.atom_id(),
        )
    }
Examples found in repository?
src/atom/mod.rs (line 64)
62
63
64
65
66
67
68
69
70
71
    fn from(src: AtomView<'a, T>) -> Self {
        Self {
            element_symbol: src.element_symbol().into(),
            atomic_number: *src.atomic_number(),
            xyz: src.xyz().to_owned(),
            fractional_xyz: src.fractional_xyz().copied(),
            atom_id: *src.atom_id(),
            format_type: T::default(),
        }
    }
More examples
Hide additional examples
src/model_type/msi.rs (line 183)
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            r#"  ({item_id} Atom
    (A C ACL "{elm_id} {elm}")
    (A C Label "{elm}")
    (A D XYZ ({x:.12} {y:.12} {z:.12}))
    (A I Id {atom_id})
  )
"#,
            item_id = self.atom_id() + 1,
            elm_id = self.atomic_number(),
            elm = self.element_symbol(),
            x = self.xyz().x,
            y = self.xyz().y,
            z = self.xyz().z,
            atom_id = self.atom_id(),
        )
    }
Examples found in repository?
src/atom/mod.rs (line 65)
62
63
64
65
66
67
68
69
70
71
    fn from(src: AtomView<'a, T>) -> Self {
        Self {
            element_symbol: src.element_symbol().into(),
            atomic_number: *src.atomic_number(),
            xyz: src.xyz().to_owned(),
            fractional_xyz: src.fractional_xyz().copied(),
            atom_id: *src.atom_id(),
            format_type: T::default(),
        }
    }
More examples
Hide additional examples
src/model_type/msi.rs (line 182)
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            r#"  ({item_id} Atom
    (A C ACL "{elm_id} {elm}")
    (A C Label "{elm}")
    (A D XYZ ({x:.12} {y:.12} {z:.12}))
    (A I Id {atom_id})
  )
"#,
            item_id = self.atom_id() + 1,
            elm_id = self.atomic_number(),
            elm = self.element_symbol(),
            x = self.xyz().x,
            y = self.xyz().y,
            z = self.xyz().z,
            atom_id = self.atom_id(),
        )
    }
Examples found in repository?
src/atom/mod.rs (line 67)
62
63
64
65
66
67
68
69
70
71
    fn from(src: AtomView<'a, T>) -> Self {
        Self {
            element_symbol: src.element_symbol().into(),
            atomic_number: *src.atomic_number(),
            xyz: src.xyz().to_owned(),
            fractional_xyz: src.fractional_xyz().copied(),
            atom_id: *src.atom_id(),
            format_type: T::default(),
        }
    }
Examples found in repository?
src/atom/mod.rs (line 68)
62
63
64
65
66
67
68
69
70
71
    fn from(src: AtomView<'a, T>) -> Self {
        Self {
            element_symbol: src.element_symbol().into(),
            atomic_number: *src.atomic_number(),
            xyz: src.xyz().to_owned(),
            fractional_xyz: src.fractional_xyz().copied(),
            atom_id: *src.atom_id(),
            format_type: T::default(),
        }
    }
More examples
Hide additional examples
src/model_type/msi.rs (line 181)
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            r#"  ({item_id} Atom
    (A C ACL "{elm_id} {elm}")
    (A C Label "{elm}")
    (A D XYZ ({x:.12} {y:.12} {z:.12}))
    (A I Id {atom_id})
  )
"#,
            item_id = self.atom_id() + 1,
            elm_id = self.atomic_number(),
            elm = self.element_symbol(),
            x = self.xyz().x,
            y = self.xyz().y,
            z = self.xyz().z,
            atom_id = self.atom_id(),
        )
    }

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.