Abstract. The motivation for this work is the need for providing tools which facilitate building scientific applications that are developed and executed on various Grid systems, implemented with different technologies. As a solution to this problem, we have developed the Grid Operation Invoker (GOI) which offers object-oriented method invocation semantics for interacting with computational services accessible with diverse middleware frameworks. GOI forms the core of the ViroLab virtual laboratory engine and it is used to invoke operations from within experiments described using a scripting notation. In this paper, after outlining the features of GOI, we describe how it is enhanced with a mechanism of so-called local gems which allows adding high-level support for middleware technologies based on the batch job-processing model, e.g. EGEE LCG/gLite. As a result, we demonstrate how a molecular dynamics program called NAMD, deployed on EGEE, was integrated with the ViroLab virtual laboratory.