25#ifndef _WRAPS_C_TFCPOTENTIAL_H_
26#define _WRAPS_C_TFCPOTENTIAL_H_
30typedef void (*tfPotentialEval_ByParticleHandleFcn)(
38typedef void (*tfPotentialEval_ByParticlesHandleFcn)(
47typedef void (*tfPotentialEval_ByParticles3HandleFcn)(
57typedef void (*tfPotentialEval_ByParticles4HandleFcn)(
73 unsigned int POTENTIAL_NONE;
74 unsigned int POTENTIAL_LJ126;
75 unsigned int POTENTIAL_EWALD;
76 unsigned int POTENTIAL_COULOMB;
77 unsigned int POTENTIAL_SINGLE;
78 unsigned int POTENTIAL_R2;
79 unsigned int POTENTIAL_R;
80 unsigned int POTENTIAL_ANGLE;
81 unsigned int POTENTIAL_HARMONIC;
82 unsigned int POTENTIAL_DIHEDRAL;
83 unsigned int POTENTIAL_SWITCH;
84 unsigned int POTENTIAL_REACTIVE;
85 unsigned int POTENTIAL_SCALED;
86 unsigned int POTENTIAL_SHIFTED;
87 unsigned int POTENTIAL_BOUND;
88 unsigned int POTENTIAL_SUM;
89 unsigned int POTENTIAL_PERIODIC;
90 unsigned int POTENTIAL_COULOMBR;
94 unsigned int POTENTIAL_KIND_POTENTIAL;
95 unsigned int POTENTIAL_KIND_DPD;
96 unsigned int POTENTIAL_KIND_BYPARTICLES;
97 unsigned int POTENTIAL_KIND_COMBINATION;
940CAPI_FUNC(HRESULT)
tfPotential_create_glj(
struct tfPotentialHandle *handle, tfFloatP_t e, tfFloatP_t *m, tfFloatP_t *n, tfFloatP_t *k, tfFloatP_t *r0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol,
bool *shifted);
1089 tfFloatP_t (*f)(tfFloatP_t),
1090 tfFloatP_t (*fp)(tfFloatP_t),
1091 tfFloatP_t (*f6p)(tfFloatP_t),
Handle to a ParticleHandle instance.
Definition tfCParticle.h:111
Handle to a PotentialClear instance.
Definition tfCPotential.h:136
Handle to a PotentialEval_ByParticle instance.
Definition tfCPotential.h:104
Handle to a PotentialEval_ByParticles3 instance.
Definition tfCPotential.h:120
Handle to a PotentialEval_ByParticles4 instance.
Definition tfCPotential.h:128
Handle to a PotentialEval_ByParticles instance.
Definition tfCPotential.h:112
Definition tfCPotential.h:72
Handle to a Potential instance.
Definition tfCPotential.h:144
Definition tfCPotential.h:93
HRESULT tfPotential_create_cosine_dihedral(struct tfPotentialHandle *handle, tfFloatP_t k, int n, tfFloatP_t delta, tfFloatP_t *tol)
Creates a cosine dihedral potential.
HRESULT tfPotential_getConstituents(struct tfPotentialHandle *handle, struct tfPotentialHandle ***chandles, unsigned int *numPots)
Get the constituent potentials.
HRESULT tfPotentialEval_ByParticles4_init(struct tfPotentialEval_ByParticles4Handle *handle, tfPotentialEval_ByParticles4HandleFcn *fcn)
Initialize an instance.
HRESULT tfPotential_fevalPos(struct tfPotentialHandle *handle, tfFloatP_t *pos, tfFloatP_t **force)
Evaluate the force for a given position.
HRESULT tfPotential_create_ewald(struct tfPotentialHandle *handle, tfFloatP_t min, tfFloatP_t max, tfFloatP_t q, tfFloatP_t kappa, tfFloatP_t *tol, unsigned int *periodicOrder)
Creates a real-space Ewald potential.
HRESULT tfPotential_setClearFcn(struct tfPotentialHandle *handle, struct tfPotentialClearHandle *fcn)
Set the clear function.
HRESULT tfPotential_create_lennard_jones_12_6(struct tfPotentialHandle *handle, tfFloatP_t min, tfFloatP_t max, tfFloatP_t A, tfFloatP_t B, tfFloatP_t *tol)
Creates a 12-6 Lennard-Jones potential.
HRESULT tfPotential_removeClearFcn(struct tfPotentialHandle *handle)
Remove the clear function.
HRESULT tfPotentialKind_init(struct tfPotentialKindHandle *handle)
Initialize an instance.
HRESULT tfPotential_create_glj(struct tfPotentialHandle *handle, tfFloatP_t e, tfFloatP_t *m, tfFloatP_t *n, tfFloatP_t *k, tfFloatP_t *r0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol, bool *shifted)
Creates a generalized Lennard-Jones potential.
HRESULT tfPotential_create_lennard_jones_12_6_coulomb(struct tfPotentialHandle *handle, tfFloatP_t min, tfFloatP_t max, tfFloatP_t A, tfFloatP_t B, tfFloatP_t q, tfFloatP_t *tol)
Creates a potential of the sum of a 12-6 Lennard-Jones potential and a shifted Coulomb potential.
HRESULT tfPotential_fevalParts3(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *phi, struct tfParticleHandleHandle *phj, struct tfParticleHandleHandle *phk, tfFloatP_t **forcei, tfFloatP_t **forcek)
Evalute the forces for three particles.
HRESULT tfPotential_create_eval_ByParticles4(struct tfPotentialHandle *handle, struct tfPotentialEval_ByParticles4Handle *fcn)
Create a potential that uses an evaluation function by four particles.
HRESULT tfPotential_create_coulomb(struct tfPotentialHandle *handle, tfFloatP_t q, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol, unsigned int *periodicOrder)
Creates a Coulomb potential.
HRESULT tfPotentialEval_ByParticles4_destroy(struct tfPotentialEval_ByParticles4Handle *handle)
Destroy an instance.
HRESULT tfPotential_setName(struct tfPotentialHandle *handle, const char *name)
Set the name of the potential.
HRESULT tfPotential_evalParts2(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *phi, struct tfParticleHandleHandle *phj, tfFloatP_t *potE)
Evalute the potential for two particles.
HRESULT tfPotential_destroy(struct tfPotentialHandle *handle)
Destroy an instance.
HRESULT tfPotential_setBound(struct tfPotentialHandle *handle, bool bound)
Set whether the potential is bound.
HRESULT tfPotential_getFlags(struct tfPotentialHandle *handle, unsigned int *flags)
Get the flags of the potential.
HRESULT tfPotential_fromString(struct tfPotentialHandle *handle, const char *str)
Create from a JSON string representation.
HRESULT tfPotential_evalPart(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *partHandle, tfFloatP_t *pos, tfFloatP_t *potE)
Evaluate the potential for a given particle and position.
HRESULT tfPotentialEval_ByParticles_init(struct tfPotentialEval_ByParticlesHandle *handle, tfPotentialEval_ByParticlesHandleFcn *fcn)
Initialize an instance.
HRESULT tfPotential_getBound(struct tfPotentialHandle *handle, bool *bound)
Get whether the potential is bound.
HRESULT tfPotential_create_eval_ByParticles3(struct tfPotentialHandle *handle, struct tfPotentialEval_ByParticles3Handle *fcn)
Create a potential that uses an evaluation function by three particles.
HRESULT tfPotentialEval_ByParticles3_destroy(struct tfPotentialEval_ByParticles3Handle *handle)
Destroy an instance.
HRESULT tfPotential_setFlags(struct tfPotentialHandle *handle, unsigned int flags)
Set the flags of the potential.
HRESULT tfPotentialClear_destroy(struct tfPotentialClearHandle *handle)
Destroy an instance.
HRESULT tfPotential_fevalParts4(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *phi, struct tfParticleHandleHandle *phj, struct tfParticleHandleHandle *phk, struct tfParticleHandleHandle *phl, tfFloatP_t **forcei, tfFloatP_t **forcel)
Evalute the forces for four particles.
HRESULT tfPotential_evalPos(struct tfPotentialHandle *handle, tfFloatP_t *pos, tfFloatP_t *potE)
Evaluate the potential for a given position.
HRESULT tfPotential_setR0(struct tfPotentialHandle *handle, tfFloatP_t r0)
Set the equilibrium distance of the potential.
HRESULT tfPotential_create_eval_ByParticle(struct tfPotentialHandle *handle, struct tfPotentialEval_ByParticleHandle *fcn)
Create a potential that uses an evaluation function by particle.
HRESULT tfPotential_create_harmonic_dihedral(struct tfPotentialHandle *handle, tfFloatP_t k, tfFloatP_t delta, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a harmonic dihedral potential.
HRESULT tfPotential_hasClearFcn(struct tfPotentialHandle *handle, bool *hasClear)
Test whether a potential has a clear function.
HRESULT tfPotential_create_dpd(struct tfPotentialHandle *handle, tfFloatP_t *alpha, tfFloatP_t *gamma, tfFloatP_t *sigma, tfFloatP_t *cutoff, bool *shifted)
Creates a Dissipative Particle Dynamics potential.
HRESULT tfPotential_create_morse(struct tfPotentialHandle *handle, tfFloatP_t *d, tfFloatP_t *a, tfFloatP_t *r0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a Morse potential.
HRESULT tfPotential_toString(struct tfPotentialHandle *handle, char **str, unsigned int *numChars)
Get a JSON string representation.
HRESULT tfPotential_create_linear(struct tfPotentialHandle *handle, tfFloatP_t k, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a linear potential.
HRESULT tfPotential_create_well(struct tfPotentialHandle *handle, tfFloatP_t k, tfFloatP_t n, tfFloatP_t r0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a well potential.
HRESULT tfPotential_create_eval_ByParticles(struct tfPotentialHandle *handle, struct tfPotentialEval_ByParticlesHandle *fcn)
Create a potential that uses an evaluation function by two particles.
HRESULT tfPotential_fevalR(struct tfPotentialHandle *handle, tfFloatP_t r, tfFloatP_t *force)
Evaluate the force.
HRESULT tfPotential_create_harmonic(struct tfPotentialHandle *handle, tfFloatP_t k, tfFloatP_t r0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a harmonic bond potential.
HRESULT tfPotential_evalR0(struct tfPotentialHandle *handle, tfFloatP_t r, tfFloatP_t r0, tfFloatP_t *potE)
Evaluate the potential for a given scaling distance.
HRESULT tfPotential_create_harmonic_angle(struct tfPotentialHandle *handle, tfFloatP_t k, tfFloatP_t theta0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a harmonic angle potential.
HRESULT tfPotential_fevalPart(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *partHandle, tfFloatP_t *pos, tfFloatP_t **force)
Evaluate the force for a given particle and position.
HRESULT tfPotential_getR0(struct tfPotentialHandle *handle, tfFloatP_t *r0)
Get the equilibrium distance of the potential.
HRESULT tfPotential_fevalParts2(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *phi, struct tfParticleHandleHandle *phj, tfFloatP_t **force)
Evalute the force for two particles.
HRESULT tfPotential_create_coulombR(struct tfPotentialHandle *handle, tfFloatP_t q, tfFloatP_t kappa, tfFloatP_t min, tfFloatP_t max, unsigned int *modes)
Creates a Coulomb reciprocal potential.
HRESULT tfPotential_getKind(struct tfPotentialHandle *handle, unsigned int *kind)
Get the kind of the potential.
HRESULT tfPotentialClear_init(struct tfPotentialClearHandle *handle, tfPotentialClearHandleFcn *fcn)
Initialize an instance.
HRESULT tfPotential_getRSquare(struct tfPotentialHandle *handle, tfFloatP_t *r2)
Get the equilibrium distance of the potential.
HRESULT tfPotentialFlags_init(struct tfPotentialFlagsHandle *handle)
Initialize an instance.
HRESULT tfPotentialEval_ByParticle_init(struct tfPotentialEval_ByParticleHandle *handle, tfPotentialEval_ByParticleHandleFcn *fcn)
Initialize an instance.
HRESULT tfPotential_getMax(struct tfPotentialHandle *handle, tfFloatP_t *maxR)
Get the maximum distance for which a potential is evaluated.
HRESULT tfPotential_getName(struct tfPotentialHandle *handle, char **name, unsigned int *numChars)
Get the name of the potential.
HRESULT tfPotential_add(struct tfPotentialHandle *handlei, struct tfPotentialHandle *handlej, struct tfPotentialHandle *handleSum)
Add two potentials.
HRESULT tfPotentialEval_ByParticles_destroy(struct tfPotentialEval_ByParticlesHandle *handle)
Destroy an instance.
HRESULT tfPotential_evalParts4(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *phi, struct tfParticleHandleHandle *phj, struct tfParticleHandleHandle *phk, struct tfParticleHandleHandle *phl, tfFloatP_t *potE)
Evalute the potential for four particles.
HRESULT tfPotential_create_power(struct tfPotentialHandle *handle, tfFloatP_t *k, tfFloatP_t *r0, tfFloatP_t *alpha, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates a power potential.
HRESULT tfPotentialEval_ByParticles3_init(struct tfPotentialEval_ByParticles3Handle *handle, tfPotentialEval_ByParticles3HandleFcn *fcn)
Initialize an instance.
HRESULT tfPotential_create_overlapping_sphere(struct tfPotentialHandle *handle, tfFloatP_t *mu, tfFloatP_t *kc, tfFloatP_t *kh, tfFloatP_t *r0, tfFloatP_t *min, tfFloatP_t *max, tfFloatP_t *tol)
Creates an overlapping-sphere potential from :cite:Osborne:2017hk.
HRESULT tfPotential_evalParts3(struct tfPotentialHandle *handle, struct tfParticleHandleHandle *phi, struct tfParticleHandleHandle *phj, struct tfParticleHandleHandle *phk, tfFloatP_t *potE)
Evalute the potential for three particles.
HRESULT tfPotential_getMin(struct tfPotentialHandle *handle, tfFloatP_t *minR)
Get the minimum distance for which a potential is evaluated.
HRESULT tfPotential_evalR(struct tfPotentialHandle *handle, tfFloatP_t r, tfFloatP_t *potE)
Evaluate the potential.
HRESULT tfPotential_create_custom(struct tfPotentialHandle *handle, tfFloatP_t min, tfFloatP_t max, tfFloatP_t(*f)(tfFloatP_t), tfFloatP_t(*fp)(tfFloatP_t), tfFloatP_t(*f6p)(tfFloatP_t), tfFloatP_t *tol, unsigned int *flags)
Creates a custom potential.
HRESULT tfPotential_fevalR0(struct tfPotentialHandle *handle, tfFloatP_t r, tfFloatP_t r0, tfFloatP_t *force)
Evaluate the force for a given scaling distance.
HRESULT tfPotential_getShifted(struct tfPotentialHandle *handle, bool *shifted)
Get whether the potential is shifted.
HRESULT tfPotential_getPeriodic(struct tfPotentialHandle *handle, bool *periodic)
Get whether the potential is periodic.
HRESULT tfPotentialEval_ByParticle_destroy(struct tfPotentialEval_ByParticleHandle *handle)
Destroy an instance.