biochem-fan / ndkmol Goto Github PK
View Code? Open in Web Editor NEWMolecular viewer for Android and iOS devices
Home Page: http://webglmol.sfjp.jp/
License: Other
Molecular viewer for Android and iOS devices
Home Page: http://webglmol.sfjp.jp/
License: Other
NDKmol - Molecular Viewer on Android NDK and iOS * This is "development" branch. Please use ES1 branch for a stable version * == About == NDKmol is a molecular viewer for Android. You can view three dimensional structures of proteins and small molecules. NDKmol supports most of common representations for molecules, such as ribbon, trace, stick, sphere and line. NDKmol also supports symmetry operations; biological assemblies and crystal packing can be displayed. NDKmol is very compact and optimized for performance. You can open large molecules like ribosome! NDKmol has same functionality as GLmol, which is written in WebGL/Javascript and runs on Web browsers. You can try GLmol at http://webglmol.sourceforge.jp/index-en.html == Features == * Read PDB file * Read SDF/MOL file * Search and Download structures from RCSB PDB and NCBI PubChem * Rotate/Translate/Zoom model by finger * Representations - Line - Stick - Sphere(van der Waals radius) - Alpha carbon trace - Ribbon (thick or thin) - Strand - B factor tube - Nucleic acid ladder - Nucleic acid line - Solvent 'stars' * Smoothing of beta sheets * Coloring - By chain - By secondary structure(when defined in SHEET/HELIX records) - By Elements - Gradation (a.k.a chainbow) - B factor - polar/nonpolar * Crystallography - Display unit cell - Show crystal packing (when defined in REMARK section) - Display biological assembly (when defined in REMARK section) == How to Use == When launched, NDKmol automatically loads porin (PDBID: 2POR) as an example. You can rotate the molecule by your finger. To zoom or translate the molecule, press <MENU> button in your phone/tablet and select the mode. Two-finger gestures are also supported. Everything can be done from the <MENU>; changing representation of protein or ligand (non protein molecules), changing colors, showing biological assembly, crystal packing and/or unit cell. To load other PDB files, please put the file in "PDB" directory of the SD card and select "Open" command in the MENU. You can also download structures directly from RCSB PDB and NCBI PubChem web server. Select "Search and Download" in the menu. == Reference == A PDB file (PDBID: 2POR) is included as an example. "Structure of porin refined at 1.8 A resolution" Weiss, M.S., Schulz, G.E., J.Mol.Biol. 227: 493-509 (1992) == License == (C) Copyright biochem_fan, 2011-2013 LGPL version 3. Briefly, you don't have to open-source your code but if you modified my code, please open-source the modification so that I can merge it. Also please acknowledge use of my code in e.g. "About" dialog. If LGPL is not suitable for your purpose, just tell me. I will consider another license for you. == Contact == Project website is located at http://webglmol.sourceforge.jp/ Comments and suggestions are welcome at http://sourceforge.jp/projects/webglmol/forums/ or [email protected] == iOS support == iOS port was merged to this repository. How to use: single-finger drag - rotation double-finger drag(pan) - translation double-finger pinch - zoom single-finger long press - open "view settings" panel Lacking Features: File browser and PDB/PubChem searcher is not implemented. How to integrate to your code: "MolecularViewerViewController.mm" is the main view controller. You can invoke this controller from your code. To change models, save PDB file in the resource directory and call "loadMolecule" method in MolecularViewerViewController.mm == Build instructions == Android: Don't forget to install Android NDK as well as Android SDK. == Switching OpenGL ES 1.0 and 2.0 == By default, iOS version uses GL ES 2.0 and Android version uses GL ES 1.0. To change this behaviour, please edit GLES.hpp. For Android, you need to edit three files as well. - Applicatin.mk - Android.mk - AndroidManifest.xml see comments in the file - NDKmolActivity.java public static final boolean GLES1 = true; // or false I don't know why, but the Android simulator fails to run GL ES 2.0 version of NDKmol, which works on actual devices.
make: *** No rule to make target 'jni/Atom.cpp', needed by 'obj/local/armeabi/objs/Ndkmol/Atom.o'. Stop.
(At least this is the error with gcc; I deleted my clang compilers.
From @wojdyr
for 3a22.pdb "show monomer" shows dimer, and "Show biological unit" - shows monomer.
"Show as is" or "Show asymmetric unit" ?
Reported by @wojdyr
working on a android app and when I click my button it should take me to NDKmolActivity well when I test the app out and i click the button I the app crashes please help
Heres my logcat log:
08-08 22:15:21.509: D/dalvikvm(3658): GC_FOR_ALLOC freed 104K, 2% free 11699K/11908K, paused 13ms, total 13ms
08-08 22:15:21.529: D/dalvikvm(3658): GC_FOR_ALLOC freed 99K, 2% free 12091K/12300K, paused 11ms, total 11ms
08-08 22:15:23.832: W/dalvikvm(3658): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/d4a/sts/NDKmolActivity;
08-08 22:15:23.832: W/dalvikvm(3658): Class init failed in newInstance call (Lcom/d4a/sts/NDKmolActivity;)
08-08 22:15:23.832: D/AndroidRuntime(3658): Shutting down VM
08-08 22:15:23.832: W/dalvikvm(3658): threadid=1: thread exiting with uncaught exception (group=0x41af4700)
08-08 22:15:23.832: E/AndroidRuntime(3658): FATAL EXCEPTION: main
08-08 22:15:23.832: E/AndroidRuntime(3658): java.lang.UnsatisfiedLinkError: Couldn't load Ndkmol from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.d4a.sts-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.d4a.sts-2, /vendor/lib, /system/lib]]]: findLibrary returned null
08-08 22:15:23.832: E/AndroidRuntime(3658): at java.lang.Runtime.loadLibrary(Runtime.java:355)
08-08 22:15:23.832: E/AndroidRuntime(3658): at java.lang.System.loadLibrary(System.java:525)
08-08 22:15:23.832: E/AndroidRuntime(3658): at com.d4a.sts.NDKmolActivity.(NDKmolActivity.java:61)
08-08 22:15:23.832: E/AndroidRuntime(3658): at java.lang.Class.newInstanceImpl(Native Method)
08-08 22:15:23.832: E/AndroidRuntime(3658): at java.lang.Class.newInstance(Class.java:1130)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.app.ActivityThread.access$600(ActivityThread.java:141)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.os.Handler.dispatchMessage(Handler.java:99)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.os.Looper.loop(Looper.java:137)
08-08 22:15:23.832: E/AndroidRuntime(3658): at android.app.ActivityThread.main(ActivityThread.java:5103)
08-08 22:15:23.832: E/AndroidRuntime(3658): at java.lang.reflect.Method.invokeNative(Native Method)
08-08 22:15:23.832: E/AndroidRuntime(3658): at java.lang.reflect.Method.invoke(Method.java:525)
08-08 22:15:23.832: E/AndroidRuntime(3658): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
08-08 22:15:23.832: E/AndroidRuntime(3658): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-08 22:15:23.832: E/AndroidRuntime(3658): at dalvik.system.NativeStart.main(Native Method)
if you need anything else please fell free to reply
Regards
Chris
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.