Skip to content

khoivan88/qr-generator-3dview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVERVIEW

  • This template is inspired by QRChem by Professor Neil Garg and his QRChem team. However, this template allows users to upload their own structures and not just structures existing in Pubchem database.
  • What this template is: This is a simple template for auto generation of QR code for uploaded molecules. This template does:
    1. Upload structural files to a pre-determined folder on server via http or https
    2. Generate a QR code to the 3D viewer (using 3DMol.js) for the uploaded files
  • What this template is NOT: it does not optimize (i.e. energy minimization) the structure input so the structures will need to be optimized before uploading.

CONTENT


DEMO

Demo

REQUIREMENTS

  • Server access
  • PHP 5+

USAGE

  1. Clone this github to your local server:

  2. Modify the url for your 3D Viewer page in qrgenerator.php by setting $viewerUrl by replacing http://localhost in the following line with your webpage url:

    $viewerUrl = 'http://localhost/3dviewer.html?file=' . $fileNameWithoutExtension;
  3. Modify the upload folder, currently upload/structures in:

  4. (Optional) Modify the requirement for uploaded files in upload.php. Current settings:

  5. (Optional) Modify the file format for QR code by replacing .svg in $imageName in qrgenerator.php. Options include: '.png', '.gif', 'jpeg', 'jpg', 'svg', and 'eps'. More info here

  6. Copy these files into your web folder:

    • qrgenerator.php
    • upload.php
    • 3dviewer.html
  7. Make sure the webserver user (i.e. 'apache' on CentOS 7 or 'www-apache' on Ubuntu) has read and write access to the:

    • Upload folder
    • qrgenerator.php
    • upload.php
    • 3dviewer.html
  8. Enjoy!


DEPENDENCIES


QUESTIONS/COMMENTS

All questions, comments, suggestions are welcomed! Please consider creating a new issue.

About

Demo page for generation of QR code for uploaded 3D molecules and its viewer page

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published