ppap4lmp
0.7.2
|
StaBeads sets properties for beads using mapping (coarse-graining) scheme for each molecule. More...
#include <sta_beads.h>
Public Member Functions | |
StaBeads (const ElPtr &el_mols, const Vec< Json > &scheme) | |
Constructor of StaBeads class for molecules all of whose type property are 1, or molecules all of which do not have the property. More... | |
StaBeads (const ElPtr &el_mols, const Map< int, Vec< Json >> &schemes) | |
Constructor of StaBeads class for multiple molecular types. More... | |
![]() | |
Updater ()=default | |
Constructor of Updater class. More... | |
![]() | |
Updater ()=default | |
Constructor of Updater class. More... | |
void | compute (const ElPtr &elem, const int elementid, Json &data) |
Managing computation to update Element::data. More... | |
void | remove_from_skippable_elementids (const int elementid) |
Remove Element::elementid from skippable_elementids. More... | |
const ShPtr< Generator > & | get_ext_generator () |
Get ext_generator of this object. More... | |
Protected Member Functions | |
virtual void | compute_impl (Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override |
This method overrides Updater::compute_impl. More... | |
![]() | |
virtual void | compute_body (const ElPtr &elem, Json &data) override |
Compute or parse properties and set them to Element::data given as a mutable reference. More... | |
![]() | |
virtual void | compute_common (const ElPtr &elem, Json &data) |
Common part of compute_body. More... | |
Private Member Functions | |
std::pair< bool, bool > | check_mol_type_to_abst_beads () |
Private Attributes | |
Map< int, Vec< Json > > | mol_type_to_abst_beads |
Additional Inherited Members | |
![]() | |
ShPtr< Generator > | ext_generator |
![]() | |
static const bool | do_sorting_by_id = true |
StaBeads sets properties for beads using mapping (coarse-graining) scheme for each molecule.
An object of this class owns mapping(s) representing coarse-graining scheme(s). Each mapping describes how atoms in a molecule are allocated to beads. Different mapping schemes are acceptable for different molecular types. For each bead, its type and weighting factors of atoms belonging to the bead can be set.
About usage in Python, please see pybind/starters/py_sta_beads.
Definition at line 27 of file sta_beads.h.
Constructor of StaBeads class for molecules all of whose type
property are 1, or molecules all of which do not have the property.
el_mols | A molecular Element object consisting of beads for which an Element object is created with this constructed object. This parameter is assigned to ext_generator.
|
scheme | List of Json (complex of dictionary and list) objects. Each Json object corresponds to each bead in a molecule, and contains three items: indices-in-mol is an array of zero-based index of atoms in the molecule, type is type of the bead, and weights is an array of floats for weighting factors of atoms. This parameter is stored in mol_type_to_abst_beads as a coarse-graining scheme for molecular type 1. |
Definition at line 16 of file sta_beads.cpp.
Constructor of StaBeads class for multiple molecular types.
el_mols | A molecular Element object consisting of beads for which an Element object is created with this constructed object. This parameter is assigned to ext_generator.
|
schemes | Dictionary from molecular type to list of Json (complex of dictionary and list) objects. Each Json object corresponds to each bead in a molecule of that type, and contains three items: indices-in-mol is an array of zero-based index of atoms in the molecule, type is type of the bead, and weights is an array of floats for weighting factors of atoms. This parameter is assigned to mol_type_to_abst_beads. |
Definition at line 26 of file sta_beads.cpp.
|
private |
Check if mol_type_to_abst_beads correctly describes coarse-grain mapping schemes.
type
exists or not, the second is whether weights
exists or not. Note that if at least one of Json objects in mol_type_to_abst_beads has type
(or weights
) property, all the other objects must have that property too. Definition at line 36 of file sta_beads.cpp.
|
overrideprotectedvirtual |
This method overrides Updater::compute_impl.
id
: integermol
: integeratom-ids
: array of integerstype
: integer (optional)atom-weights
: array of floats (optional) Implements Updater.
Definition at line 105 of file sta_beads.cpp.
Coarse-grain mapping schemes for each molecular type. Description of coarse-graining is stored in a Map (dictionary) object from molecular type to a Vec (list) object of Json objects. Each Json object corresponds to each bead in a molecule of that type, and contains three items: indices-in-mol
is an array of zero-based index of atoms in the molecule, type
is type of the bead, and weights
is an array of floats for weighting factors of atoms. The last two items are optional. Length of the two arrays, indices-in-mol
and weights
, should be the same with the number of atoms belonging to the bead.
Definition at line 41 of file sta_beads.h.