Bonds
- class tissue_forge.Bond
Bonds apply a potential to a particular set of particles.
If you’re building a model, you should probably instead be working with a BondHandle.
- static create(potential: _Potential, i: ParticleHandle, j: ParticleHandle, half_life: FPTYPE * = None, dissociation_energy: FPTYPE * = None, flags: uint32_t = 0) TissueForge::BondHandle *
Construct a new bond handle and underlying bond.
Automatically updates when running on a CUDA device.
- Parameters:
potential (
Potential
) – bond potentiali (
ParticleHandle
) – ith particlej (
ParticleHandle
) – jth particlehalf_life (float) – bond half life
dissociation_energy (float) – dissociation energy
flags (int) – bond flags
- toString() std::string
Get a JSON string representation
- static fromString(str: std::string const &) TissueForge::Bond *
Create from a JSON string representation.
The returned bond is not automatically registered with the engine.
- Parameters:
str (string) –
- __reduce__()
Helper for pickle.
- class tissue_forge.BondHandle(*args)
Handle to a bond
This is a safe way to work with a bond.
Overload 1:
Construct a new bond handle and do nothing Subsequent usage will require a call to ‘init’
Overload 2:
Construct a new bond handle from an existing bond id
- Parameters:
id (int) – id of existing bond
Overload 3:
Construct a new bond handle and underlying bond.
Automatically updates when running on a CUDA device.
- Parameters:
potential (
Potential
) – bond potentiali (int) – id of ith particle
j (int) – id of jth particle
half_life (float) – bond half life
bond_energy (float) – bond energy
flags (int) – bond flags
- property length
bond length
- property energy
bond energy
- property parts
bonded particles
- property potential
bond potential
- property id
bond id
- property dissociation_energy
bond dissociation energy
- property half_life
bond half life
- property style
bond style
- property age
bond age
- has(*args) bool
Overload 1: Test whether the bond has an id
Overload 2: Test whether the bond has a particle
- __str__() str
Return str(self).
- __getitem__(index: int)
- __contains__(item)
- __lt__(rhs) bool
Return self<value.
- __gt__(rhs) bool
Return self>value.
- __le__(rhs) bool
Return self<=value.
- __ge__(rhs) bool
Return self>=value.
- __eq__(rhs) bool
Return self==value.
- __ne__(rhs) bool
Return self!=value.
- static pairwise(pot: _Potential, parts: ParticleList, cutoff: FPTYPE const &, ppairs: vectorPairParticleType_ParticleType, half_life: FPTYPE const &, bond_energy: FPTYPE const &, flags: uint32_t) std::vector< TissueForge::BondHandle,std::allocator< TissueForge::BondHandle > >
Apply bonds to a list of particles.
Automatically updates when running on a CUDA device.
- Parameters:
pot (
Potential
) – the potential of the created bondsparts (
ParticleList
) – list of particlescutoff (float) – cutoff distance of particles that are bonded
ppairs (std::vector< std::pair< TissueForge::ParticleType *,TissueForge::ParticleType * > *,std::allocator< std::pair< TissueForge::ParticleType *,TissueForge::ParticleType * > * > >) – type pairs of bonds
half_life (float) – bond half life
bond_energy (float) – bond energy
flags (int) – bond flags
- Return type:
std::vector< TissueForge::BondHandle,std::allocator< TissueForge::BondHandle > >
- Returns:
created bonds
- destroy() HRESULT
Destroy the bond.
Automatically updates when running on a CUDA device.
- static items() std::vector< TissueForge::BondHandle,std::allocator< TissueForge::BondHandle > >
Gets all bonds in the universe
- decays() bool
Tests whether this bond decays
- Return type:
boolean
- Returns:
true when the bond should decay
- class tissue_forge.Angle
A bond concerning an angle
If you’re building a model, you should probably instead be working with a AngleHandle.
- static create(potential: _Potential, p1: ParticleHandle, p2: ParticleHandle, p3: ParticleHandle, flags: uint32_t = 0) TissueForge::AngleHandle *
Creates an angle bond.
Automatically updates when running on a CUDA device.
- Parameters:
potential (
Potential
) – potential of the bondp1 (
ParticleHandle
) – first outer particlep2 (
ParticleHandle
) – center particlep3 (
ParticleHandle
) – second outer particleflags (int) – angle flags
- Return type:
- Returns:
AngleHandle*
- toString() std::string
Get a JSON string representation
- static fromString(str: std::string const &) TissueForge::Angle *
Create from a JSON string representation.
The returned angle is not automatically registered with the engine.
- Parameters:
str (string) –
- __reduce__()
Helper for pickle.
- class tissue_forge.AngleHandle(*args)
A handle to an angle bond
This is a safe way to work with an angle bond.
Construct a new angle handle from an existing angle id
- Parameters:
id – id of existing angle
- property angle
angle angle
- property energy
angle energy
- property parts
bonded particles
- property potential
angle potential
- property id
angle id
- property dissociation_energy
bond dissociation energy
- property half_life
angle half life
- property style
angle style
- property age
angle age
- has(*args) bool
Overload 1: Test whether the bond has an id
Overload 2: Test whether the bond has a particle
- __str__() str
Return str(self).
- __getitem__(index: int)
- __contains__(item)
- __lt__(rhs) bool
Return self<value.
- __gt__(rhs) bool
Return self>value.
- __le__(rhs) bool
Return self<=value.
- __ge__(rhs) bool
Return self>=value.
- __eq__(rhs) bool
Return self==value.
- __ne__(rhs) bool
Return self!=value.
- get() TissueForge::Angle *
Gets the angle of this handle
- Return type:
- Returns:
angle, if available
- destroy() HRESULT
Destroy the angle.
Automatically updates when running on a CUDA device.
- static items() std::vector< TissueForge::AngleHandle,std::allocator< TissueForge::AngleHandle > >
Gets all angles in the universe
- decays() bool
Tests whether this bond decays
- Return type:
boolean
- Returns:
true when the bond should decay
- class tissue_forge.Dihedral
The dihedral structure
- static create(potential: _Potential, p1: ParticleHandle, p2: ParticleHandle, p3: ParticleHandle, p4: ParticleHandle) TissueForge::DihedralHandle *
Creates a dihedral bond
- Parameters:
potential (
Potential
) – potential of the bondp1 (
ParticleHandle
) – first outer particlep2 (
ParticleHandle
) – first center particlep3 (
ParticleHandle
) – second center particlep4 (
ParticleHandle
) – second outer particle
- Return type:
- Returns:
DihedralHandle*
- toString() std::string
Get a JSON string representation
- static fromString(str: std::string const &) TissueForge::Dihedral *
Create from a JSON string representation.
The returned dihedral is not automatically registered with the engine.
- Parameters:
str (string) –
- __reduce__()
Helper for pickle.
- class tissue_forge.DihedralHandle(*args)
A handle to a dihedral bond
This is a safe way to work with a dihedral bond.
Construct a new dihedral handle from an existing dihedral id
- Parameters:
id – id of existing dihedral
- property angle
dihedral angle
- property energy
dihedral energy
- property parts
bonded particles
- property potential
dihedral potential
- property id
dihedral id
- property dissociation_energy
bond dissociation energy
- property half_life
dihedral half life
- property style
dihedral style
- property age
dihedral age
- get() TissueForge::Dihedral *
Gets the dihedral of this handle
- Return type:
- Returns:
dihedral, if available
- has(*args) bool
Overload 1: Test whether the bond has an id
Overload 2: Test whether the bond has a particle
- __str__() str
Return str(self).
- __getitem__(index: int)
- __contains__(item)
- __lt__(rhs) bool
Return self<value.
- __gt__(rhs) bool
Return self>value.
- __le__(rhs) bool
Return self<=value.
- __ge__(rhs) bool
Return self>=value.
- __eq__(rhs) bool
Return self==value.
- __ne__(rhs) bool
Return self!=value.
- destroy() HRESULT
Destroy the dihedral
- static items() std::vector< TissueForge::DihedralHandle,std::allocator< TissueForge::DihedralHandle > >
Gets all dihedrals in the universe
- decays() bool
Tests whether this bond decays
- Return type:
boolean
- Returns:
true when the bond should decay