#include "OpenMM.h"
#include "OpenMMAmoeba.h"
#include "../../../wrappers/OpenMMCWrapper.h"
#include "AmoebaOpenMMCWrapper.h"
#include <cstring>
#include <vector>
using namespace OpenMM;
using namespace std;
/* Utilities for dealing with Fortran's blank-padded strings. */
static void copyAndPadString(char* dest, const char* source, int length) {
bool reachedEnd = false;
for (int i = 0; i < length; i++) {
if (source[i] == 0)
reachedEnd = true;
dest[i] = (reachedEnd ? ' ' : source[i]);
}
}
static string makeString(const char* fsrc, int length) {
while (length && fsrc[length-1]==' ')
--length;
return string(fsrc, length);
}
extern "C" {
}
/* */
OPENMM_EXPORT void _create_(*& result, const int& size) {
result = _create(size);
}
OPENMM_EXPORT void _CREATE(*& result, const int& size) {
result = _create(size);
}
OPENMM_EXPORT void _destroy_(*& array) {
_destroy(array);
array = 0;
}
OPENMM_EXPORT void _DESTROY(*& array) {
_destroy(array);
array = 0;
}
OPENMM_EXPORT int _getsize_(const * const& array) {
return _getSize(array);
}
OPENMM_EXPORT int _GETSIZE(const * const& array) {
return _getSize(array);
}
OPENMM_EXPORT void _resize_(* const& array, const int& size) {
_resize(array, size);
}
OPENMM_EXPORT void _RESIZE(* const& array, const int& size) {
_resize(array, size);
}
OPENMM_EXPORT void _append_(* const& array, value) {
_append(array, value);
}
OPENMM_EXPORT void _APPEND(* const& array, value) {
_append(array, value);
}
OPENMM_EXPORT void _set_(* const& array, const int& index, value) {
_set(array, index-1, value);
}
OPENMM_EXPORT void _SET(* const& array, const int& index, value) {
_set(array, index-1, value);
}
OPENMM_EXPORT void _get_(const * const& array, const int& index, & result) {
result = _get(array, index-1);
}
OPENMM_EXPORT void _GET(const * const& array, const int& index, & result) {
result = _get(array, index-1);
}
/* OpenMM::
OPENMM_EXPORT
&
const&
result = OpenMM_
,
}
OPENMM_EXPORT
OpenMM_
destroy = 0;
}
OPENMM_EXPORT
,
&
const&
,
target
,
copyAndPadString(result, result_chars, result_length);
};
1
1
1
1
1
1
1
1
1
1
1
1