Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCBond.h File Reference
#include "tf_port_c.h"
#include "tfCParticle.h"
#include "tfCPotential.h"
Include dependency graph for tfCBond.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tfBondHandleHandle
 Handle to a BondHandle instance. More...
 
struct  tfAngleHandleHandle
 Handle to a AngleHandle instance. More...
 
struct  tfDihedralHandleHandle
 Handle to a DihedralHandle instance. More...
 

Functions

HRESULT tfBondHandle_init (struct tfBondHandleHandle *handle, unsigned int id)
 Construct a new bond handle from an existing bond id.
 
HRESULT tfBondHandle_create (struct tfBondHandleHandle *handle, struct tfPotentialHandle *potential, struct tfParticleHandleHandle *i, struct tfParticleHandleHandle *j)
 Construct a new bond handle and underlying bond.
 
HRESULT tfBondHandle_getId (struct tfBondHandleHandle *handle, int *id)
 Get the id. Returns -1 if the underlying bond is invalid.
 
HRESULT tfBondHandle_str (struct tfBondHandleHandle *handle, char **str, unsigned int *numChars)
 Get a summary string of the bond.
 
HRESULT tfBondHandle_check (struct tfBondHandleHandle *handle, bool *flag)
 Check the validity of the handle.
 
HRESULT tfBondHandle_destroy (struct tfBondHandleHandle *handle)
 Destroy the bond.
 
HRESULT tfBondHandle_decays (struct tfBondHandleHandle *handle, bool *flag)
 Tests whether this bond decays.
 
HRESULT tfBondHandle_hasPartId (struct tfBondHandleHandle *handle, int pid, bool *result)
 Test whether the bond has an id.
 
HRESULT tfBondHandle_hasPart (struct tfBondHandleHandle *handle, struct tfParticleHandleHandle *part, bool *result)
 Test whether the bond has a particle.
 
HRESULT tfBondHandle_getEnergy (struct tfBondHandleHandle *handle, tfFloatP_t *value)
 Get the current energy of the bond.
 
HRESULT tfBondHandle_getParts (struct tfBondHandleHandle *handle, int *parti, int *partj)
 Get the ids of the particles of the bond.
 
HRESULT tfBondHandle_getPartList (struct tfBondHandleHandle *handle, struct tfParticleListHandle *plist)
 Get a list of the particles of the bond.
 
HRESULT tfBondHandle_getPotential (struct tfBondHandleHandle *handle, struct tfPotentialHandle *potential)
 Get the potential of the bond.
 
HRESULT tfBondHandle_getDissociationEnergy (struct tfBondHandleHandle *handle, tfFloatP_t *value)
 Get the dissociation energy.
 
HRESULT tfBondHandle_setDissociationEnergy (struct tfBondHandleHandle *handle, tfFloatP_t value)
 Set the dissociation energy.
 
HRESULT tfBondHandle_getHalfLife (struct tfBondHandleHandle *handle, tfFloatP_t *value)
 Get the half life.
 
HRESULT tfBondHandle_setHalfLife (struct tfBondHandleHandle *handle, tfFloatP_t value)
 Set the half life.
 
HRESULT tfBondHandle_setActive (struct tfBondHandleHandle *handle, bool flag)
 Set whether a bond is active.
 
HRESULT tfBondHandle_getStyle (struct tfBondHandleHandle *handle, struct tfRenderingStyleHandle *style)
 Get the bond style.
 
HRESULT tfBondHandle_setStyle (struct tfBondHandleHandle *handle, struct tfRenderingStyleHandle *style)
 Set the bond style.
 
HRESULT tfBondHandle_getStyleDef (struct tfRenderingStyleHandle *style)
 Get the default bond style.
 
HRESULT tfBondHandle_getAge (struct tfBondHandleHandle *handle, tfFloatP_t *value)
 Get the age of the bond.
 
HRESULT tfBondHandle_toString (struct tfBondHandleHandle *handle, char **str, unsigned int *numChars)
 Get a JSON string representation.
 
HRESULT tfBondHandle_fromString (struct tfBondHandleHandle *handle, const char *str)
 Create from a JSON string representation.
 
HRESULT tfBondHandle_lt (struct tfBondHandleHandle *lhs, struct tfBondHandleHandle *rhs, bool *result)
 
HRESULT tfBondHandle_gt (struct tfBondHandleHandle *lhs, struct tfBondHandleHandle *rhs, bool *result)
 
HRESULT tfBondHandle_le (struct tfBondHandleHandle *lhs, struct tfBondHandleHandle *rhs, bool *result)
 
HRESULT tfBondHandle_ge (struct tfBondHandleHandle *lhs, struct tfBondHandleHandle *rhs, bool *result)
 
HRESULT tfBondHandle_eq (struct tfBondHandleHandle *lhs, struct tfBondHandleHandle *rhs, bool *result)
 
HRESULT tfBondHandle_ne (struct tfBondHandleHandle *lhs, struct tfBondHandleHandle *rhs, bool *result)
 
HRESULT tfAngleHandle_init (struct tfAngleHandleHandle *handle, unsigned int id)
 Construct a new angle handle from an existing angle id.
 
HRESULT tfAngleHandle_create (struct tfAngleHandleHandle *handle, struct tfPotentialHandle *potential, struct tfParticleHandleHandle *i, struct tfParticleHandleHandle *j, struct tfParticleHandleHandle *k)
 Construct a new angle handle and underlying angle.
 
HRESULT tfAngleHandle_str (struct tfAngleHandleHandle *handle, char **str, unsigned int *numChars)
 Get a summary string of the angle.
 
HRESULT tfAngleHandle_check (struct tfAngleHandleHandle *handle, bool *flag)
 Check the validity of the handle.
 
HRESULT tfAngleHandle_destroy (struct tfAngleHandleHandle *handle)
 Destroy the angle.
 
HRESULT tfAngleHandle_decays (struct tfAngleHandleHandle *handle, bool *flag)
 Tests whether this angle decays.
 
HRESULT tfAngleHandle_hasPartId (struct tfAngleHandleHandle *handle, int pid, bool *result)
 Test whether the bond has an id.
 
HRESULT tfAngleHandle_hasPart (struct tfAngleHandleHandle *handle, struct tfParticleHandleHandle *part, bool *result)
 Test whether the bond has a particle.
 
HRESULT tfAngleHandle_getEnergy (struct tfAngleHandleHandle *handle, tfFloatP_t *value)
 Get the current energy of the angle.
 
HRESULT tfAngleHandle_getParts (struct tfAngleHandleHandle *handle, int *parti, int *partj)
 Get the ids of the particles of the angle.
 
HRESULT tfAngleHandle_getPartList (struct tfAngleHandleHandle *handle, struct tfParticleListHandle *plist)
 Get a list of the particles of the angle.
 
HRESULT tfAngleHandle_getPotential (struct tfAngleHandleHandle *handle, struct tfPotentialHandle *potential)
 Get the potential of the angle.
 
HRESULT tfAngleHandle_getDissociationEnergy (struct tfAngleHandleHandle *handle, tfFloatP_t *value)
 Get the dissociation energy.
 
HRESULT tfAngleHandle_setDissociationEnergy (struct tfAngleHandleHandle *handle, tfFloatP_t value)
 Set the dissociation energy.
 
HRESULT tfAngleHandle_getHalfLife (struct tfAngleHandleHandle *handle, tfFloatP_t *value)
 Get the half life.
 
HRESULT tfAngleHandle_setHalfLife (struct tfAngleHandleHandle *handle, tfFloatP_t value)
 Set the half life.
 
HRESULT tfAngleHandle_setActive (struct tfAngleHandleHandle *handle, bool flag)
 Set whether a angle is active.
 
HRESULT tfAngleHandle_getStyle (struct tfAngleHandleHandle *handle, struct tfRenderingStyleHandle *style)
 Get the angle style.
 
HRESULT tfAngleHandle_setStyle (struct tfAngleHandleHandle *handle, struct tfRenderingStyleHandle *style)
 Set the angle style.
 
HRESULT tfAngleHandle_getStyleDef (struct tfRenderingStyleHandle *style)
 Get the angle style.
 
HRESULT tfAngleHandle_getAge (struct tfAngleHandleHandle *handle, tfFloatP_t *value)
 Get the age of the angle.
 
HRESULT tfAngleHandle_toString (struct tfAngleHandleHandle *handle, char **str, unsigned int *numChars)
 Get a JSON string representation.
 
HRESULT tfAngleHandle_fromString (struct tfAngleHandleHandle *handle, const char *str)
 Create from a JSON string representation.
 
HRESULT tfAngleHandle_lt (struct tfAngleHandleHandle *lhs, struct tfAngleHandleHandle *rhs, bool *result)
 
HRESULT tfAngleHandle_gt (struct tfAngleHandleHandle *lhs, struct tfAngleHandleHandle *rhs, bool *result)
 
HRESULT tfAngleHandle_le (struct tfAngleHandleHandle *lhs, struct tfAngleHandleHandle *rhs, bool *result)
 
HRESULT tfAngleHandle_ge (struct tfAngleHandleHandle *lhs, struct tfAngleHandleHandle *rhs, bool *result)
 
HRESULT tfAngleHandle_eq (struct tfAngleHandleHandle *lhs, struct tfAngleHandleHandle *rhs, bool *result)
 
HRESULT tfAngleHandle_ne (struct tfAngleHandleHandle *lhs, struct tfAngleHandleHandle *rhs, bool *result)
 
HRESULT tfDihedralHandle_init (struct tfDihedralHandleHandle *handle, unsigned int id)
 Construct a new dihedral handle from an existing dihedral id.
 
HRESULT tfDihedralHandle_create (struct tfDihedralHandleHandle *handle, struct tfPotentialHandle *potential, struct tfParticleHandleHandle *i, struct tfParticleHandleHandle *j, struct tfParticleHandleHandle *k, struct tfParticleHandleHandle *l)
 Construct a new dihedral handle and underlying dihedral.
 
HRESULT tfDihedralHandle_str (struct tfDihedralHandleHandle *handle, char **str, unsigned int *numChars)
 Get a summary string of the dihedral.
 
HRESULT tfDihedralHandle_check (struct tfDihedralHandleHandle *handle, bool *flag)
 Check the validity of the handle.
 
HRESULT tfDihedralHandle_destroy (struct tfDihedralHandleHandle *handle)
 Destroy the angle.
 
HRESULT tfDihedralHandle_decays (struct tfDihedralHandleHandle *handle, bool *flag)
 Tests whether this dihedral decays.
 
HRESULT tfDihedralHandle_hasPartId (struct tfDihedralHandleHandle *handle, int pid, bool *result)
 Test whether the bond has an id.
 
HRESULT tfDihedralHandle_hasPart (struct tfDihedralHandleHandle *handle, struct tfParticleHandleHandle *part, bool *result)
 Test whether the bond has a particle.
 
HRESULT tfDihedralHandle_getEnergy (struct tfDihedralHandleHandle *handle, tfFloatP_t *value)
 Get the current energy of the dihedral.
 
HRESULT tfDihedralHandle_getParts (struct tfDihedralHandleHandle *handle, int *parti, int *partj)
 Get the ids of the particles of the dihedral.
 
HRESULT tfDihedralHandle_getPartList (struct tfDihedralHandleHandle *handle, struct tfParticleListHandle *plist)
 Get a list of the particles of the dihedral.
 
HRESULT tfDihedralHandle_getPotential (struct tfDihedralHandleHandle *handle, struct tfPotentialHandle *potential)
 Get the potential of the dihedral.
 
HRESULT tfDihedralHandle_getDissociationEnergy (struct tfDihedralHandleHandle *handle, tfFloatP_t *value)
 Get the dissociation energy.
 
HRESULT tfDihedralHandle_setDissociationEnergy (struct tfDihedralHandleHandle *handle, tfFloatP_t value)
 Set the dissociation energy.
 
HRESULT tfDihedralHandle_getHalfLife (struct tfDihedralHandleHandle *handle, tfFloatP_t *value)
 Get the half life.
 
HRESULT tfDihedralHandle_setHalfLife (struct tfDihedralHandleHandle *handle, tfFloatP_t value)
 Set the half life.
 
HRESULT tfDihedralHandle_setActive (struct tfDihedralHandleHandle *handle, bool flag)
 Set whether a dihedral is active.
 
HRESULT tfDihedralHandle_getStyle (struct tfDihedralHandleHandle *handle, struct tfRenderingStyleHandle *style)
 Get the dihedral style.
 
HRESULT tfDihedralHandle_setStyle (struct tfDihedralHandleHandle *handle, struct tfRenderingStyleHandle *style)
 Set the dihedral style.
 
HRESULT tfDihedralHandle_getStyleDef (struct tfRenderingStyleHandle *style)
 Get the dihedral style.
 
HRESULT tfDihedralHandle_getAge (struct tfDihedralHandleHandle *handle, tfFloatP_t *value)
 Get the age of the dihedral.
 
HRESULT tfDihedralHandle_toString (struct tfDihedralHandleHandle *handle, char **str, unsigned int *numChars)
 Get a JSON string representation.
 
HRESULT tfDihedralHandle_fromString (struct tfDihedralHandleHandle *handle, const char *str)
 Create from a JSON string representation.
 
HRESULT tfDihedralHandle_lt (struct tfDihedralHandleHandle *lhs, struct tfDihedralHandleHandle *rhs, bool *result)
 
HRESULT tfDihedralHandle_gt (struct tfDihedralHandleHandle *lhs, struct tfDihedralHandleHandle *rhs, bool *result)
 
HRESULT tfDihedralHandle_le (struct tfDihedralHandleHandle *lhs, struct tfDihedralHandleHandle *rhs, bool *result)
 
HRESULT tfDihedralHandle_ge (struct tfDihedralHandleHandle *lhs, struct tfDihedralHandleHandle *rhs, bool *result)
 
HRESULT tfDihedralHandle_eq (struct tfDihedralHandleHandle *lhs, struct tfDihedralHandleHandle *rhs, bool *result)
 
HRESULT tfDihedralHandle_ne (struct tfDihedralHandleHandle *lhs, struct tfDihedralHandleHandle *rhs, bool *result)
 
HRESULT tfBondHandle_getAll (struct tfBondHandleHandle **handles, unsigned int *numBonds)
 Gets all bonds in the universe.
 
HRESULT tfBond_pairwise (struct tfPotentialHandle *pot, struct tfParticleListHandle *parts, tfFloatP_t cutoff, struct tfParticleTypeHandle *ppairsA, struct tfParticleTypeHandle *ppairsB, unsigned int numTypePairs, tfFloatP_t *half_life, tfFloatP_t *bond_energy, struct tfBondHandleHandle **bonds, unsigned int *numBonds)
 Apply bonds to a list of particles.
 
HRESULT tfBond_getIdsForParticle (unsigned int pid, unsigned int **bids, unsigned int *numIds)
 Find all the bonds that interact with the given particle id.
 
HRESULT tfBond_destroyAll ()
 Deletes all bonds in the universe.
 
HRESULT tfAngleHandle_getAll (struct tfAngleHandleHandle **handles, unsigned int *numBonds)
 Gets all bonds in the universe.
 
HRESULT tfAngle_getIdsForParticle (unsigned int pid, unsigned int **bids, unsigned int *numIds)
 Find all the bonds that interact with the given particle id.
 
HRESULT tfAngle_destroyAll ()
 Deletes all bonds in the universe.
 
HRESULT tfDihedralHandle_getAll (struct tfDihedralHandleHandle **handles, unsigned int *numBonds)
 Gets all bonds in the universe.
 
HRESULT tfDihedral_getIdsForParticle (unsigned int pid, unsigned int **bids, unsigned int *numIds)
 Find all the bonds that interact with the given particle id.
 
HRESULT tfDihedral_destroyAll ()
 Deletes all bonds in the universe.
 

Function Documentation

◆ tfAngle_destroyAll()

HRESULT tfAngle_destroyAll ( )

Deletes all bonds in the universe.

Automatically updates when running on a CUDA device.

Returns
S_OK on success

◆ tfAngle_getIdsForParticle()

HRESULT tfAngle_getIdsForParticle ( unsigned int pid,
unsigned int ** bids,
unsigned int * numIds )

Find all the bonds that interact with the given particle id.

Parameters
pidparticle id
bidsbond ids
numIdsnumber of bonds
Returns
S_OK on success

◆ tfAngleHandle_check()

HRESULT tfAngleHandle_check ( struct tfAngleHandleHandle * handle,
bool * flag )

Check the validity of the handle.

Parameters
handlepopulated handle
flagtrue if OK
Returns
S_OK on success

◆ tfAngleHandle_create()

HRESULT tfAngleHandle_create ( struct tfAngleHandleHandle * handle,
struct tfPotentialHandle * potential,
struct tfParticleHandleHandle * i,
struct tfParticleHandleHandle * j,
struct tfParticleHandleHandle * k )

Construct a new angle handle and underlying angle.

Parameters
handlehandle to populate
potentialangle potential
iith particle
jjth particle
kkth particle
Returns
S_OK on success

◆ tfAngleHandle_decays()

HRESULT tfAngleHandle_decays ( struct tfAngleHandleHandle * handle,
bool * flag )

Tests whether this angle decays.

Parameters
handlepopulated handle
flagtrue when the angle should decay
Returns
S_OK on success

◆ tfAngleHandle_destroy()

HRESULT tfAngleHandle_destroy ( struct tfAngleHandleHandle * handle)

Destroy the angle.

Returns
S_OK on success

◆ tfAngleHandle_eq()

HRESULT tfAngleHandle_eq ( struct tfAngleHandleHandle * lhs,
struct tfAngleHandleHandle * rhs,
bool * result )

Test whether lhs == rhs

◆ tfAngleHandle_fromString()

HRESULT tfAngleHandle_fromString ( struct tfAngleHandleHandle * handle,
const char * str )

Create from a JSON string representation.

Returns
S_OK on success

◆ tfAngleHandle_ge()

HRESULT tfAngleHandle_ge ( struct tfAngleHandleHandle * lhs,
struct tfAngleHandleHandle * rhs,
bool * result )

Test whether lhs >= rhs

◆ tfAngleHandle_getAge()

HRESULT tfAngleHandle_getAge ( struct tfAngleHandleHandle * handle,
tfFloatP_t * value )

Get the age of the angle.

Parameters
handlepopulated handle
valueangle age
Returns
S_OK on success

◆ tfAngleHandle_getAll()

HRESULT tfAngleHandle_getAll ( struct tfAngleHandleHandle ** handles,
unsigned int * numBonds )

Gets all bonds in the universe.

Parameters
handles
numBondsnumber of bonds
Returns
S_OK on success

◆ tfAngleHandle_getDissociationEnergy()

HRESULT tfAngleHandle_getDissociationEnergy ( struct tfAngleHandleHandle * handle,
tfFloatP_t * value )

Get the dissociation energy.

Parameters
handlepopulated handle
valuedissociation energy; -1 if not defined
Returns
S_OK on success

◆ tfAngleHandle_getEnergy()

HRESULT tfAngleHandle_getEnergy ( struct tfAngleHandleHandle * handle,
tfFloatP_t * value )

Get the current energy of the angle.

Parameters
handlepopulated handle
valuecurrent energy
Returns
S_OK on success

◆ tfAngleHandle_getHalfLife()

HRESULT tfAngleHandle_getHalfLife ( struct tfAngleHandleHandle * handle,
tfFloatP_t * value )

Get the half life.

Parameters
handlepopulated handle
valuehalf life; -1 if not defined
Returns
S_OK on success

◆ tfAngleHandle_getPartList()

HRESULT tfAngleHandle_getPartList ( struct tfAngleHandleHandle * handle,
struct tfParticleListHandle * plist )

Get a list of the particles of the angle.

Parameters
handlepopulated handle
plisthandle to populate
Returns
S_OK on success

◆ tfAngleHandle_getParts()

HRESULT tfAngleHandle_getParts ( struct tfAngleHandleHandle * handle,
int * parti,
int * partj )

Get the ids of the particles of the angle.

Parameters
handlepopulated handle
partiith particle; -1 if no particle
partjjth particle; -1 if no particle
Returns
S_OK on success

◆ tfAngleHandle_getPotential()

HRESULT tfAngleHandle_getPotential ( struct tfAngleHandleHandle * handle,
struct tfPotentialHandle * potential )

Get the potential of the angle.

Parameters
handlepopulated handle
potentialangle potential
Returns
S_OK on success

◆ tfAngleHandle_getStyle()

HRESULT tfAngleHandle_getStyle ( struct tfAngleHandleHandle * handle,
struct tfRenderingStyleHandle * style )

Get the angle style.

Parameters
handlepopulated handle
styleangle style
Returns
S_OK on success

◆ tfAngleHandle_getStyleDef()

HRESULT tfAngleHandle_getStyleDef ( struct tfRenderingStyleHandle * style)

Get the angle style.

Parameters
styleangle style
Returns
S_OK on success

◆ tfAngleHandle_gt()

HRESULT tfAngleHandle_gt ( struct tfAngleHandleHandle * lhs,
struct tfAngleHandleHandle * rhs,
bool * result )

Test whether lhs > rhs

◆ tfAngleHandle_hasPart()

HRESULT tfAngleHandle_hasPart ( struct tfAngleHandleHandle * handle,
struct tfParticleHandleHandle * part,
bool * result )

Test whether the bond has a particle.

Parameters
handlepopulated handle
partparticle to test
resultresult of test
Returns
S_OK on success

◆ tfAngleHandle_hasPartId()

HRESULT tfAngleHandle_hasPartId ( struct tfAngleHandleHandle * handle,
int pid,
bool * result )

Test whether the bond has an id.

Parameters
handlepopulated handle
pidid to test
resultresult of test
Returns
S_OK on success

◆ tfAngleHandle_init()

HRESULT tfAngleHandle_init ( struct tfAngleHandleHandle * handle,
unsigned int id )

Construct a new angle handle from an existing angle id.

Parameters
handlehandle to populate
idid of existing angle
Returns
S_OK on success

◆ tfAngleHandle_le()

HRESULT tfAngleHandle_le ( struct tfAngleHandleHandle * lhs,
struct tfAngleHandleHandle * rhs,
bool * result )

Test whether lhs <= rhs

◆ tfAngleHandle_lt()

HRESULT tfAngleHandle_lt ( struct tfAngleHandleHandle * lhs,
struct tfAngleHandleHandle * rhs,
bool * result )

Test whether lhs < rhs

◆ tfAngleHandle_ne()

HRESULT tfAngleHandle_ne ( struct tfAngleHandleHandle * lhs,
struct tfAngleHandleHandle * rhs,
bool * result )

Test whether lhs != rhs

◆ tfAngleHandle_setActive()

HRESULT tfAngleHandle_setActive ( struct tfAngleHandleHandle * handle,
bool flag )

Set whether a angle is active.

Parameters
handlepopulated handle
flagtrue when active
Returns
S_OK on success

◆ tfAngleHandle_setDissociationEnergy()

HRESULT tfAngleHandle_setDissociationEnergy ( struct tfAngleHandleHandle * handle,
tfFloatP_t value )

Set the dissociation energy.

Parameters
handlepopulated handle
valuedissociation energy
Returns
S_OK on success

◆ tfAngleHandle_setHalfLife()

HRESULT tfAngleHandle_setHalfLife ( struct tfAngleHandleHandle * handle,
tfFloatP_t value )

Set the half life.

Parameters
handlepopulated handle
valuehalf life
Returns
S_OK on success

◆ tfAngleHandle_setStyle()

HRESULT tfAngleHandle_setStyle ( struct tfAngleHandleHandle * handle,
struct tfRenderingStyleHandle * style )

Set the angle style.

Parameters
handlepopulated handle
styleangle style
Returns
S_OK on success

◆ tfAngleHandle_str()

HRESULT tfAngleHandle_str ( struct tfAngleHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a summary string of the angle.

Parameters
handlepopulated handle
strarray to populate
numCharsnumber of array characters
Returns
S_OK on success

◆ tfAngleHandle_toString()

HRESULT tfAngleHandle_toString ( struct tfAngleHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a JSON string representation.

Parameters
handlepopulated handle
strstring representation
numCharsnumber of characters of string representation
Returns
S_OK on success

◆ tfBond_destroyAll()

HRESULT tfBond_destroyAll ( )

Deletes all bonds in the universe.

Automatically updates when running on a CUDA device.

Returns
S_OK on success

◆ tfBond_getIdsForParticle()

HRESULT tfBond_getIdsForParticle ( unsigned int pid,
unsigned int ** bids,
unsigned int * numIds )

Find all the bonds that interact with the given particle id.

Parameters
pidparticle id
bidsbond ids
numIdsnumber of bonds
Returns
S_OK on success

◆ tfBond_pairwise()

HRESULT tfBond_pairwise ( struct tfPotentialHandle * pot,
struct tfParticleListHandle * parts,
tfFloatP_t cutoff,
struct tfParticleTypeHandle * ppairsA,
struct tfParticleTypeHandle * ppairsB,
unsigned int numTypePairs,
tfFloatP_t * half_life,
tfFloatP_t * bond_energy,
struct tfBondHandleHandle ** bonds,
unsigned int * numBonds )

Apply bonds to a list of particles.

Parameters
potthe potential of the created bonds
partslist of particles
cutoffcutoff distance of particles that are bonded
ppairsAfirst elements of type pairs that are bonded
ppairsBsecond elements of type pairs that are bonded
numTypePairsnumber of type pairs
half_lifebond half life, optional
bond_energybond energy, optional
bondscreated bonds
numBondsnumber of created bonds
Returns
S_OK on success

◆ tfBondHandle_check()

HRESULT tfBondHandle_check ( struct tfBondHandleHandle * handle,
bool * flag )

Check the validity of the handle.

Parameters
handlepopulated handle
flagtrue if OK
Returns
S_OK on success

◆ tfBondHandle_create()

HRESULT tfBondHandle_create ( struct tfBondHandleHandle * handle,
struct tfPotentialHandle * potential,
struct tfParticleHandleHandle * i,
struct tfParticleHandleHandle * j )

Construct a new bond handle and underlying bond.

Parameters
handlehandle to populate
potentialbond potential
iith particle
jjth particle
Returns
S_OK on success

◆ tfBondHandle_decays()

HRESULT tfBondHandle_decays ( struct tfBondHandleHandle * handle,
bool * flag )

Tests whether this bond decays.

Parameters
handlepopulated handle
flagtrue when the bond should decay
Returns
S_OK on success

◆ tfBondHandle_destroy()

HRESULT tfBondHandle_destroy ( struct tfBondHandleHandle * handle)

Destroy the bond.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfBondHandle_eq()

HRESULT tfBondHandle_eq ( struct tfBondHandleHandle * lhs,
struct tfBondHandleHandle * rhs,
bool * result )

Test whether lhs == rhs

◆ tfBondHandle_fromString()

HRESULT tfBondHandle_fromString ( struct tfBondHandleHandle * handle,
const char * str )

Create from a JSON string representation.

Returns
S_OK on success

◆ tfBondHandle_ge()

HRESULT tfBondHandle_ge ( struct tfBondHandleHandle * lhs,
struct tfBondHandleHandle * rhs,
bool * result )

Test whether lhs >= rhs

◆ tfBondHandle_getAge()

HRESULT tfBondHandle_getAge ( struct tfBondHandleHandle * handle,
tfFloatP_t * value )

Get the age of the bond.

Parameters
handlepopulated handle
valuebond age
Returns
S_OK on success

◆ tfBondHandle_getAll()

HRESULT tfBondHandle_getAll ( struct tfBondHandleHandle ** handles,
unsigned int * numBonds )

Gets all bonds in the universe.

Parameters
handles
numBondsnumber of bonds
Returns
S_OK on success

◆ tfBondHandle_getDissociationEnergy()

HRESULT tfBondHandle_getDissociationEnergy ( struct tfBondHandleHandle * handle,
tfFloatP_t * value )

Get the dissociation energy.

Parameters
handlepopulated handle
valuedissociation energy; -1 if not defined
Returns
S_OK on success

◆ tfBondHandle_getEnergy()

HRESULT tfBondHandle_getEnergy ( struct tfBondHandleHandle * handle,
tfFloatP_t * value )

Get the current energy of the bond.

Parameters
handlepopulated handle
valuecurrent energy
Returns
S_OK on success

◆ tfBondHandle_getHalfLife()

HRESULT tfBondHandle_getHalfLife ( struct tfBondHandleHandle * handle,
tfFloatP_t * value )

Get the half life.

Parameters
handlepopulated handle
valuehalf life; -1 if not defined
Returns
S_OK on success

◆ tfBondHandle_getId()

HRESULT tfBondHandle_getId ( struct tfBondHandleHandle * handle,
int * id )

Get the id. Returns -1 if the underlying bond is invalid.

Parameters
handlepopulated handle
idbond id
Returns
S_OK on success

◆ tfBondHandle_getPartList()

HRESULT tfBondHandle_getPartList ( struct tfBondHandleHandle * handle,
struct tfParticleListHandle * plist )

Get a list of the particles of the bond.

Parameters
handlepopulated handle
plisthandle to populate
Returns
S_OK on success

◆ tfBondHandle_getParts()

HRESULT tfBondHandle_getParts ( struct tfBondHandleHandle * handle,
int * parti,
int * partj )

Get the ids of the particles of the bond.

Parameters
handlepopulated handle
partiith particle; -1 if no particle
partjjth particle; -1 if no particle
Returns
S_OK on success

◆ tfBondHandle_getPotential()

HRESULT tfBondHandle_getPotential ( struct tfBondHandleHandle * handle,
struct tfPotentialHandle * potential )

Get the potential of the bond.

Parameters
handlepopulated handle
potentialbond potential
Returns
S_OK on success

◆ tfBondHandle_getStyle()

HRESULT tfBondHandle_getStyle ( struct tfBondHandleHandle * handle,
struct tfRenderingStyleHandle * style )

Get the bond style.

Parameters
handlepopulated handle
stylebond style
Returns
S_OK on success

◆ tfBondHandle_getStyleDef()

HRESULT tfBondHandle_getStyleDef ( struct tfRenderingStyleHandle * style)

Get the default bond style.

Parameters
stylebond style
Returns
S_OK on success

◆ tfBondHandle_gt()

HRESULT tfBondHandle_gt ( struct tfBondHandleHandle * lhs,
struct tfBondHandleHandle * rhs,
bool * result )

Test whether lhs > rhs

◆ tfBondHandle_hasPart()

HRESULT tfBondHandle_hasPart ( struct tfBondHandleHandle * handle,
struct tfParticleHandleHandle * part,
bool * result )

Test whether the bond has a particle.

Parameters
handlepopulated handle
partparticle to test
resultresult of test
Returns
S_OK on success

◆ tfBondHandle_hasPartId()

HRESULT tfBondHandle_hasPartId ( struct tfBondHandleHandle * handle,
int pid,
bool * result )

Test whether the bond has an id.

Parameters
handlepopulated handle
pidid to test
resultresult of test
Returns
S_OK on success

◆ tfBondHandle_init()

HRESULT tfBondHandle_init ( struct tfBondHandleHandle * handle,
unsigned int id )

Construct a new bond handle from an existing bond id.

Parameters
handlehandle to populate
idid of existing bond
Returns
S_OK on success

◆ tfBondHandle_le()

HRESULT tfBondHandle_le ( struct tfBondHandleHandle * lhs,
struct tfBondHandleHandle * rhs,
bool * result )

Test whether lhs <= rhs

◆ tfBondHandle_lt()

HRESULT tfBondHandle_lt ( struct tfBondHandleHandle * lhs,
struct tfBondHandleHandle * rhs,
bool * result )

Test whether lhs < rhs

◆ tfBondHandle_ne()

HRESULT tfBondHandle_ne ( struct tfBondHandleHandle * lhs,
struct tfBondHandleHandle * rhs,
bool * result )

Test whether lhs != rhs

◆ tfBondHandle_setActive()

HRESULT tfBondHandle_setActive ( struct tfBondHandleHandle * handle,
bool flag )

Set whether a bond is active.

Parameters
handlepopulated handle
flagtrue when active
Returns
S_OK on success

◆ tfBondHandle_setDissociationEnergy()

HRESULT tfBondHandle_setDissociationEnergy ( struct tfBondHandleHandle * handle,
tfFloatP_t value )

Set the dissociation energy.

Parameters
handlepopulated handle
valuedissociation energy
Returns
S_OK on success

◆ tfBondHandle_setHalfLife()

HRESULT tfBondHandle_setHalfLife ( struct tfBondHandleHandle * handle,
tfFloatP_t value )

Set the half life.

Parameters
handlepopulated handle
valuehalf life
Returns
S_OK on success

◆ tfBondHandle_setStyle()

HRESULT tfBondHandle_setStyle ( struct tfBondHandleHandle * handle,
struct tfRenderingStyleHandle * style )

Set the bond style.

Parameters
handlepopulated handle
stylebond style
Returns
S_OK on success

◆ tfBondHandle_str()

HRESULT tfBondHandle_str ( struct tfBondHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a summary string of the bond.

Parameters
handlepopulated handle
strarray to populate
numCharsnumber of array characters
Returns
S_OK on success

◆ tfBondHandle_toString()

HRESULT tfBondHandle_toString ( struct tfBondHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a JSON string representation.

Parameters
handlepopulated handle
strstring representation
numCharsnumber of characters of string representation
Returns
S_OK on success

◆ tfDihedral_destroyAll()

HRESULT tfDihedral_destroyAll ( )

Deletes all bonds in the universe.

Automatically updates when running on a CUDA device.

Returns
S_OK on success

◆ tfDihedral_getIdsForParticle()

HRESULT tfDihedral_getIdsForParticle ( unsigned int pid,
unsigned int ** bids,
unsigned int * numIds )

Find all the bonds that interact with the given particle id.

Parameters
pidparticle id
bidsbond ids
numIdsnumber of bonds
Returns
S_OK on success

◆ tfDihedralHandle_check()

HRESULT tfDihedralHandle_check ( struct tfDihedralHandleHandle * handle,
bool * flag )

Check the validity of the handle.

Parameters
handlepopulated handle
flagtrue if OK
Returns
S_OK on success

◆ tfDihedralHandle_create()

HRESULT tfDihedralHandle_create ( struct tfDihedralHandleHandle * handle,
struct tfPotentialHandle * potential,
struct tfParticleHandleHandle * i,
struct tfParticleHandleHandle * j,
struct tfParticleHandleHandle * k,
struct tfParticleHandleHandle * l )

Construct a new dihedral handle and underlying dihedral.

Parameters
handlehandle to populate
potentialdihedral potential
iith particle
jjth particle
kkth particle
llth particle
Returns
S_OK on success

◆ tfDihedralHandle_decays()

HRESULT tfDihedralHandle_decays ( struct tfDihedralHandleHandle * handle,
bool * flag )

Tests whether this dihedral decays.

Parameters
handlepopulated handle
flagtrue when the dihedral should decay
Returns
S_OK on success

◆ tfDihedralHandle_destroy()

HRESULT tfDihedralHandle_destroy ( struct tfDihedralHandleHandle * handle)

Destroy the angle.

Returns
S_OK on success

◆ tfDihedralHandle_eq()

HRESULT tfDihedralHandle_eq ( struct tfDihedralHandleHandle * lhs,
struct tfDihedralHandleHandle * rhs,
bool * result )

Test whether lhs == rhs

◆ tfDihedralHandle_fromString()

HRESULT tfDihedralHandle_fromString ( struct tfDihedralHandleHandle * handle,
const char * str )

Create from a JSON string representation.

Returns
S_OK on success

◆ tfDihedralHandle_ge()

HRESULT tfDihedralHandle_ge ( struct tfDihedralHandleHandle * lhs,
struct tfDihedralHandleHandle * rhs,
bool * result )

Test whether lhs >= rhs

◆ tfDihedralHandle_getAge()

HRESULT tfDihedralHandle_getAge ( struct tfDihedralHandleHandle * handle,
tfFloatP_t * value )

Get the age of the dihedral.

Parameters
handlepopulated handle
valuedihedral age
Returns
S_OK on success

◆ tfDihedralHandle_getAll()

HRESULT tfDihedralHandle_getAll ( struct tfDihedralHandleHandle ** handles,
unsigned int * numBonds )

Gets all bonds in the universe.

Parameters
handles
numBondsnumber of bonds
Returns
S_OK on success

◆ tfDihedralHandle_getDissociationEnergy()

HRESULT tfDihedralHandle_getDissociationEnergy ( struct tfDihedralHandleHandle * handle,
tfFloatP_t * value )

Get the dissociation energy.

Parameters
handlepopulated handle
valuedissociation energy; -1 if not defined
Returns
S_OK on success

◆ tfDihedralHandle_getEnergy()

HRESULT tfDihedralHandle_getEnergy ( struct tfDihedralHandleHandle * handle,
tfFloatP_t * value )

Get the current energy of the dihedral.

Parameters
handlepopulated handle
valuecurrent energy
Returns
S_OK on success

◆ tfDihedralHandle_getHalfLife()

HRESULT tfDihedralHandle_getHalfLife ( struct tfDihedralHandleHandle * handle,
tfFloatP_t * value )

Get the half life.

Parameters
handlepopulated handle
valuehalf life; -1 if not defined
Returns
S_OK on success

◆ tfDihedralHandle_getPartList()

HRESULT tfDihedralHandle_getPartList ( struct tfDihedralHandleHandle * handle,
struct tfParticleListHandle * plist )

Get a list of the particles of the dihedral.

Parameters
handlepopulated handle
plisthandle to populate
Returns
S_OK on success

◆ tfDihedralHandle_getParts()

HRESULT tfDihedralHandle_getParts ( struct tfDihedralHandleHandle * handle,
int * parti,
int * partj )

Get the ids of the particles of the dihedral.

Parameters
handlepopulated handle
partiith particle; -1 if no particle
partjjth particle; -1 if no particle
Returns
S_OK on success

◆ tfDihedralHandle_getPotential()

HRESULT tfDihedralHandle_getPotential ( struct tfDihedralHandleHandle * handle,
struct tfPotentialHandle * potential )

Get the potential of the dihedral.

Parameters
handlepopulated handle
potentialdihedral potential
Returns
S_OK on success

◆ tfDihedralHandle_getStyle()

HRESULT tfDihedralHandle_getStyle ( struct tfDihedralHandleHandle * handle,
struct tfRenderingStyleHandle * style )

Get the dihedral style.

Parameters
handlepopulated handle
styledihedral style
Returns
S_OK on success

◆ tfDihedralHandle_getStyleDef()

HRESULT tfDihedralHandle_getStyleDef ( struct tfRenderingStyleHandle * style)

Get the dihedral style.

Parameters
styledihedral style
Returns
S_OK on success

◆ tfDihedralHandle_gt()

HRESULT tfDihedralHandle_gt ( struct tfDihedralHandleHandle * lhs,
struct tfDihedralHandleHandle * rhs,
bool * result )

Test whether lhs > rhs

◆ tfDihedralHandle_hasPart()

HRESULT tfDihedralHandle_hasPart ( struct tfDihedralHandleHandle * handle,
struct tfParticleHandleHandle * part,
bool * result )

Test whether the bond has a particle.

Parameters
handlepopulated handle
partparticle to test
resultresult of test
Returns
S_OK on success

◆ tfDihedralHandle_hasPartId()

HRESULT tfDihedralHandle_hasPartId ( struct tfDihedralHandleHandle * handle,
int pid,
bool * result )

Test whether the bond has an id.

Parameters
handlepopulated handle
pidid to test
resultresult of test
Returns
S_OK on success

◆ tfDihedralHandle_init()

HRESULT tfDihedralHandle_init ( struct tfDihedralHandleHandle * handle,
unsigned int id )

Construct a new dihedral handle from an existing dihedral id.

Parameters
handlehandle to populate
idid of existing dihedral
Returns
S_OK on success

◆ tfDihedralHandle_le()

HRESULT tfDihedralHandle_le ( struct tfDihedralHandleHandle * lhs,
struct tfDihedralHandleHandle * rhs,
bool * result )

Test whether lhs <= rhs

◆ tfDihedralHandle_lt()

HRESULT tfDihedralHandle_lt ( struct tfDihedralHandleHandle * lhs,
struct tfDihedralHandleHandle * rhs,
bool * result )

Test whether lhs < rhs

◆ tfDihedralHandle_ne()

HRESULT tfDihedralHandle_ne ( struct tfDihedralHandleHandle * lhs,
struct tfDihedralHandleHandle * rhs,
bool * result )

Test whether lhs != rhs

◆ tfDihedralHandle_setActive()

HRESULT tfDihedralHandle_setActive ( struct tfDihedralHandleHandle * handle,
bool flag )

Set whether a dihedral is active.

Parameters
handlepopulated handle
flagtrue when active
Returns
S_OK on success

◆ tfDihedralHandle_setDissociationEnergy()

HRESULT tfDihedralHandle_setDissociationEnergy ( struct tfDihedralHandleHandle * handle,
tfFloatP_t value )

Set the dissociation energy.

Parameters
handlepopulated handle
valuedissociation energy
Returns
S_OK on success

◆ tfDihedralHandle_setHalfLife()

HRESULT tfDihedralHandle_setHalfLife ( struct tfDihedralHandleHandle * handle,
tfFloatP_t value )

Set the half life.

Parameters
handlepopulated handle
valuehalf life
Returns
S_OK on success

◆ tfDihedralHandle_setStyle()

HRESULT tfDihedralHandle_setStyle ( struct tfDihedralHandleHandle * handle,
struct tfRenderingStyleHandle * style )

Set the dihedral style.

Parameters
handlepopulated handle
styledihedral style
Returns
S_OK on success

◆ tfDihedralHandle_str()

HRESULT tfDihedralHandle_str ( struct tfDihedralHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a summary string of the dihedral.

Parameters
handlepopulated handle
strarray to populate
numCharsnumber of array characters
Returns
S_OK on success

◆ tfDihedralHandle_toString()

HRESULT tfDihedralHandle_toString ( struct tfDihedralHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a JSON string representation.

Parameters
handlepopulated handle
strstring representation
numCharsnumber of characters of string representation
Returns
S_OK on success