Commit e79b262b authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Added code to calculate electrostatic potential given vector of grid points

parent 70ba177d
...@@ -384,6 +384,15 @@ public: ...@@ -384,6 +384,15 @@ public:
* @return the potential energy due to the force * @return the potential energy due to the force
*/ */
double execute(ContextImpl& context, bool includeForces, bool includeEnergy); double execute(ContextImpl& context, bool includeForces, bool includeEnergy);
/**
* Execute the kernel to calculate the electrostatic potential
*
* @param context the context in which to execute this kernel
* @param inputGrid input grid coordinates
* @param outputElectrostaticPotential output potential
*/
void getElectrostaticPotential(ContextImpl& context, const std::vector< Vec3 >& inputGrid,
std::vector< double >& outputElectrostaticPotential );
private: private:
int numMultipoles; int numMultipoles;
int polarizationType; int polarizationType;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<xsl:variable name="vector_tortor_type_id" select="/GCC_XML/Class[starts-with(@name, 'vector&lt;std::vector&lt;std::vector&lt;double')]/@id"/> <xsl:variable name="vector_tortor_type_id" select="/GCC_XML/Class[starts-with(@name, 'vector&lt;std::vector&lt;std::vector&lt;double')]/@id"/>
<!-- Do not generate functions for the following classes --> <!-- Do not generate functions for the following classes -->
<xsl:variable name="skip_classes" select="('Vec3', 'Kernel', 'System', 'Stream', 'KernelImpl', 'StreamImpl', 'KernelFactory', 'StreamFactory', 'ContextImpl', 'OpenMMException', 'Force', 'ForceImpl')"/> <xsl:variable name="skip_classes" select="('Vec3', 'Context', 'Kernel', 'System', 'Stream', 'KernelImpl', 'StreamImpl', 'KernelFactory', 'StreamFactory', 'ContextImpl', 'OpenMMException', 'Force', 'ForceImpl')"/>
<!-- Do not generate the following functions --> <!-- Do not generate the following functions -->
<xsl:variable name="skip_methods" select="('OpenMM_Context_getState', 'OpenMM_Platform_loadPluginsFromDirectory')"/> <xsl:variable name="skip_methods" select="('OpenMM_Context_getState', 'OpenMM_Platform_loadPluginsFromDirectory')"/>
<!-- Suppress any function which references any of the following classes --> <!-- Suppress any function which references any of the following classes -->
...@@ -46,7 +46,6 @@ static <xsl:call-template name="wrap_type"><xsl:with-param name="type_id" select ...@@ -46,7 +46,6 @@ static <xsl:call-template name="wrap_type"><xsl:with-param name="type_id" select
typedef struct OpenMM_<xsl:value-of select="concat(@name, '_struct OpenMM_', @name, ';')"/> typedef struct OpenMM_<xsl:value-of select="concat(@name, '_struct OpenMM_', @name, ';')"/>
</xsl:for-each> </xsl:for-each>
typedef struct OpenMM_IntArray_struct OpenMM_IntArray;
typedef struct OpenMM_2D_IntArray_struct OpenMM_2D_IntArray; typedef struct OpenMM_2D_IntArray_struct OpenMM_2D_IntArray;
typedef struct OpenMM_3D_DoubleArray_struct OpenMM_3D_DoubleArray; typedef struct OpenMM_3D_DoubleArray_struct OpenMM_3D_DoubleArray;
......
...@@ -286,8 +286,10 @@ UNITS = { ...@@ -286,8 +286,10 @@ UNITS = {
("AmoebaMultipoleForce", "getCovalentMap") : ( None, ()), ("AmoebaMultipoleForce", "getCovalentMap") : ( None, ()),
("AmoebaMultipoleForce", "getCovalentMaps") : ( None, ()), ("AmoebaMultipoleForce", "getCovalentMaps") : ( None, ()),
("AmoebaMultipoleForce", "getScalingDistanceCutoff") : ( 'unit.nanometer', ()), ("AmoebaMultipoleForce", "getScalingDistanceCutoff") : ( 'unit.nanometer', ()),
#("AmoebaMultipoleForce", "getElectricConstant") : ( '1/(unit.nanometer*unit.kilojoule_per_mole)', ()),
("AmoebaMultipoleForce", "getElectricConstant") : ( None, ()), ("AmoebaMultipoleForce", "getElectricConstant") : ( None, ()),
#("AmoebaMultipoleForce", "getElectrostaticPotential") : ( None, ('unit.kilojoule_per_mole')),
#("AmoebaMultipoleForce", "getElectrostaticPotential") : ( ('unit.kilojoule_per_mole'), ()),
("AmoebaMultipoleForce", "getElectrostaticPotential") : ( None, ()),
("AmoebaOutOfPlaneBendForce", "getNumOutOfPlaneBends") : ( None, ()), ("AmoebaOutOfPlaneBendForce", "getNumOutOfPlaneBends") : ( None, ()),
("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendCubic") : ( None,()), ("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendCubic") : ( None,()),
......
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