Commit 7ed51ce4 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Bonded forces ok

parent 08c2e027
......@@ -99,6 +99,17 @@ class OpenMMBrookInterface {
int getNumberOfParticles( void ) const;
/**
* Set number of particles
*
* @param numberOfParticles number of particles
*
* @return DefaultReturnValue
*
*/
int setNumberOfParticles( int numberOfParticles );
/**
* Get particle stream width
*
......@@ -166,10 +177,13 @@ class OpenMMBrookInterface {
* Compute energy
*
* @param context OpenMMContextImpl context
* @param system system reference
*
* @return potential energy
*
*/
double computeEnergy( OpenMMContextImpl& context );
double computeEnergy( OpenMMContextImpl& context, System& system );
/**
* Set trigger Force Kernel
......@@ -207,6 +221,24 @@ class OpenMMBrookInterface {
void* getTriggerEnergyKernel( void ) const;
/**
* Get BrookNonBonded reference
*
* @return BrookNonBonded reference
*
*/
BrookNonBonded& getBrookNonBonded( void );
/**
* Get BrookGbsa reference
*
* @return BrookGbsa reference
*
*/
BrookGbsa& getBrookGbsa( void );
/**
* Get BrookBondParameters for harmonic bond force
*
......@@ -392,9 +424,9 @@ class OpenMMBrookInterface {
// Brook bonded, nonbonded, Gbsa
BrookBonded* _brookBonded;
BrookNonBonded* _brookNonBonded;
BrookGbsa* _brookGbsa;
BrookBonded _brookBonded;
BrookNonBonded _brookNonBonded;
BrookGbsa _brookGbsa;
void* _triggerForceKernel;
void* _triggerEnergyKernel;
......
This diff is collapsed.
......@@ -304,7 +304,6 @@ kernel void kinvmap_gather3_4(
outforce += do_gather_nobranch( strwidth, invmap4_4, forces4 );
}
//Takes three + five inverse maps
kernel void kinvmap_gather3_5(
float strwidth, //stream width of the dihedral forces
......@@ -337,6 +336,25 @@ kernel void kinvmap_gather3_5(
}
//Takes one + one inverse maps
kernel void kinvmap_gather1_1(
float strwidth, //stream width of the dihedral forces
float4 invmap3_1[][], //indices into the dihedral forces
float3 forces3[][], //dihedral forces
float4 invmap5_1[][], //indices into the dihedral forces
float3 forces5[][], //dihedral forces
float3 inforce<>, //particle forces before
out float3 outforce<> //particle forces after
)
{
float2 idx = indexof(outforce);
outforce = inforce;
outforce += do_gather_nobranch( strwidth, invmap3_1[idx], forces3 );
outforce += do_gather_nobranch( strwidth, invmap5_1[idx], forces5 );
}
//Takes five + two inverse maps
kernel void kinvmap_gather5_2(
float strwidth, //stream width of the dihedral forces
......
......@@ -121,6 +121,15 @@ void kinvmap_gather3_5 (const float strwidth,
::brook::stream outforce);
void kinvmap_gather1_1 (const float strwidth,
::brook::stream invmap3_1,
::brook::stream forces3,
::brook::stream invmap5_1,
::brook::stream forces5,
::brook::stream inforce,
::brook::stream outforce);
void kinvmap_gather5_2 (const float strwidth,
::brook::stream invmap5_1,
::brook::stream invmap5_2,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment