Skip to content

Commit

Permalink
Merge pull request #11 from j0kaso/master
Browse files Browse the repository at this point in the history
add ui helper functions, example ngl script, changed naming of arguments, add --script option, removed not supported files, update NGL, add versioneer
  • Loading branch information
j0kaso authored Jan 11, 2017
2 parents 5c4136e + f0ccfad commit 7aa5001
Show file tree
Hide file tree
Showing 22 changed files with 3,191 additions and 2,574 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file, following t



## [v0.3] - 2016-01-11
### Added
- --script arguments
- versioneer
- DOC: installation & deployment, usage, scripting

### Changed
- major ngl update to version 0.10.0-dev5


## [v0.2] - 2016-02-12
Expand Down
17 changes: 17 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ Follow semantic versioning and make sure the changelog is up-to-date.
For non prerelease level also update [README.md](README.md) and [CHANGELOG.md](CHANGELOG.md) and make a release on github including copying the relevant info from the changelog file there.


We use [Versioneer](https://github.com/warner/python-versioneer) to automatically update the version string (of a release but also in development). This means for a release a new git tag should be created. The tag should be of the form vX.Y or vX.Y.Z and generally follow [pep440](https://www.python.org/dev/peps/pep-0440/) with a prefixed "v".

```bash
git tag -a vX.Y -m "version X.Y"
git push
git push origin --tags
python setup.py sdist upload -r pypi # better use twine for uploading, see below
```

To ensure a secure upload use `twine`:
```bash
# Create some distributions in the normal way:
python setup.py sdist
# Upload with twine:
twine upload dist/*
```


Development
===========
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ For license texts see at the end of this document.
//////////
// MDsrv

The MIT License, Copyright © 2013-2016 Alexander S. Rose
The MIT License, Copyright © 2013-2017 Alexander S. Rose

applies to all files unless otherwise noted


//////////
// NGL

The MIT License, Copyright © 2013-2016 Alexander S. Rose
The MIT License, Copyright © 2013-2017 Alexander S. Rose

applies to all files unless otherwise noted (excluding files in tmp/*).

Expand Down
5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
graft mdsrv/webapp
include LICENSE README.md
include LICENSE README.md DEVELOPMENT.md CHANGELOG.md
include setup.py
global-exclude *.pyc
include mdsrv/_version.py versioneer.py
global-exclude *.pyc
104 changes: 9 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MDsrv is a simple server that enables remote access to coordinate trajectories from molecular dynamics simulations. It can be used together with the NGL Viewer (http://github.com/arose/ngl) to interactively view trajectories of molecular complexes in a web-browser, either within a local network or from anywhere over the internet.

See it in action:
* [Web application](http://proteinformatics.charite.de/ngl/html/mdsrv.dev.html?load=file://MDsrv/example.ngl)
* [Web application](http://proteinformatics.charite.de/MDsrv-example)
* [Documentation](http://arose.github.io/mdsrv/)


Expand All @@ -34,7 +34,7 @@ Table of contents
Documentation
============

Detailed information concerning the installation, deployment and usage can be found at the [documentation](http://arose.github.io/mdsrv/).
Detailed information concerning the installation, deployment, usage and scripting examples can be found at the [documentation](http://arose.github.io/mdsrv/).


Installation
Expand Down Expand Up @@ -71,7 +71,7 @@ Deployment

The Apache Webserver can used to run the server via `mod_wsgi`. First make sure you have everything required installed:

sudo apt-get install git apache2 libapache2-mod-wsgi
sudo apt-get install apache2 libapache2-mod-wsgi


Then you need to create a wsgi configuration file to be referenced in the Apache configuration. There is an example named [mdsrv.wsgi.sample](mdsrv.wsgi.sample) in the root directory of this package. Also, a snippet showing how the configuration for Apache should look like can be found in the [apache.config.sample](apache.config.sample) file.
Expand All @@ -80,104 +80,16 @@ Finally, to restart apache issue

sudo /etc/init.d/apache2 restart


More information can be found at the [documentation](http://arose.github.io/mdsrv/).

RESTful API
===========

The RESTful API is the interface through which the web application gets all data but it may be also used to access the served trajectory data from other applications.

You can retrieve information about directory content (e.g. name of sub-directory, file name, file size), number of frames and frame coordinates.

File content
------------

To retrieve a file from `data_dir` `<root>` with file path `<filename>` call:

/file/<root>/<filename>


Directory content description
-----------------------------

To get a JSON description of available `data_dir` directories call:

/dir/


To get a JSON description of the directory content in `data_dir` `<root>` call:

/dir/<root>/


To get a JSON description of the directory content in `data_dir` `<root>` at path `<path>` call:

/dir/<root>/<path>


The JSON description is a list of file or sub-directory entries:

```JSON
[
{
"name": "name of sub-directory",
"path": "path relative to `<root>`",
"dir": "`true` if entry is a directory",
"restricted": "`true` if access is restricted"
},
{
"name": "name of the file",
"path": "path relative to `<root>`",
"size": "file size in bytes"
},
{
...
}
]
```


Frame count
-----------

To get the number of frames the trajectory in `data_dir` `<root>` with file path `<filename>` has call:

/traj/numframes/<root>/<filename>


Frame coordinates
-----------------

To get the coordinates of frame number `<frame>` of the trajectory in `data_dir` `<root>` with file path `<filename>` call:

/traj/frame/<frame>/<root>/<filename>


The set of atoms for which coordinates should be returned can be restricted by `POST`ing an `atomIndices` parameter with the following format. A list of index ranges is defined by pairs of integers separated by semi-colons (`;`) where the two integers within a pair are separated by a comma (`,`). To select atoms with indices (starting at zero) 5 to 10 and 22 to 30 send:

5,10;22,30


The coordinate frame is returned in binary format and also contains the frame number, the simulation time (when available) and the box vectors.

| Offset | Size | Type | Description |
| -----: | ---: | ----: | :--------------------------- |
| 0 | 4 | int | frame number |
| 4 | 4 | float | simulation time |
| 8 | 4 | float | X coordinate of box vector A |
| 12 | 4 | float | Y |
| 16 | 4 | float | Z |
| 20 | 4 | float | X coordinate of box vector B |
| 24 | 4 | float | Y |
| 28 | 4 | float | Z |
| 32 | 4 | float | X coordinate of box vector C |
| 36 | 4 | float | Y |
| 40 | 4 | float | Z |
| 44 | 4 | float | X coordinate of first atom |
| 48 | 4 | float | Y |
| 52 | 4 | float | Z |
| ... | ... | ... | ... |


For more information, please visit the [documentation](http://arose.github.io/mdsrv/).

NGL browser support
===============
Expand Down Expand Up @@ -207,7 +119,8 @@ Thanks to code from MDAnalysis (http://www.mdanalysis.org/) there is random acce
Funding sources:

* NCI/NIH award number U01 CA198942
* DFG Projekt HI 1502
* DFG project HI 1502
* HLRN project bec00085


Cite
Expand All @@ -216,4 +129,5 @@ Cite
When using MGsrv please cite:

* A. S. Rose, and MDsrv Contributors. MDsrv v0.2 Zenodo (2016), doi:10.5281/zenodo.45961. [doi:10.5281/zenodo.45961](http://dx.doi.org/10.5281/zenodo.45961)
* AS Rose, AR Bradley, Y Valasatava, JM Duarte, A Prlić and PW Rose. _Web-based molecular graphics for large complexes._ ACM Proceedings of the 21st International Conference on Web3D Technology (Web3D '16): 185-186, 2016. [doi:10.1145/2945292.2945324](http://dx.doi.org/10.1145/2945292.2945324)
* AS Rose and PW Hildebrand. _NGL Viewer: a web application for molecular visualization._ Nucl Acids Res (1 July 2015) 43 (W1): W576-W579 first published online April 29, 2015. [doi:10.1093/nar/gkv402](https://doi.org/10.1093/nar/gkv402)
Binary file removed data/DPDP.nc
Binary file not shown.
Loading

0 comments on commit 7aa5001

Please sign in to comment.