25#ifndef _MDCORE_INCLUDE_TFFORCE_H_
26#define _MDCORE_INCLUDE_TFFORCE_H_
28#include "tf_platform.h"
46 FORCE_BERENDSEN = 1 << 0,
47 FORCE_GAUSSIAN = 1 << 1,
48 FORCE_FRICTION = 1 << 2,
70 FORCE_TYPE type = FORCE_FORCE;
74 int stateVectorIndex = -1;
138 static Gaussian*
random(
const FPTYPE &std,
const FPTYPE &mean,
const FPTYPE &duration=0.01);
201 UserForceFuncType *userFunc;
202 FPTYPE updateInterval;
234 void setPeriod(
const FPTYPE &period);
240 CustomForce(UserForceFuncType *f,
const FPTYPE &period=std::numeric_limits<FPTYPE>::max());
331 CPPAPI_FUNC(
ForceSum*) ForceSum_fromStr(
const std::string &str);
332 CPPAPI_FUNC(
Berendsen*) Berendsen_fromStr(
const std::string &str);
333 CPPAPI_FUNC(
Gaussian*) Gaussian_fromStr(
const std::string &str);
334 CPPAPI_FUNC(
Friction*) Friction_fromStr(
const std::string &str);
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
void(* Force_EvalFcn)(struct Force *, struct Particle *, FPTYPE *)
Definition tfForce.h:56
Berendsen force.
Definition tfForce.h:259
FPTYPE itau
time constant
Definition tfForce.h:263
static Berendsen * fromForce(Force *f)
Convert basic force to Berendsen.
A custom force function.
Definition tfForce.h:200
void setValue(const FVector3 &f)
void setValue(UserForceFuncType *_userFunc=NULL)
static CustomForce * fromForce(Force *f)
Convert basic force to CustomForce.
bool isCustom()
Tests whether this object is a custom force type.
Definition tfForce.h:236
virtual void onTime(FPTYPE time)
Force is a metatype, in that Tissue Forge has lots of different instances of force functions,...
Definition tfForce.h:69
static Berendsen * berendsen_tstat(const FPTYPE &tau)
Creates a Berendsen thermostat.
static Gaussian * random(const FPTYPE &std, const FPTYPE &mean, const FPTYPE &duration=0.01)
Creates a random force.
HRESULT bind_species(struct ParticleType *a_type, const std::string &coupling_symbol)
Bind a force to a species.
virtual std::string toString()
Get a JSON string representation.
virtual bool isCustom()
Tests whether this object is a custom force type.
Definition tfForce.h:81
static Force * fromString(const std::string &str)
Create from a JSON string representation.
static Friction * friction(const FPTYPE &coef)
Creates a friction force.
static ForceSum * fromForce(Force *f)
Convert basic force to force sum.
Friction force.
Definition tfForce.h:313
static Friction * fromForce(Force *f)
Convert basic force to Friction.
FPTYPE coef
time constant
Definition tfForce.h:317
Random force.
Definition tfForce.h:281
FPTYPE std
standard deviation of magnitude
Definition tfForce.h:285
FPTYPE mean
mean of magnitude
Definition tfForce.h:290
unsigned durration_steps
duration of force.
Definition tfForce.h:295
static Gaussian * fromForce(Force *f)
Convert basic force to Gaussian.
Definition tfParticle.h:101
Structure containing information on each particle type.
Definition tfParticle.h:768
int32_t HRESULT
Definition tf_port.h:255