ppap4lmp
0.7.2
|
Namespace for functions to bind C++ classes to Python. More...
Functions | |
void | py_add_bond_angle (py::module &m) |
Bind AddBondAngle class to Python. More... | |
void | py_add_bond_length (py::module &m) |
Bind AddBondLength class to Python. More... | |
void | py_add_child_ids (py::module &m) |
Bind AddChildIDs class to Python. More... | |
void | py_add_child_positions (py::module &m) |
Bind AddChildPositions class to Python. More... | |
void | py_add_com_position (py::module &m) |
Bind AddCoMPosition class to Python. More... | |
void | py_add_dihedral_angle (py::module &m) |
Bind AddDihedralAngle class to Python. More... | |
void | py_add_gyration_radius (py::module &m) |
Bind AddGyrationRadius class to Python. More... | |
void | py_add_inertia_moment (py::module &m) |
Bind AddInertiaMoment class to Python. More... | |
void | py_add_map (py::module &m) |
Bind AddMap class to Python. More... | |
void | py_add_molecular_orientation (py::module &m) |
Bind AddMolecularOrientation class to Python. More... | |
void | py_add_rename (py::module &m) |
Bind AddRename class to Python. More... | |
void | py_add_special_bonds (py::module &m) |
Bind AddSpecialBonds class to Python. More... | |
void | py_add_wrapped_position (py::module &m) |
Bind AddWrappedPosition class to Python. More... | |
void | py_adder (py::module &m) |
Bind Adder class to Python. More... | |
void | py_fil_comparison (py::module &m) |
Bind FilComparison class to Python. More... | |
void | py_fil_set (py::module &m) |
Bind FilSet class to Python. More... | |
void | py_filter (py::module &m) |
Bind Filter class to Python. More... | |
void | py_inv_omp (py::module &m) |
Bind InvOMP class to Python. More... | |
void | execute_omp (const ShPtr< Processor > &proc) |
Create and use an InvOMP object to conduct analysis programmed in a Processor's subclass object. More... | |
void | execute_omp (const Vec< ShPtr< Processor >> &procs) |
Create and use an InvOMP object to conduct analysis programmed in Processor's subclass objects. More... | |
void | py_invoker (py::module &m) |
Bind Invoker class to Python. More... | |
void | py_pro_data (py::module &m) |
Bind ProData class to Python. More... | |
void | py_pro_distance_in_molecule (py::module &m) |
Bind ProDistanceInMolecule class to Python. More... | |
void | py_pro_mean_square_displacement (py::module &m) |
Bind ProMeanSquareDisplacement class to Python. More... | |
void | py_pro_radial_distribution_function (py::module &m) |
Bind ProRadialDistributionFunction class to Python. More... | |
void | py_pro_radial_distribution_function_with_deformation (py::module &m) |
Bind ProRadialDistributionFunctionWithDeformation class to Python. More... | |
void | py_pro_thickness_profile (py::module &m) |
Bind ProThicknessProfile class to Python. More... | |
void | py_pro_time_correlation_in_molecule (py::module &m) |
Bind ProTimeCorrelationInMolecule class to Python. More... | |
void | py_pro_value_array (py::module &m) |
Bind ProValueArray class to Python. More... | |
void | py_processor (py::module &m) |
Bind Processor class to Python. More... | |
void | py_element (py::module &m) |
Bind Element class to Python. More... | |
void | py_updater (py::module &m) |
Bind Updater class to Python. More... | |
void | py_utils (py::module &m) |
Bind utility functions to Python. More... | |
void | py_sta_beads (py::module &m) |
Bind StaBeads class to Python. More... | |
void | py_sta_copy (py::module &m) |
Bind StaCopy class to Python. More... | |
void | py_sta_custom (py::module &m) |
Bind StaCustom class to Python. More... | |
void | py_sta_dump (py::module &m) |
Bind StaDump class to Python. More... | |
void | py_sta_dump_atoms (py::module &m) |
Bind StaDumpAtoms class to Python. More... | |
void | py_sta_dump_box (py::module &m) |
Bind StaDumpBox class to Python. More... | |
void | py_sta_molecules (py::module &m) |
Bind StaMolecules class to Python. More... | |
void | py_starter (py::module &m) |
Bind Starter class to Python. More... | |
Namespace for functions to bind C++ classes to Python.
Create and use an InvOMP object to conduct analysis programmed in a Processor's subclass object.
proc | A Processor object to be executed. |
Definition at line 27 of file py_inv_omp.cpp.
Create and use an InvOMP object to conduct analysis programmed in Processor's subclass objects.
procs | List of Processor objects to be executed. |
Definition at line 32 of file py_inv_omp.cpp.
void pybind::py_add_bond_angle | ( | py::module & | m | ) |
Bind AddBondAngle class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddBondAngle::AddBondAngle | Constructor of AddBondAngle class.
|
|
Usage example of the constructor to add angle
property to an Element object for bond-angles.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
angles = create(StaCustom([...]))
angles.append_updater(AddBondAngle(atoms))
Definition at line 10 of file py_add_bond_angle.cpp.
void pybind::py_add_bond_length | ( | py::module & | m | ) |
Bind AddBondLength class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddBondLength::AddBondLength | Constructor of AddBondLength class.
|
|
Usage example of the constructor to add length
property to an Element object for bonds.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
bonds = create(StaCustom([...]))
bonds.append_updater(AddBondLength(atoms))
Definition at line 10 of file py_add_bond_length.cpp.
void pybind::py_add_child_ids | ( | py::module & | m | ) |
Bind AddChildIDs class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddChildIDs::AddChildIDs | Constructor of AddChildIDs class.
|
|
Usage example of the constructor to add bead-ids
property to an Element object for molecules.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
beads = create(StaBeads(molecules, mapping))
molecules.append_updater(AddChildIDs(beads, "bead", "mol"))
Definition at line 10 of file py_add_child_ids.cpp.
void pybind::py_add_child_positions | ( | py::module & | m | ) |
Bind AddChildPositions class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddChildPositions::AddChildPositions | Constructor of AddChildPositions class.
|
|
Definition at line 10 of file py_add_child_positions.cpp.
void pybind::py_add_com_position | ( | py::module & | m | ) |
Bind AddCoMPosition class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddCoMPosition::AddCoMPosition | Constructor of AddCoMPosition class.
|
|
Usage example of the constructor to add xu
, yu
and zu
property to an Element object for molecules.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
molecules.append_updater(AddCoMPosition(atoms))
Definition at line 10 of file py_add_com_position.cpp.
void pybind::py_add_dihedral_angle | ( | py::module & | m | ) |
Bind AddDihedralAngle class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddDihedralAngle::AddDihedralAngle | Constructor of AddDihedralAngle class.
|
|
Usage example of the constructor to add dihedral-angle
property to an Element object for dihedrals.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
dihedrals = create(StaCustom([...]))
dihedrals.append_updater(AddDihedralAngle(atoms))
Definition at line 10 of file py_add_dihedral_angle.cpp.
void pybind::py_add_gyration_radius | ( | py::module & | m | ) |
Bind AddGyrationRadius class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddGyrationRadius::Updater | Constructor of AddGyrationRadius class.
| None. |
Usage example of the constructor to add square of gyration radius to an Element object for molecules.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
molecules.append_updater(AddCoMPosition(atoms))
molecules.append_updater(AddInertiaMoment(atoms))
molecules.append_updater(AddGyrationRadius())
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
with_sqrted | AddGyrationRadius::with_sqrted | Enable to compute gyration radius (by default, only square of gyration radius is computed). |
| This AddGyrationRadius object. |
Definition at line 10 of file py_add_gyration_radius.cpp.
void pybind::py_add_inertia_moment | ( | py::module & | m | ) |
Bind AddInertiaMoment class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddInertiaMoment::AddInertiaMoment | Constructor of AddInertiaMoment class.
|
|
Usage example of the constructor to add elements of inertia moment to an Element object for molecules.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
molecules.append_updater(AddCoMPosition(atoms))
molecules.append_updater(AddInertiaMoment(atoms))
Definition at line 10 of file py_add_inertia_moment.cpp.
void pybind::py_add_map | ( | py::module & | m | ) |
Bind AddMap class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddMap::AddMap | Constructor of AddMap class.
|
|
Usage example of the constructor for mapping from atomic-number
to mass
.
# python
my_mapping = AddMap(
"atomic-number", "mass",
{
6: 12.011,
8: 15.999,
9: 18.998
}
)
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
overwrite | AddMap::overwrite | Allow overwriting an existing property by a new property with the same name. |
| This AddMap object. |
Definition at line 10 of file py_add_map.cpp.
void pybind::py_add_molecular_orientation | ( | py::module & | m | ) |
Bind AddMolecularOrientation class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddMolecularOrientation::Updater | Constructor of AddMolecularOrientation class.
| None. |
Usage example of the constructor to add molecular orientation to an Element object for molecules.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
molecules.append_updater(AddCoMPosition(atoms))
molecules.append_updater(AddInertiaMoment(atoms))
molecules.append_updater(AddMolecularOrientation())
Definition at line 10 of file py_add_molecular_orientation.cpp.
void pybind::py_add_rename | ( | py::module & | m | ) |
Bind AddRename class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddRename::AddRename | Constructor of AddRename class. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
overwrite | AddRename::overwrite | Allow overwriting an existing property by a renamed property with the same name. |
| This AddRename object. |
Definition at line 10 of file py_add_rename.cpp.
void pybind::py_add_special_bonds | ( | py::module & | m | ) |
Bind AddSpecialBonds class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddSpecialBonds::AddSpecialBonds | Constructor of AddSpecialBonds class for molecules all of whose type property are 1, or molecules all of which do not have the property.
|
| ||
AddSpecialBonds::AddSpecialBonds | Constructor of AddSpecialBonds class for multiple molecular types.
|
|
Usage example of the constructor for molecules consisting of linearly connected four atoms. Bond-length and bond-angle potentials are considered.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
my_sbonds = AddSpecialBonds(
molecules,
[
[1, 2],
[0, 2, 3],
[0, 1, 3],
[1, 2]
]
)
atoms.append_updater(my_sbonds)
Usage example of the constructor for two types of molecule: the first one consists of linearly connected four atoms, and the second one consists of linearly connected five atoms. Bond-length and bond-angle potentials are considered.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
my_sbonds = AddSpecialBonds(
molecules,
{
1: [
[1, 2],
[0, 2, 3],
[0, 1, 3],
[1, 2]
],
2: [
[1, 2],
[0, 2, 3],
[0, 1, 3, 4],
[1, 2, 4],
[2, 3]
]
}
)
atoms.append_updater(my_sbonds)
Definition at line 10 of file py_add_special_bonds.cpp.
void pybind::py_add_wrapped_position | ( | py::module & | m | ) |
Bind AddWrappedPosition class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
AddWrappedPosition::AddWrappedPosition | Constructor of AddWrappedPosition class.
|
|
Definition at line 10 of file py_add_wrapped_position.cpp.
void pybind::py_adder | ( | py::module & | m | ) |
Bind Adder class to Python.
m | : A mutable reference to Python module. |
Constructor of Adder class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_adder.cpp.
void pybind::py_element | ( | py::module & | m | ) |
Bind Element class to Python.
m | : A mutable reference to Python module. |
Constructor of Element class is hidden from Python. A Python-side function create provides functionality to create an Element object taking a Starter's subclass object as its parameter.
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
create | Lambda function defined in pybind::py_element | Factory function for Element class. | An object of Element class. |
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
append_updater | Element::append_updater | Append an Updater object to this Element object: the only way to extend an updating process associated with this object. |
| This Element object. |
get_data | Element::get_data_py | Get a reference to #data of this object. | None. | A Json object (complex of dictionary and list). |
get_keys | Element::get_keys_py | Get keys of the data of this object. | None. | Set of strings. |
get_1d_int | Element::get_1d_int_py | Get integer values stored in Element::data of this object as a one-dimensional Numpy-Array. |
| One-dimensional Numpy-Array of which elements are integers. |
get_1d_float | Element::get_1d_float_py | Get float values stored in Element::data of this object as a one-dimensional Numpy-Array. |
| One-dimensional Numpy-Array of which elements are floats. |
get_2d_int | Element::get_2d_int_py | Get integer values stored in Element::data of this object as a two-dimensional Numpy-Array. |
| Two-dimensional Numpy-Array of which elements are integers. |
get_2d_float | Element::get_2d_float_py | Get float values stored in Element::data of this object as a two-dimensional Numpy-Array. |
| Tow-dimensional Numpy-Array of which elements are floats. |
Definition at line 13 of file py_element.cpp.
void pybind::py_fil_comparison | ( | py::module & | m | ) |
Bind FilComparison class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
FilComparison::FilComparison | Constructor of FilComparison class with one criterion. |
| ||
FilComparison::FilComparison | Constructor of FilComparison class with multiple criteria. |
|
Usage example of the constructor for a filter removing atoms whose xu
property is less than 10.0.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
atoms.append_updater(FilComparison(("xu", ">=", 10.0)))
Usage example of the constructor for a filter removing atoms except for those of which xu
property is greater than 10.0 and less than 20.0, and charge
property is equal to -1.0.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
atoms.append_updater(FilComparison([
("xu", ">", 10.0),
("xu", "<", 20.0),
("charge", "==", -1.0)
]))
Definition at line 10 of file py_fil_comparison.cpp.
void pybind::py_fil_set | ( | py::module & | m | ) |
Bind FilSet class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
FilSet::FilSet | Constructor of FilSet class. |
|
Usage example of the constructor for a filter removing atoms whose type
property is not 1, 2, or 3.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
atoms.append_updater(FilSet({"type": {1, 2, 3}}))
Usage example of the constructor for a filter removing atoms except for those of which type
property is 1, 2, or 3, and id
property is a multiple of 3 less than 1000.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
atoms.append_updater(FilSet({
"type": {1, 2, 3},
"id": set(range(3, 1000, 3))
}))
Definition at line 10 of file py_fil_set.cpp.
void pybind::py_filter | ( | py::module & | m | ) |
Bind Filter class to Python.
m | : A mutable reference to Python module. |
Constructor of Filter class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_filter.cpp.
void pybind::py_inv_omp | ( | py::module & | m | ) |
Bind InvOMP class to Python.
m | : A mutable reference to Python module. |
Constructor of InvOMP class is hidden from Python. A Python-side function execute_omp provides functionality to create an InvOMP object and execute analysis using it.
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
execute_omp | pybind::execute_omp | Create and use an InvOMP object to conduct analysis programmed in a Processor's subclass object. |
| None. |
execute_omp | pybind::execute_omp | Create and use an InvOMP object to conduct analysis programmed in Processor's subclass objects. |
| None. |
Definition at line 10 of file py_inv_omp.cpp.
void pybind::py_invoker | ( | py::module & | m | ) |
Bind Invoker class to Python.
m | : A mutable reference to Python module. |
Constructor of Invoker class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_invoker.cpp.
void pybind::py_pro_data | ( | py::module & | m | ) |
Bind ProData class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProData::ProData | Constructor of ProData class for one Element object. |
| ||
ProData::ProData | Constructor of ProData class for a sequence of Element objects. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
select | ProData::select | Specify string keys for properties to be copied. |
| None. |
get_results | ProData::get_results | Get list of Json objects consisting of all or some properties of Element objects stored in this object. | None. | List of Json objects (complex of dictionary and list). |
Definition at line 10 of file py_pro_data.cpp.
void pybind::py_pro_distance_in_molecule | ( | py::module & | m | ) |
Bind ProDistanceInMolecule class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProDistanceInMolecule::ProDistanceInMolecule | Constructor of ProDistanceInMolecule class for a snapshot of simulation. |
| ||
ProDistanceInMolecule::ProDistanceInMolecule | Constructor of ProDistanceInMolecule class for multiple snapshots of simulation. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
set_indices | ProDistanceInMolecule::set_indices | Specify two atoms in a molecule by zero-based index. Distance between the two atoms is computed for each molecule. |
| None. |
set_moltype | ProDistanceInMolecule::set_moltype | Specify a molecular type. Only molecules whose type property is the specified type are analyzed. If molecules have no type property, you do not need to use this method. |
| None. |
get_distance_array | ProDistanceInMolecule::get_distance_array | Get computed distances between two atoms in each molecule as a two-dimensional array: each row corresponds to each snapshot of a simulation and each column corresponds to each molecule. | None. | Two-dimensional Numpy-Array. |
get_distance2_array | ProDistanceInMolecule::get_distance2_array | Get computed squared distances between two atoms in each molecule as a two-dimensional array: each row corresponds to each snapshot of a simulation and each column corresponds to each molecule. | None. | Two-dimensional Numpy-Array. |
Usage example of ProDistanceInMolecule class for a trajectory of molecules without type
property. Distance between the 0 th atom and 100 th atom is computed.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
molecules_traj = [
create(StaMolecules(atoms)) for atoms in atoms_traj
]
pro = ProDistanceInMolecule(list(zip(atoms_traj, molecules_traj)))
pro.set_indices(0, 100)
execute_omp(pro)
average_r2 = pro.get_distance2_array().mean()
Definition at line 10 of file py_pro_distance_in_molecule.cpp.
void pybind::py_pro_mean_square_displacement | ( | py::module & | m | ) |
Bind ProMeanSquareDisplacement class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProMeanSquareDisplacement::ProMeanSquareDisplacement | Constructor of ProMeanSquareDisplacement class. |
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
set_dimension | ProMeanSquareDisplacement::set_dimension | Specify dimensions to be considered. By default, the mean square displacement is computed in three dimensions. To compute the mean square displacement in xy place, for example, the third parameter of this method must be set to false . |
| None. |
without_drift_correction | ProMeanSquareDisplacement::without_drift_correction | Disable to correct a drift of center of mass of the simulation system. |
| None. |
get_displacement2_array | ProMeanSquareDisplacement::get_displacement2_array | Get computed time series of squared displacements from initial position for each target as a two-dimensional array: each row corresponds to each snapshot of the simulation and each column corresponds to each target. | None. | Two-dimensional Numpy-Array. |
get_mean_square_displacement | ProMeanSquareDisplacement::get_mean_square_displacement | Get time series of the mean square displacement as a one-dimensional array. Each element of the array corresponds to each snapshot of the simulation. | None. | One-dimensional Numpy-Array. |
Usage example of ProMeanSquareDisplacement class for three-dimensional mean square displacement.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
molecules_traj = [
create(StaMolecules(atoms))
.append_updater(AddCoMPosition(atoms))
for atoms in atoms_traj
]
pro = ProMeanSquareDisplacement(molecules_traj)
execute_omp(pro)
msd = pro.get_distance2_array().mean()
Definition at line 10 of file py_pro_mean_square_displacement.cpp.
void pybind::py_pro_radial_distribution_function | ( | py::module & | m | ) |
Bind ProRadialDistributionFunction class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProRadialDistributionFunction::ProRadialDistributionFunction | Constructor of ProRadialDistributionFunction class for a snapshot of simulation. |
| ||
ProRadialDistributionFunction::ProRadialDistributionFunction | Constructor of ProThicknessProfile class for multiple snapshots of simulation. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
set_bin | ProRadialDistributionFunction::set_bin | Set width and number of bins in the distance axis. Each bin is a spherical shell of which center is positioned at a reference particle. |
| None. |
bin_from_r_to_r_plus_dr | ProRadialDistributionFunction::bin_from_r_to_r_plus_dr | By default, the bins are [0, 0.5*dr), [0.5*dr, 1.5*dr), ... . If this method is called without a parameter, the bins are set as [0, dr), [dr, 2*dr), ... . |
| None. |
beyond_half_box_length | ProRadialDistributionFunction::beyond_half_box_length | Use a sample including particles of which distance from a reference particle are larger than half the simulation box length. |
| None. |
get_r_axis | ProRadialDistributionFunction::get_r_axis | Get a one-dimensional array of distance, [0, dr, 2*dr, ... ], where dr is width of a bin. | None. | One-dimensional Numpy-Array. |
get_rdf | ProRadialDistributionFunction::get_rdf | Get the radial distribution function as a one-dimensional array. | None. | One-dimensional Numpy-Array. |
get_rdf_traj | ProRadialDistributionFunction::get_rdf_traj | Get a sequence of radial distribution functions as list of one-dimensional arrays. | None. | List of one-dimensional Numpy-Arrays. |
Usage example of ProRadialDistributionFunction class for computing radial distribution function of atoms with the following two conditions. Linearly connected four atoms form a molecule. Each atom has next two atoms in the same molecule as special bonds.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
for atoms in atoms_traj:
atoms.append_updater(AddSpecialBonds(
create(StaMolecules(atoms)),
[[1, 2], [0, 2, 3], [0, 1, 3], [1, 2]]
))
box_traj = [
create(StaDumpBox("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
for atoms, box in zip(atoms_traj, box_traj):
atoms.append_updater(AddWrappedPosition(box))
pro = ProRadialDistributionFunction(list(zip(atoms_traj, box_traj)))
pro.set_bin(0.1, 200)
execute_omp(pro)
rdf = pro.get_rdf()
Definition at line 10 of file py_pro_radial_distribution_function.cpp.
void pybind::py_pro_radial_distribution_function_with_deformation | ( | py::module & | m | ) |
Bind ProRadialDistributionFunctionWithDeformation class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProRadialDistributionFunctionWithDeformation::ProRadialDistributionFunction | Constructor of ProRadialDistributionFunctionWithDeformation class for a snapshot of simulation. |
| ||
ProRadialDistributionFunctionWithDeformation::ProRadialDistributionFunction | Constructor of ProRadialDistributionFunctionWithDeformation class for multiple snapshots of simulation. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
set_bin | ProRadialDistributionFunctionWithDeformation::set_bin | Set width and number of bins in the distance axis. Each bin is a spherical shell of which center is positioned at a reference particle. |
| None. |
set_margin | ProRadialDistributionFunctionWithDeformation::set_margin | Set margin for distance from a reference particle: this program uses a sample including particles of which distance from a reference particle are less than the maximum distance in a domain, where the radial distribution function is computed, plus* the margin. |
| None. |
bin_from_r_to_r_plus_dr | ProRadialDistributionFunctionWithDeformation::bin_from_r_to_r_plus_dr | By default, the bins are [0, 0.5*dr), [0.5*dr, 1.5*dr), ... . If this method is called without a parameter, the bins are set as [0, dr), [dr, 2*dr), ... . |
| None. |
beyond_half_box_length | ProRadialDistributionFunctionWithDeformation::beyond_half_box_length | Use a sample including particles of which distance from a reference particle are larger than half the simulation box length. |
| None. |
get_r_axis | ProRadialDistributionFunctionWithDeformation::get_r_axis | Get a one-dimensional array of distance, [0, dr, 2*dr, ... ], where dr is width of a bin. | A. | One-dimensional Numpy-Array. |
get_rdf | ProRadialDistributionFunctionWithDeformation::get_rdf | Get the radial distribution function as a one-dimensional array. | None. | One-dimensional Numpy-Array. |
get_rdf_traj | ProRadialDistributionFunctionWithDeformation::get_rdf_traj | Get a sequence of radial distribution functions as list of one-dimensional arrays. | None. | List of one-dimensional Numpy-Arrays. |
get_gyration_radius | ProRadialDistributionFunctionWithDeformation::get_gyration_radius | Get averaged gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic , parallel and perpendicular , and corresponding values are functions for general gyration radius, gyration radius in the particle-to-particle axis and gyration radius around the particle-to-particle axis, respectively. | None. | Dictionary from string keys to one-dimensional Numpy-Arrays. |
get_gyration_radius_traj | ProRadialDistributionFunctionWithDeformation::get_gyration_radius_traj | Get list of temporary gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic , parallel and perpendicular , and corresponding values are lists of functions for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. Each element of the lists corresponds to each snapshot of the simulation. | None. | Dictionary from string keys to lists of one-dimensional Numpy-Arrays. |
get_squared_gyration_radius | ProRadialDistributionFunctionWithDeformation::get_squared_gyration_radius | Get averaged square of gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic , parallel and perpendicular , and corresponding values are function for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. | None. | Dictionary from string keys to one-dimensional Numpy-Arrays. |
get_squared_gyration_radius_traj | ProRadialDistributionFunctionWithDeformation::get_squared_gyration_radius_traj | Get list of temporary square of gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic , parallel and perpendicular , and corresponding values are lists of functions for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. Each element of the lists corresponds to each snapshot of the simulation. | None. | Dictionary from string keys to lists of one-dimensional Numpy-Arrays. |
Usage example of ProRadialDistributionFunctionWithDeformation class for computing radial distribution function of beads.
# python
ProRDFWD = ProRadialDistributionFunctionWithDeformation
n_samples = 1000
interval = 1000
atoms_traj = [create(
StaDumpAtoms("/path/to/dump", i))
for i in range(0, n_samples*interval+1, interval)
]
box_traj = [create(
StaDumpBox("/path/to/dump", i))
for i in range(0, n_samples*interval+1, interval)
]
mols_traj = [create(StaMolecules(atoms)) for atoms in atoms_traj]
mappings = [
[0, 1, 2, 12, 13, 14, 15, 16, 17, 18],
[3, 4, 5, 19, 20, 21, 22, 23, 24],
[6, 7, 8, 25, 26, 27, 28, 29, 30],
[9, 10, 11, 31, 32, 33, 34, 35, 36, 37]
]
abst_beads = [
{"type": 1, "indices-in-mol": mapping}
for i, mapping in enumerate(mappings)
]
abst_special_bonds = [[1,2], [0,2,3], [0,1,3], [1,2]]
beads_traj = [
create(StaBeads(mols, abst_beads))
.append_updater(AddCoMPosition(atoms))
.append_updater(AddInertiaMoment(atoms))
.append_updater(AddWrappedPosition(box))
for atoms, box, mols in zip(atoms_traj, box_traj, mols_traj)
]
for beads, mols in zip(beads_traj, mols_traj):
mols.append_updater(AddChildIDs(beads, "bead", "mol"))
mols.append_updater(AddRename("bead-ids", "atom-ids").overwrite())
beads.append_updater(AddSpecialBonds(mols, abst_special_bonds))
pro = ProRDFWD(list(zip(beads_traj, box_traj)))
pro.set_bin(0.1, 200)
pro.set_margin(2.0)
execute_omp(pro)
print(pro.get_rdf())
Definition at line 10 of file py_pro_radial_distribution_function_with_deformation.cpp.
void pybind::py_pro_thickness_profile | ( | py::module & | m | ) |
Bind ProThicknessProfile class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProThicknessProfile::ProThicknessProfile | Constructor of ProThicknessProfile class for a snapshot of simulation. |
| ||
ProThicknessProfile::ProThicknessProfile | Constructor of ProThicknessProfile class for multiple snapshots of simulation. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
set_grid | ProThicknessProfile::set_grid | Specify the number of grids in the x and y directions. |
| None. |
set_offset | ProThicknessProfile::set_offset | Specify the offset for thickness (height). |
| None. |
shift_half_delta | ProThicknessProfile::shift_half_delta | Increment coordinates of the grid points by half the grid width. By default, grids in the x direction are set as x_0, x_0+dx, x_0+2*dx, ... , where x_0 is the minimum x coordinate in the simulation box and dx is the grid width. If this method is called without a parameter, the grids are set as x_0+0.5*dx, x_0+1.5*dx, x_0+2.5*dx, ... . |
| None. |
get_conditions | ProThicknessProfile::get_conditions | Get computation conditions (origin of computed area, grid width and the number of grads) used by this object as list of dictionary. | None. | List of dictionary. |
get_profiles | ProThicknessProfile::get_profiles | Get a sequence of two-dimensional profile of film thickness as list of two-dimensional arrays. Row and column of each array is for the x and y direction, respectively. | None. | List of two-dimensional Numpy-Array. |
Usage example of ProThicknessProfile class for computing a time series of thickness profile of a film consisting of atoms of which radius is 2.16 and type
property is 1.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
.append_updater(AddMap("type", "radius", {1: 2.16}))
for i in range(0, 1000000, 1000))
]
box_traj = [
create(StaDumpBox("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
for atoms, box in zip(atoms_traj, box_traj):
atoms.append_updater(AddWrappedPosition(box))
pro = ProThicknessProfile(list(zip(atoms_traj, box_traj)))
pro.set_grid(100, 100)
execute_omp(pro)
profiles = pro.get_profiles()
Definition at line 10 of file py_pro_thickness_profile.cpp.
void pybind::py_pro_time_correlation_in_molecule | ( | py::module & | m | ) |
Bind ProTimeCorrelationInMolecule class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProTimeCorrelationInMolecule::ProTimeCorrelationInMolecule | Constructor of ProTimeCorrelationInMolecule class. |
|
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
set_indices | ProTimeCorrelationInMolecule::set_indices | Specify two atoms in a molecule by zero-based index. Time correlation function of a vector between the two atoms is computed for each molecule. |
| None. |
set_moltype | ProTimeCorrelationInMolecule::set_moltype | Specify a molecular type. Only molecules whose type property is the specified type are analyzed. If molecules have no type property, you do not need to use this method. |
| None. |
get_coefficients_array | ProTimeCorrelationInMolecule::get_coefficients_array | Get a two-dimensional array containing computed time correlation coefficients of vectors connecting two atoms in the same molecule: each column is a time correlation function of atom-to-atom vector in each molecule. | None. | Two-dimensional Numpy-Array. |
get_time_correlation | ProTimeCorrelationInMolecule::get_time_correlation | Get an averaged time correlation function of atom-to-atom vector; each pair of atoms is in the same molecule. | None. | One-dimensional Numpy-Array. |
Usage example of ProTimeCorrelationInMolecule class for a trajectory of molecules without type
property. Time correlation function for a vector between the 0 th atom and 100 th atom is computed.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
molecules_traj = [
create(StaMolecules(atoms)) for atoms in atoms_traj
]
pro = ProTimeCorrelationInMolecule(list(zip(atoms_traj, molecules_traj)))
pro.set_indices(0, 100)
execute_omp(pro)
tcf = pro.get_time_correlation()
Definition at line 10 of file py_pro_time_correlation_in_molecule.cpp.
void pybind::py_pro_value_array | ( | py::module & | m | ) |
Bind ProValueArray class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
ProValueArray::ProValueArray | Constructor of ProValueArray class for one Element object. |
| ||
ProValueArray::ProValueArray | Constructor of ProValueArray class for a sequence of Element objects. |
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
select | ProValueArray::select | Specify string keys for properties. To use this object, at least one key must be specified. Note that new keys overwrite old keys. |
| None. |
get_results | ProValueArray::get_results | Get dictionary from keys for property to two-dimensional arrays of values for the property. Each row of the array corresponds to each snapshot of a simulation, and each column of the array corresponds to each element in array Element objects (for example, each atom in Element objects for atoms). | None. | Dictionary from string key to two-dimensional Numpy-Array. |
Usage example of ProValueArray class for computing an averaged radius of gyration of molecules.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
molecules_traj = [
create(StaMolecules(atoms))
.append_updater(AddCoMPosition(atoms))
.append_updater(AddInertiaMoment(atoms))
.append_updater(AddGyrationRadius())
for atoms in atoms_traj
]
pro = ProValueArray(molecules_traj)
pro.select("Rg^2")
execute_omp(pro)
Rg = sqrt(pro.get_results()["Rg^2"].mean())
Definition at line 10 of file py_pro_value_array.cpp.
void pybind::py_processor | ( | py::module & | m | ) |
Bind Processor class to Python.
m | : A mutable reference to Python module. |
Constructor of Processor class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_processor.cpp.
void pybind::py_sta_beads | ( | py::module & | m | ) |
Bind StaBeads class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
StaBeads::StaBeads | Constructor of StaBeads class for molecules all of whose type property are 1, or molecules all of which do not have the property.
|
| ||
StaBeads::StaBeads | Constructor of StaBeads class for multiple molecular types.
|
|
Usage example of the constructor for beads consisting of five atoms in a molecule; the molecule consists of four beads, and all the beads are type 1.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
my_beads = StaBeads(
molecules,
[
{"type": 1, "indices-in-mol": [0, 1, 2, 3, 4]},
{"type": 1, "indices-in-mol": [5, 6, 7, 8, 9]},
{"type": 1, "indices-in-mol": [10, 11, 12, 13, 14]},
{"type": 1, "indices-in-mol": [15, 16, 17, 18, 19]}
]
)
beads = create(my_beads)
Usage example of the constructor; some beads belong to molecules whose type is 1 and the others belong to molecules whose type is 2. The number of molecules is 100; molecules with odd id
are type 1 and the others are type 2. All the beads for molecular type 1 consist of five atoms and their types are 1. All the beads for molecular type 2 consist of four atoms and their types are 2.
# python
atoms = create(StaDumpAtoms("path/to/dump", 0))
molecules = create(StaMolecules(atoms))
map_from_id_to_type = {
i + 1 : i%2 + 1 for i in range(100)
}
molecules.append_updater(
AddMap("id", "type", map_from_id_to_type))
my_beads = StaBeads(
molecules,
{
1: [
{"type": 1, "indices-in-mol": [0, 1, 2, 3, 4]},
{"type": 1, "indices-in-mol": [5, 6, 7, 8, 9]},
{"type": 1, "indices-in-mol": [10, 11, 12, 13, 14]},
{"type": 1, "indices-in-mol": [15, 16, 17, 18, 19]}
],
2: [
{"type": 2, "indices-in-mol": [0, 1, 2, 3]},
{"type": 2, "indices-in-mol": [4, 5, 6, 7]},
{"type": 2, "indices-in-mol": [8, 9, 10, 11]},
{"type": 2, "indices-in-mol": [12, 13, 14, 15]}
]
}
)
beads = create(my_beads)
Definition at line 10 of file py_sta_beads.cpp.
void pybind::py_sta_copy | ( | py::module & | m | ) |
Bind StaCopy class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
StaCopy::StaCopy | Constructor of StaCopy class. |
|
Definition at line 10 of file py_sta_copy.cpp.
void pybind::py_sta_custom | ( | py::module & | m | ) |
Bind StaCustom class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
StaCustom::StaCustom | Constructor of StaCustom class. |
|
Definition at line 10 of file py_sta_custom.cpp.
void pybind::py_sta_dump | ( | py::module & | m | ) |
Bind StaDump class to Python.
m | : A mutable reference to Python module. |
Constructor of StaDump class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_sta_dump.cpp.
void pybind::py_sta_dump_atoms | ( | py::module & | m | ) |
Bind StaDumpAtoms class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
StaDumpAtoms::StaDump | Constructor of StaDumpAtoms class.
|
|
Usage example of the constructor for a sequence of Lammps' dump files.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000)]
Definition at line 10 of file py_sta_dump_atoms.cpp.
void pybind::py_sta_dump_box | ( | py::module & | m | ) |
Bind StaDumpBox class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
StaDumpBox::StaDump | Constructor of StaDumpBox class.
|
|
Usage example of the constructor for a sequence of Lammps' dump files.
# python
atoms_traj = [
create(StaDumpBox("path/to/dump", i))
for i in range(0, 1000000, 1000)]
Definition at line 10 of file py_sta_dump_box.cpp.
void pybind::py_sta_molecules | ( | py::module & | m | ) |
Bind StaMolecules class to Python.
m | : A mutable reference to Python module. |
C++ | Description | Parameters | ||
---|---|---|---|---|
StaMolecules::StaMolecules | Constructor of StaMolecules class.
|
|
Usage example of the constructor for a trajectory of typed molecules. The number of molecules is 100; molecules with odd id
are type 1 and the others are type 2.
# python
atoms_traj = [
create(StaDumpAtoms("path/to/dump", i))
for i in range(0, 1000000, 1000))
]
map_from_id_to_type = {
i + 1 : i%2 + 1 for i in range(100)
}
molecules_traj = [
create(StaMolecules(atoms))
.append_updater(AddMap("id", "type", map_from_id_to_type))
for atoms in atoms_traj
]
Definition at line 10 of file py_sta_molecules.cpp.
void pybind::py_starter | ( | py::module & | m | ) |
Bind Starter class to Python.
m | : A mutable reference to Python module. |
Constructor of Starter class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_starter.cpp.
void pybind::py_updater | ( | py::module & | m | ) |
Bind Updater class to Python.
m | : A mutable reference to Python module. |
Constructor of Updater class is hidden from Python, because the class is an abstract one.
Definition at line 10 of file py_updater.cpp.
void pybind::py_utils | ( | py::module & | m | ) |
Bind utility functions to Python.
m | : A mutable reference to Python module. |
Name | C++ | Description | Parameters | Return |
---|---|---|---|---|
log_switch | utils::log_switch | Switch on/off logging. |
| None. |
Definition at line 10 of file py_utils.cpp.