Atom

class pylimer_tools_cpp.Atom(*args, **kwargs)

Bases: pybind11_object

A single bead or atom.

Overloaded function.

  1. __init__(self: pylimer_tools_cpp.Atom, id: int, type: int, x: float, y: float, z: float, nx: int, ny: int, nz: int) -> None

    Construct this atom.

    param id:

    Unique identifier for the atom

    param type:

    Type classification of the atom

    param x:

    X coordinate position

    param y:

    Y coordinate position

    param z:

    Z coordinate position

    param nx:

    Periodic image flag in x direction

    param ny:

    Periodic image flag in y direction

    param nz:

    Periodic image flag in z direction

  2. __init__(self: pylimer_tools_cpp.Atom, properties: dict[str, float]) -> None

    Construct this atom from a properties dictionary.

    The dictionary should contain at least the following keys: - “id”: Unique identifier for the atom - “type”: Type classification of the atom - “x”, “y”, “z”: Coordinate positions - “nx”, “ny”, “nz”: Periodic image flags

    Any additional properties will be stored as extra data.

    param properties:

    Dictionary containing atom properties

Methods Summary

compute_vector_to(self, to_atom, pbc_box)

Compute the vector to another atom.

distance_to(self, to_atom, pbc_box)

Compute the distance to another atom.

distance_to_unwrapped(self, arg0, arg1)

Compute the distance to another atom respecting the periodic image flags.

get_coordinates(self)

Get the coordinates of this atom as a vector.

get_id(self)

Get the ID of the atom.

get_nx(self)

Get the box image that the atom is in in x direction (also known as ix or nx).

get_ny(self)

Get the box image that the atom is in in y direction (also known as iy or ny).

get_nz(self)

Get the box image that the atom is in in z direction (also known as iz or nz).

get_type(self)

Get the type of the atom.

get_unwrapped_coordinates(self, arg0)

Get the unwrapped coordinates of this atom.

get_x(self)

Get the x coordinate of the atom.

get_y(self)

Get the y coordinate of the atom.

get_z(self)

Get the z coordinate of the atom.

vector_to_unwrapped(self, arg0, arg1)

Compute the vector to another atom respecting the periodic image flags.

Methods Documentation

compute_vector_to(self: pylimer_tools_cpp.Atom, to_atom: pylimer_tools_cpp.Atom, pbc_box: pylimer_tools_cpp.Box) numpy.ndarray[numpy.float64[3, 1]]

Compute the vector to another atom.

Parameters:
  • to_atom – The target atom

  • pbc_box – The periodic boundary conditions box

Returns:

Vector pointing from this atom to the target atom

distance_to(self: pylimer_tools_cpp.Atom, to_atom: pylimer_tools_cpp.Atom, pbc_box: pylimer_tools_cpp.Box) float

Compute the distance to another atom.

Parameters:
  • to_atom – The target atom

  • pbc_box – The periodic boundary conditions box

Returns:

Euclidean distance between the atoms

distance_to_unwrapped(self: pylimer_tools_cpp.Atom, arg0: pylimer_tools_cpp.Atom, arg1: pylimer_tools_cpp.Box) float

Compute the distance to another atom respecting the periodic image flags.

Parameters:

to_atom – The target atom

Returns:

Unwrapped distance to the target atom

get_coordinates(self: pylimer_tools_cpp.Atom) numpy.ndarray[numpy.float64[3, 1]]

Get the coordinates of this atom as a vector.

Returns:

A vector containing the x, y, z coordinates

get_id(self: pylimer_tools_cpp.Atom) int

Get the ID of the atom.

Returns:

The atom’s unique identifier

get_nx(self: pylimer_tools_cpp.Atom) int

Get the box image that the atom is in in x direction (also known as ix or nx).

Returns:

The periodic image flag in x direction

get_ny(self: pylimer_tools_cpp.Atom) int

Get the box image that the atom is in in y direction (also known as iy or ny).

Returns:

The periodic image flag in y direction

get_nz(self: pylimer_tools_cpp.Atom) int

Get the box image that the atom is in in z direction (also known as iz or nz).

Returns:

The periodic image flag in z direction

get_type(self: pylimer_tools_cpp.Atom) int

Get the type of the atom.

Returns:

The atom’s type classification

get_unwrapped_coordinates(self: pylimer_tools_cpp.Atom, arg0: pylimer_tools_cpp.Box) numpy.ndarray[numpy.float64[3, 1]]

Get the unwrapped coordinates of this atom.

Parameters:

box – The simulation box to use for unwrapping

Returns:

A vector containing the unwrapped x, y, z coordinates

get_x(self: pylimer_tools_cpp.Atom) float

Get the x coordinate of the atom.

Returns:

The x coordinate

get_y(self: pylimer_tools_cpp.Atom) float

Get the y coordinate of the atom.

Returns:

The y coordinate

get_z(self: pylimer_tools_cpp.Atom) float

Get the z coordinate of the atom.

Returns:

The z coordinate

vector_to_unwrapped(self: pylimer_tools_cpp.Atom, arg0: pylimer_tools_cpp.Atom, arg1: pylimer_tools_cpp.Box) numpy.ndarray[numpy.float64[3, 1]]

Compute the vector to another atom respecting the periodic image flags.

Parameters:

to_atom – The target atom

Returns:

Unwrapped vector to the target atom