Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCMSolver v2.Y.Z wishlist #139

Open
9 tasks
robertodr opened this issue Mar 29, 2018 · 0 comments
Open
9 tasks

PCMSolver v2.Y.Z wishlist #139

robertodr opened this issue Mar 29, 2018 · 0 comments

Comments

@robertodr
Copy link
Member

I am opening this meta-issue to discuss how the API for the next version should look and what additional features we want the library to have. I had opened a project, but the Kanban-style board is not very good for discussion. And we need a discussion before breaking this one up into issues and action items.

  • Add new items in comments.
  • Already existing issues can be taken up by anyone, and pull requets should be directed towards the master branch.

Infrastructure

API

The context API idea has worked great for us, but what we offer is not as flexible as it could be. From the point of view of the host, the API is mostly pure and we should strive towards greater purity.

  • Drop the requirement for the host to use our own input parser. Input should be parsed by the host and passed down in a well-defined data structure. The advantage of this approach is that the data structure can be clearly versioned and deprecated within the code itself. To run the standalone executable we would need a parser and this can be whatever, as long as the final result of input reading and parsing is the same exact data structure expected by the API initialization function.
    The v2 initialization function would then look:
    PCMSolver_API pcmsolver_context_t * pcmsolver_new(struct PCMSolverInput * input);
    Issues might arise with Fortran interoperability, since we would be shoving at least one function pointer in a user-defined type.
  • More flexible surface functions. We currently assume that our surface functions are vectors of the size of the cavity. This was found to be troublesome to get the ddCOSMO terms out to the host, since they are defined as a matrix. However, once the library has been initialized the dimensions of the PCM matrix (whatever that might be) and the dimensions of the MEP and ASC vectors (whatever those may be) are known and they won't change within a calculation. So we could add the following concoction to our interface (I don't know if this is legal C!):
struct PCMSolverDimension {
   int rank;
   int shape[rank+1];
};

struct PCMSolverDimension pcmsolver_get_site_function_dimension() {
   return((struct PCMSolverDimension) {
        // This is the number of dimensions in the MEP and ASC.
        .rank = 1;  // Column or row vector
        // This is the number of rows
        int nrows = 100;
        // This is the number of columns
        int ncols = 1; // We will work with column vectors
        .shape = {nrows, ncols};
    });
}

int pcmsolver_get_site_function_rank() {
   return dimension_.rank;
}

int[] pcmsolver_get_site_function_shape() {
   return dimension_.shape;
}
  • As shown above, I suggest we rename "surface functions" as "site functions".

Functionality

  • Finish up interface with ddCOSMO.

Solvers

  • Allow usage of iterative solvers. Eigen provides infrastructure for CG and BiCGSTAB, also in matrix-free form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant