Using PMR with OpenCOR

In addition to the PMR window for browsing public exposures directly in OpenCOR (PMR window) OpenCOR has the ability for users to directly create and access their workspaces in PMR.

Note

It is a feature of PMR that all data is persistent and permanent. As such, any workspaces created on the main instance of PMR (https://models.physiomeproject.org/) can not be deleted. For the purposes of teaching, we have an alternate instance of PMR (https://teaching.physiomeproject.org/) which is periodically cleared out and synschronised from the main instance. Using the teaching instance allows you to play around without the worry of things being permanent.

  1. Register for a user account on the teaching instance of PMR.

In order to make use of the teaching instance of PMR, you must first have an account for that instance of the repository. For teaching purposes it is best to register a new account. This can be done by first opening this link in your browser: https://teaching.physiomeproject.org. Then click the Log in button on (shown in Fig. 42) then the registration form link.

PMR login button

Fig. 42 The log in button for the teaching instance of PMR.

After filling in the names and email fields and clicking Register you will receive an email inviting you to confirm and set a password. Once that is completed you can then log in. Clicking on My Workspaces will take you to a listing of all your workspaces and provides access to the the Workspace creation form.

  1. Create a new workspace, in this example the title ‘Test workspace’ has been used.

The PMR Workspaces window

A window labelled PMR workspaces is available in OpenCOR (see Fig. 43). If it is not currently visible it can be selected via View ‣ Windows ‣ PMR workspaces (or perhaps the Ctrl-space shortcut).

PMR workspace window

Fig. 43 PMR workspace shown on the left hand panel in OpenCOR. The preferences button is highlighted.

  1. Set preferences.

Clicking the preferences button (Fig. 43) presents a Preferences dialog box with three settings: PMR instance, Name and Email. For the current purpose choose https://teaching.physiomeproject.org for the first and enter your name and email. These are used to identify you as the author of changes you submit back to the repository (view an example history).

  1. Log into PMR from OpenCOR.

Before you can view private information or submit changes to PMR you must first log in to PMR from OpenCOR and grant OpenCOR permission to use your account. You accomplish this by clicking on the top right button in the PMR Workspaces window and then logging in with your new user name and password (created in step 1). Then grant access for OpenCOR to gain access to your PMR workspaces. The PMR workspaces window will then show all your workspaces, which should currently consist of the new workspace created in step 2. Note that using the same top right button you can log off - and when you next authenticate you will again be asked to grant access but this time without needing to login with your password.

Right clicking on the workspace name brings up a list of options for that workspace, the first being to view the workspace within PMR (in the web browser). Another option allows you to make a local copy of a workspace on your local disk - this will create a copy of the workspace on your local computer in which you are able to make changes.

  1. Make a local copy of your test workspace

Using the Make Local Workspace Copy… option from the right-click menu on the workspace you created in step 2, clone the workspace to your PC. When doing this you will need to provide the folder in which you want to store the workspace contents - make sure you remember where this folder is!

  1. Save a CellML model to your workspace.

A CellML file opened in OpenCOR (choose any model you have access to) can be saved (File ‣ Save As…) to the folder you created for the cloned workspace. Once you have saved a model you will see the file appear under the workspace’s folder in the PMR Workspaces window. Note that the file appears under the workspace with a red patch on the logo indicating the the file is not yet flagged to upload. To upload the file to PMR, you need to choose Synchronise Workspace With PMR… from the right-click menu on the workspace folder. This will ask you to provide a description of the change you would like to submit to PMR, and display all the differences you will be synchronising. When you now click the OK button, the changes will actually be submitted to PMR and you will see the file appear on the refreshed browser window. The file icon in the PMR Workspaces window will be shown without the red or green patch. Fig. 44 shows two CellML files that have been uploaded to PMR.

Committing a change to PMR

Fig. 44 Two CellML files (New BG Fluids model 3.cellml and new kidney.cellml) have been uploaded from OpenCOR to PMR and can be seen in the PMR workspace on the browser window on the right.