lammpsio.Angles¶
- class lammpsio.Angles(N, num_types=None)¶
Angle connections between particles.
All values of indexes follow the LAMMPS 1-indexed convention, but the arrays themselves are 0-indexed.
- Parameters:
Example
Create angles:
angles = lammpsio.topology.Angles(N=3, num_types=1) angles.id = [1, 2, 3] angles.typeid = [1, 1, 1] angles.members = [[1, 2, 3], [2, 3, 1], [3, 1, 2]]
This creates a molecule with three angles of the same type. The angles are defined between particles IDs 1-2-3, 2-3-1, and 3-1-2 to form a triangle structure.
Methods:
has_id()Check if configuration has connection IDs.
Check if configuration has connection members.
Check if configuration has connection typeids.
reorder(order[, check_order])Reorder the connections in place.
Attributes:
Number of connections.
Unique identifiers (IDs).
Connection members.
Number of connection types.
Labels of connection type IDs.
Connection type IDs.
- has_id()¶
Check if configuration has connection IDs.
- Returns:
Trueif connection IDs have been initialized.- Return type:
- has_members()¶
Check if configuration has connection members.
- Returns:
Trueif particle members have been initialized.- Return type:
- has_typeid()¶
Check if configuration has connection typeids.
- Returns:
Trueif connection typeids have been initialized.- Return type:
- property id¶
Unique identifiers (IDs).
The default value on initialization runs from 1 to
N.- Type:
(N,)
numpy.ndarrayofint
- property members¶
Connection members.
The default value on initialization is 1 for all entries. M is the number of members in the connection.
- Type:
(N, M)
numpy.ndarrayofint
- reorder(order, check_order=True)¶
Reorder the connections in place.
- property typeid¶
Connection type IDs.
The default value on initialization is 1 for all entries.
- Type:
(N,)
numpy.ndarrayofint