ppap4lmp  0.7.2
AddSpecialBonds Class Reference

AddSpecialBonds adds special bonds. More...

#include <add_special_bonds.h>

Inheritance diagram for AddSpecialBonds:
Collaboration diagram for AddSpecialBonds:

Public Member Functions

 AddSpecialBonds (const ElPtr &el_mols, const Vec< Vec< int >> &scheme)
 Constructor of AddSpecialBonds class for molecules all of whose type property are 1, or molecules all of which do not have the property. More...
 
 AddSpecialBonds (const ElPtr &el_mols, const Map< int, Vec< Vec< int >>> &type_to_scheme)
 Constructor of AddSpecialBonds class for multiple molecular types. More...
 
- Public Member Functions inherited from Adder
 Updater ()=default
 Constructor of Updater class. More...
 
- Public Member Functions inherited from Updater
 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...
 
- Protected Member Functions inherited from Adder
virtual void compute_body (const ElPtr &elem, Json &data) override
 Compute properties and add them to Element::data given as a mutable reference. More...
 
- Protected Member Functions inherited from Updater
virtual void compute_common (const ElPtr &elem, Json &data)
 Common part of compute_body. More...
 

Private Attributes

Map< int, Vec< Vec< int > > > mol_type_to_sbonds_list_in_mol
 

Additional Inherited Members

- Protected Attributes inherited from Updater
ShPtr< Generatorext_generator
 

Detailed Description

AddSpecialBonds adds special bonds.

The term special bonds is somewhat confusing because one of special bonds is not a bond but, for example, an atom connected with a special bond. If an atom has another atom as one of its special bonds, the two atoms are considered to interact with each other through some kind of bonded potential(s).

An object of this class has a molecular Element object as ext_generator, and is appended to an atomic (or bead) Element object. The object of this class owns schemes for special bonds for each type of molecule; a scheme is something like a list of special bonds of each atom in one molecule.

About usage in Python, please see pybind::py_add_special_bonds.

Definition at line 32 of file add_special_bonds.h.

Constructor & Destructor Documentation

◆ AddSpecialBonds() [1/2]

AddSpecialBonds::AddSpecialBonds ( const ElPtr el_mols,
const Vec< Vec< int >> &  scheme 
)

Constructor of AddSpecialBonds class for molecules all of whose type property are 1, or molecules all of which do not have the property.

Parameters
el_mols

A molecular Element object consisting of an atomic (or bead) Element object where the constructed object is appended to. This parameter is assigned to ext_generator.

Required property
  • atom-ids : array of integers

schemeList of lists of zero-based indices of atoms in a molecule. The first list corresponds atoms in a molecule, and the second lists corresponds special bonds of each atom. This parameter is stored in mol_type_to_sbonds_list_in_mol as a scheme for molecular type 1.

Definition at line 17 of file add_special_bonds.cpp.

◆ AddSpecialBonds() [2/2]

AddSpecialBonds::AddSpecialBonds ( const ElPtr el_mols,
const Map< int, Vec< Vec< int >>> &  type_to_scheme 
)

Constructor of AddSpecialBonds class for multiple molecular types.

Parameters
el_mols

A molecular Element object consisting of an atomic (or bead) Element object where the constructed object is appended to. This parameter is assigned to ext_generator.

Required property
  • atom-ids : array of integers

type_to_schemeDictionary from molecular type to list of lists of zero-based indices of atoms in a molecule. The first list corresponds atoms in a molecule, and the second lists corresponds special bonds of each atom. This parameter is assigned to mol_type_to_sbonds_list_in_mol.

Definition at line 27 of file add_special_bonds.cpp.

Member Function Documentation

◆ compute_impl()

void AddSpecialBonds::compute_impl ( Json data,
JsonToVoidFunc  check_required_keys,
JsonToBoolFunc  check_optional_keys 
)
overrideprotectedvirtual

This method overrides Updater::compute_impl.

Property to be added
  • special-bonds : array of integers

Implements Updater.

Definition at line 37 of file add_special_bonds.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ mol_type_to_sbonds_list_in_mol

Map<int,Vec<Vec<int> > > AddSpecialBonds::mol_type_to_sbonds_list_in_mol
private

Schemes of special bonds for each molecular type contained in a Map (dictionary) object from molecular type to a list of lists of zero-based indices of atoms in a molecule of that type. The first list corresponds atoms in a molecule, and the second lists corresponds special bonds of each atom.

Definition at line 41 of file add_special_bonds.h.


The documentation for this class was generated from the following files: