virtual-reality  2020.5
Visualize and interact with computational simulations using a virtual reality interface
C2M2.MolecularDynamics.Simulation.ExampleMDSimulation Class Reference
+ Inheritance diagram for C2M2.MolecularDynamics.Simulation.ExampleMDSimulation:
+ Collaboration diagram for C2M2.MolecularDynamics.Simulation.ExampleMDSimulation:

Public Member Functions

override float GetSimulationTime ()
 
override Vector3[] GetValues ()
 Require derived classes to make simulation values available More...
 
override void SetValues (RaycastHit hit)
 Receive an interaction request, and translate it onto the proper sphere More...
 
Vector3[] Force (Vector3[] pos, int[][] bond_topo)
 Evaluates the forces. First will try doing for system of oscillators. Then will extend to non-bonded interactions More...
 
Vector3[] angle_Force (Vector3[] pos)
 Compute angle forces More...
 
- Public Member Functions inherited from C2M2.Simulation.Simulation< Vector3[], Transform[], VRRaycastableColliders, VRGrabbableColliders >
void Initialize ()
 
void Update ()
 
void StartSimulation ()
 Launch Solve thread More...
 
void StopSimulation ()
 Stop current Solve thread More...
 

Public Attributes

float kb = 0.001987f
 
float T = 100.0f
 
float kappa = 6f
 
float r0 = 3.65f
 
- Public Attributes inherited from C2M2.MolecularDynamics.Simulation.MDSimulation
string pdbPath = "PE/pe_cg.pdb"
 
string psfPath = "PE/octatetracontane_128.cg.psf"
 
float radius = 1f
 
string shaderName = "Standard"
 
Color[] atomColors = new Color[] { Color.cyan, Color.gray }
 
Material bondMaterial
 
float maxBondLength = 10f
 
MethodType methodType = MethodType.gjI
 
int timestepCount = 50000
 
float timestepSize = .1f
 
float gamma = 0.1f
 
float boxLengthX = 58.065f
 
float boxLengthY = 58.065f
 
float boxLengthZ = 58.065f
 
- Public Attributes inherited from C2M2.Simulation.Simulation< Vector3[], Transform[], VRRaycastableColliders, VRGrabbableColliders >
bool dryRun
 Run solve code without visualization or interaction More...
 
bool startOnAwake
 Should the simulation start itself in Awake? More...
 

Protected Member Functions

override void Solve ()
 Molecular dynamics simulation code More...
 
- Protected Member Functions inherited from C2M2.MolecularDynamics.Simulation.MDSimulation
override Transform[] BuildVisualization ()
 Reads and stores PDB and PSF data, uses the data to build the system visualization More...
 
override void UpdateVisChild (in Vector3[] simulationValues)
 Used here to update bond visualization. More...
 
- Protected Member Functions inherited from C2M2.Simulation.PositionFieldSimulation
override void OnAwakePost (Transform[] viz)
 
override void UpdateVisualization (in Vector3[] simulationValues)
 
- Protected Member Functions inherited from C2M2.Simulation.Simulation< Vector3[], Transform[], VRRaycastableColliders, VRGrabbableColliders >
abstract void UpdateVisualization (in ValueType newValues)
 Update the visualization. This will be called once per Update() call More...
 
virtual void PreSolve ()
 Called on the main thread before the Solve thread is launched More...
 
virtual void OnAwakePre ()
 
virtual void OnAwakePost (VizType viz)
 
virtual void OnStart ()
 
virtual void OnUpdate ()
 
virtual void OnPause ()
 
virtual void OnQuit ()
 

Private Member Functions

void ResolvePBC ()
 

Private Attributes

Vector3[] force = null
 
float dt
 
int t
 

Additional Inherited Members

- Public Types inherited from C2M2.MolecularDynamics.Simulation.MDSimulation
enum class  MethodType { gjI , gjII , gjIII }
 
- Protected Attributes inherited from C2M2.MolecularDynamics.Simulation.MDSimulation
float c = -1
 
Dictionary< Transform, int > particleLookup
 
Vector3[] coord = null
 
Vector3[] vel = null
 Velocity of each particle More...
 
Vector3[] r = null
 
Vector3Int[] pbcFlag = null
 
int[] bonds = null
 Each two indices represents one bond. More...
 
int[] angles = null
 
float[] mass = null
 
string[] types = null
 
int[][] bond_topo = null
 
- Protected Attributes inherited from C2M2.Simulation.Simulation< Vector3[], Transform[], VRRaycastableColliders, VRGrabbableColliders >
Mutex mutex
 Provide mutual exclusion to derived classes More...
 
- Properties inherited from C2M2.Simulation.Simulation< Vector3[], Transform[], VRRaycastableColliders, VRGrabbableColliders >
VizType viz [get, protected set]
 

Member Function Documentation

◆ angle_Force()

Vector3 [] C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.angle_Force ( Vector3[]  pos)

Compute angle forces

◆ Force()

Vector3 [] C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.Force ( Vector3[]  pos,
int  bond_topo[][] 
)

Evaluates the forces. First will try doing for system of oscillators. Then will extend to non-bonded interactions

◆ GetSimulationTime()

override float C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.GetSimulationTime ( )

◆ GetValues()

override Vector3 [] C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.GetValues ( )
virtual

Require derived classes to make simulation values available

Implements C2M2.Simulation.Simulation< Vector3[], Transform[], VRRaycastableColliders, VRGrabbableColliders >.

◆ ResolvePBC()

void C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.ResolvePBC ( )
private

◆ SetValues()

override void C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.SetValues ( RaycastHit  hit)

Receive an interaction request, and translate it onto the proper sphere

◆ Solve()

override void C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.Solve ( )
protectedvirtual

Member Data Documentation

◆ dt

float C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.dt
private

◆ force

Vector3 [] C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.force = null
private

◆ kappa

float C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.kappa = 6f

◆ kb

float C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.kb = 0.001987f

◆ r0

float C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.r0 = 3.65f

◆ T

float C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.T = 100.0f

◆ t

int C2M2.MolecularDynamics.Simulation.ExampleMDSimulation.t
private

The documentation for this class was generated from the following file: