|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
Handle to a bond. More...
#include <tfBond.h>
Public Member Functions | |
| TissueForge::Bond * | get () |
| Gets the underlying bond. | |
| BondHandle () | |
| Construct a new bond handle and do nothing Subsequent usage will require a call to 'init'. | |
| BondHandle (int id) | |
| Construct a new bond handle from an existing bond id. | |
| BondHandle (struct TissueForge::Potential *potential, int32_t i, int32_t j, FPTYPE half_life, FPTYPE bond_energy, uint32_t flags) | |
| Construct a new bond handle and underlying bond. | |
| HRESULT | init (TissueForge::Potential *pot, TissueForge::ParticleHandle *p1, TissueForge::ParticleHandle *p2, const FPTYPE &half_life=-FPTYPE_ONE, const FPTYPE &bond_energy=-FPTYPE_ONE, uint32_t flags=0) |
| For initializing a bond after constructing with default constructor. | |
| std::string | str () const |
| Get a summary string of the bond. | |
| bool | check () |
| Check the validity of the handle. | |
| HRESULT | destroy () |
| Destroy the bond. | |
| bool | decays () |
| Tests whether this bond decays. | |
| TissueForge::ParticleHandle * | operator[] (unsigned int index) |
| bool | has (const int32_t &pid) |
| bool | has (ParticleHandle *part) |
| FloatP_t | getLength () |
| FPTYPE | getEnergy () |
| std::vector< int32_t > | getParts () |
| ParticleList | getPartList () |
| TissueForge::Potential * | getPotential () |
| uint32_t | getId () |
| FPTYPE | getDissociationEnergy () |
| void | setDissociationEnergy (const FPTYPE &dissociation_energy) |
| FPTYPE | getHalfLife () |
| void | setHalfLife (const FPTYPE &half_life) |
| rendering::Style * | getStyle () |
| void | setStyle (rendering::Style *style) |
| FPTYPE | getAge () |
Static Public Member Functions | |
| static std::vector< BondHandle > | pairwise (TissueForge::Potential *pot, TissueForge::ParticleList &parts, const FPTYPE &cutoff, std::vector< std::pair< TissueForge::ParticleType *, TissueForge::ParticleType * > * > *ppairs, const FPTYPE &half_life, const FPTYPE &bond_energy, uint32_t flags) |
| Apply bonds to a list of particles. | |
| static std::vector< BondHandle > | items () |
| Gets all bonds in the universe. | |
Public Attributes | |
| int32_t | id |
Handle to a bond.
This is a safe way to work with a bond.
| TissueForge::BondHandle::BondHandle | ( | int | id | ) |
Construct a new bond handle from an existing bond id.
| id | id of existing bond |
| TissueForge::BondHandle::BondHandle | ( | struct TissueForge::Potential * | potential, |
| int32_t | i, | ||
| int32_t | j, | ||
| FPTYPE | half_life, | ||
| FPTYPE | bond_energy, | ||
| uint32_t | flags ) |
Construct a new bond handle and underlying bond.
Automatically updates when running on a CUDA device.
| potential | bond potential |
| i | id of ith particle |
| j | id of jth particle |
| half_life | bond half life |
| bond_energy | bond energy |
| flags | bond flags |
| bool TissueForge::BondHandle::check | ( | ) |
Check the validity of the handle.
| bool TissueForge::BondHandle::decays | ( | ) |
Tests whether this bond decays.
| HRESULT TissueForge::BondHandle::destroy | ( | ) |
Destroy the bond.
Automatically updates when running on a CUDA device.
| TissueForge::Bond * TissueForge::BondHandle::get | ( | ) |
Gets the underlying bond.
| FPTYPE TissueForge::BondHandle::getAge | ( | ) |
Get the age
| FPTYPE TissueForge::BondHandle::getDissociationEnergy | ( | ) |
Get the dissociation energy
| FPTYPE TissueForge::BondHandle::getEnergy | ( | ) |
Get the energy
| FPTYPE TissueForge::BondHandle::getHalfLife | ( | ) |
Get the half life
| uint32_t TissueForge::BondHandle::getId | ( | ) |
Get the id
| FloatP_t TissueForge::BondHandle::getLength | ( | ) |
Get the current length
| ParticleList TissueForge::BondHandle::getPartList | ( | ) |
Get the particle list
| std::vector< int32_t > TissueForge::BondHandle::getParts | ( | ) |
Get the particle ids
| TissueForge::Potential * TissueForge::BondHandle::getPotential | ( | ) |
Get the potential
| rendering::Style * TissueForge::BondHandle::getStyle | ( | ) |
Get the style
| bool TissueForge::BondHandle::has | ( | const int32_t & | pid | ) |
Test whether the bond has an id
| bool TissueForge::BondHandle::has | ( | ParticleHandle * | part | ) |
Test whether the bond has a particle
| HRESULT TissueForge::BondHandle::init | ( | TissueForge::Potential * | pot, |
| TissueForge::ParticleHandle * | p1, | ||
| TissueForge::ParticleHandle * | p2, | ||
| const FPTYPE & | half_life = -FPTYPE_ONE, | ||
| const FPTYPE & | bond_energy = -FPTYPE_ONE, | ||
| uint32_t | flags = 0 ) |
For initializing a bond after constructing with default constructor.
Automatically updates when running on a CUDA device.
| pot | bond potential |
| p1 | ith particle |
| p2 | jth particle |
| half_life | bond half life |
| bond_energy | bond energy |
| flags | bond flags |
|
static |
Apply bonds to a list of particles.
Automatically updates when running on a CUDA device.
| pot | the potential of the created bonds |
| parts | list of particles |
| cutoff | cutoff distance of particles that are bonded |
| ppairs | type pairs of bonds |
| half_life | bond half life |
| bond_energy | bond energy |
| flags | bond flags |
| void TissueForge::BondHandle::setDissociationEnergy | ( | const FPTYPE & | dissociation_energy | ) |
Set the dissociation energy
| void TissueForge::BondHandle::setHalfLife | ( | const FPTYPE & | half_life | ) |
Set the half life
| void TissueForge::BondHandle::setStyle | ( | rendering::Style * | style | ) |
Set the style