lammpsio.Dihedrals¶
- class lammpsio.Dihedrals(N, num_types=None)¶
Dihedral connections between particles.
All values of indexes follow the LAMMPS 1-indexed convention, but the arrays themselves are 0-indexed.
- Parameters:
Example
Create dihedrals:
dihedrals = lammpsio.topology.Dihedrals(N=2, num_types=2) dihedrals.id = [1, 2] dihedrals.typeid = [1, 2] dihedrals.members = [ [1, 2, 3, 4], [2, 3, 4, 5], ]
This creates two dihedrals of two different types for a molecule consisting of eight atoms.
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