'SimPL' is a Content Management System for Simulation Platforms.
- To provide researcher-friendly(not developer-friendly) development environments
- To spread researcher's precious knowledge(include code, know-how and pre/post processing skills
- To generate research bigdata for diverse field of research
- You can create your own simulation platform customized for you with functions what you want .
- You can do modeling, calculation, and analysis in one platform.
- Your platform development process will be very simple.
- You can easily import platforms shared by others and create new platforms or add functions to your platform.
- Pages "Page" is a web page which consists of standard web elements(images, texts, links, input form...) and SimPL web components.
- Plugins "Plugin" is a small program which connects back-end elements(such as solver, linux server,...) to Pages. Currently, Plugins are written in Python(2.7.3) and we're planing to give more options to SimPL Creators.
Laravel 5.5, Bootstrap 3.3.7
Apache, PHP( > 7.0), MySQL( > 5.7) or MariaDB ( > 10.2)
Python 2.7, Torque PBS Scheduler
https://github.com/simpl-kist/SimPL_public.git
Open ".env" in SimPL Repository folder and set laravel environment.
Go to "http(s)://your-url/admin" to sign in and log in. The first regeisterer will become an admin.
Go to "General" and set SimPL environment.
simpl_init.sh will automatically create the initial structure of the DB.
As described in the introduction section, "Page" is a specialized html page for simulation platform. You can use typical html tags such as table, div, font,.. and SimPL Web Components to make your "Page". "Page" usually consist of CSS(Design), HTML(Body), Javascript(Funtions).
There are two ways to create a page. The first is "Script". You can write CSS, HTML and Javascript here. Next is WYSIWYG Editor. You can easily edit HTML to create layouts.
VLAtoms is web based atomic visualizer. VLAtoms is written by Javascipt and using web-standard components such as Canvas, WebGL and Javascript. Thus, Most of modern web brower supports VLAtoms without any plugins. You can include VLAtoms into your page with a tag below. { { kCMS|VLATOMS|vla|width:500,height:500} } (remove space between { and { )
You can make a page by combination of other pages by code below: { { kCMS|PAGE|alias } } "alias" is an alias of other page defined in the page editor
You can connect your page with "Plugin" by SimPL JS API. Basically, SimPL JS API is a wrapper of $.ajax function of jQuery. Javascript Function kCMS.callPlugin( [plugin alias], data, [callback function]); will call a plugin by alias with given data, and callback function will be launched when plugin execution is done.
You can import the necessary page from the SimPL main repository. You can add that page to your SimPL in a simple way by clicking on the Get SimPL button on the "Page" edit page and then entering the repository ID for that Page.
As described in the introduction section, Plugin is a simple program. Expeced role of plugins are :
- To prepare input scripts for solver
- To submit job to solver
- To handle atomic structure with complicated modifications
- To parse output files of user's job Because the plugin is a python script and there's no limitation to access server, You must carefully make your plugin if your plugin writes or deletes some files in the server
When plugin is execued, SimPL automatically generate job directory and python script files.
- +20171211162048_42f21bd7c6afd551972446d7bbf32909
- |-kCmsHeader_global.py
- |-kCmsHeader_global.pyc
- |-kCmsScript__hellosimpl
Here, kCmsHeader_global* script consists of several kCMS functions and user's input as a global variable.
User's input variables are stored in the global variable kCms['input'] so that your plugin can easilly use the user's input In example, your Page passes "name":"Minho Lee" as a data for your plugin, kCms['input'] should be kCms['input'] = {'name':'Minho Lee'} . You can check example case used at "Call a plugin using Javascript" section in the Plugin edit menu in admin page. Also, you can export your plugin's output via json.dumps function in your plugin. In example, print json.dumps("Hello"+kCms['input']['name']) gives return value of your plugin
Plugin can be called from another plugin. As similar to the "Call a plugin using Javascript", You can call other plugin from your plugin by function callPlugin('[plugin Alias]',[Input args]) "callPlugin" function will return output and error of called plugin as JSON format so it is necessary to parse JSON data to Python dictionary like output = json.loads( callPlugin(...) )
Solver is the page where you register your calculation methodology. When you register a solver, you can fill in 5 inputs.
*"Name" is the solver's name.(Names can not be duplicated.) *"Path" is the path where the solver is installed. "Exec Command" is the command when using the solver. "Version" is the solver's version. "Author" is the person who develped the solver. *is required.
Function | Input | Output | Description |
---|---|---|---|
file_get_contents | (filename, use_include_path = 0, context = None, offset = -1, maxlen = -1) | File Context | Read File data |
getSolver | (solvername) | Sover Info | Import registered Solver information for using. |
qsub | (params={ mpi : True|False, # solverExec : [execution command for solver], # ppn : processors per node, nnodes : number of nodes }) | Queue ID | Submit the job to the scheduler. |
qstat | (id=-1) | Status of the job in Scheduler. | Check the status of jobs in the scheduler. |
callPlugin | (Plugin Alias, Input Data) | Output of the called Plugin | Call another plugin. |
getMyInfo | () | The information of the user | >Load the information of the user who called the plugin |
getRepo | (Alias of file in Repository for server) | File Contents | Read the file in the Repository for Server. |
saveJob | (args={qinfo, status, pluginId, jobBefore, jobNext, input, output, name, jobdir}) | DB id of Job | Save Something to DB. |
getJobs | (args={"cols":[column list you want to get], "order":[key,("asc" or "desc"), "limit":["offset","limit"], "criteria":["array of criteria(Raw Where Query)"], [columns]:[value] }) | Jobs that meet the conditions. | Load Saved Job Data from DB. |
You can import the necessary plugin from the SimPL main repository. You can add that page to your SimPL in a simple way by clicking on the Get SimPL button on the "Plugin" edit page and then entering the repository ID for that Plugin.
Your-url/preset/myInfo
- kCms.callPlugin("pluginAlias",data={"input data"},callback=function(ret){..})
- kCms.uploadFile("repos_for"=("web, "server"),files,callback=function(ret){...})
- kCms.downloadFile("repos_for"=("web, "server"),["list of file alias"])
Job is the place to store something in SimPL. It is structured to store any data. You can store and load data by the plugin built-in functions saveJobs and getJobs.
Column | Type | Default | Remarks |
---|---|---|---|
id | unsigned int(10) | not nullable(auto-increment) | |
parent | int(11) | nullable | |
project | int(11) | nullable | |
owner | int(11) | nullable | |
type | varchar(255) | nullable | |
qinfo | longtext | nullable | |
jobdir | varchar(255) | nullable | |
status | varchar(32) | nullable | |
pluginId | int(11) | nullable | |
jobBefore | longtext | nullable | |
jobNext | longtext | nullable | |
input | longtext | nullable | |
output | longtext | nullable | |
name | text | nullable | |
created_at | timestamp | nullable | |
updated_at | timestamp | nullable |
- You can upload files for "web" and "server".
- In "Repository for Web", you can usually upload a picture files and include them your page like "< img src="repo/alias of file" >".
- Files to be used by the plugin are uploaded to "Repository for Server". They can be read with the plugin built-in function getRepo.