Struct grafen::surface::Cylinder
[−]
[src]
pub struct Cylinder { pub name: Option<String>, pub residue: Option<Residue>, pub lattice: LatticeType, pub alignment: Direction, pub cap: Option<CylinderCap>, pub origin: Coord, pub radius: f64, pub height: f64, pub coords: Vec<Coord>, }
A 2D cylindrical surface.
Fields
name: Option<String>
Name of cylinder in database.
residue: Option<Residue>
Optional residue placed at each coordinate. If not set the cylinder describes a general collection of coordinates.
lattice: LatticeType
lattice type used to construct the cylinder surface structure.
alignment: Direction
The axis along which the cylinder is aligned.
cap: Option<CylinderCap>
Cylinders can be capped at its ends.
origin: Coord
Origin of the cylinder. Located in the center of the bottom.
radius: f64
Radius of cylinder.
height: f64
Height of cylinder.
coords: Vec<Coord>
List of coordinates belonging to the cylinder. Relative to the `origin.
Methods
impl Cylinder
[src]
fn construct(self) -> Result<Cylinder>
[src]
Construct the cylinder coordinates and return the object.
Errors
Returns an error if either the radius or height is non-positive.
Trait Implementations
impl<'a> Component<'a> for Cylinder
[src]
fn box_size(&self) -> Coord
[src]
Return the size of the object's bounding box seen from origo. Read more
fn iter_atoms(&self) -> AtomIterItem
[src]
Return an Iterator
over all atoms in the object as CurrentAtom
objects.
fn num_atoms(&self) -> u64
[src]
Return the number of atoms in the object.
fn with_pbc(self) -> Self
[src]
Return the component with its coordinates adjusted to lie within its box.
impl Translate for Cylinder
[src]
fn translate(self, coord: Coord) -> Self
[src]
Translate the object by an input Coord
.
fn translate_in_place(&mut self, coord: Coord)
[src]
Translate the object by an input Coord
in-place.
impl Clone for Cylinder
[src]
fn clone(&self) -> Cylinder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more