[gmx-developers] Using C++ with Gromacs

Erik Lindahl lindahl at cbr.su.se
Thu May 8 01:40:37 CEST 2008

Hi Peter,

On May 8, 2008, at 1:08 AM, Peter Eastman wrote:
> I should explain that we eventually hope to have OpenMM integrated  
> into a large number of different programs that are written in a  
> number of different languages: C, C++, Fortran, Python, Java, TCL,  
> etc.  It's obviously impractical for the library to provide a  
> complete "generic" API for every language anyone might ever want to  
> call it from, much less a separate API for every possible  
> application.  So we decided to create a single API, make it as  
> simple and clean as possible, and then accept that applications  
> written in other languages would need to include a wrapper layer to  
> invoke it.  C++ was then the clear choice for that API: it's fairly  
> easy to integrate with code in any language, even interpreted ones,  
> and it has the necessary features to create a clean API of the sort  
> we wanted (in contrast to C or Fortran, which would have required a  
> very convoluted, very unnatural API).

Just out of curiosity - since I actually do like many things with  
object orientation - do you know of _any_ successful truly portable  
example of such a C++ library? (that people actually are using from  
other languages to a large extent). CGAL is the most common example I  
hear of "well-designed big C++ library", but problematic portability  
doesn't even begin to describe it...



More information about the gromacs.org_gmx-developers mailing list