leeping / nanoreactor Goto Github PK
View Code? Open in Web Editor NEWNanoreactor analysis codes (not yet released)
License: Other
Nanoreactor analysis codes (not yet released)
License: Other
#Nanoreactor package #### Authors: Lee-Ping Wang, Heejune Park, Robert McGibbon, Leah Isseroff Bendavid, Alexey Titov, Todd J. Martinez This is a script and library to analyze reactive MD (nanoreactor) simulations. It provides two main capabilities: ### 1) Reaction extraction and visualization. To analyze a simulation trajectory, run "LearnReactions.py traj.xyz". Use the "-h" argument to get help. It will generate reaction_123.xyz files that contain your chemical reactions, as well as bonds.dat, color.dat, charge.dat and spin.dat used to highlight your reactive MD trajectory. To view the highlighted trajectory, you need to install VMD and preferably be using a 3D-accelerated machine. Make sure reactions.vmd is in the same folder and run using: 'vmd -e reactions.vmd -args coors.xyz' ### 2) Energy refinement of extracted reactions. To convert a nanoreactor "reaction event" into a minimum energy path, run "Refine.py reaction.xyz". It will start a workflow which (1) optimizes the geometries of subsampled frames, (2) find frame pairs that contain chemically distinct species and construct a pathway connecting the energy basins, (3) smooth the pathway in internal coordinates, and (4) perform string method + transition state + intrinsic reaction coordinate calculations to locate the minimum energy path. Finally it will summarize the reaction as a PDF at the end. #### Installation: To install the package, run "python setup.py install". Make sure all dependencies are installed (below) - it's more challenging than installing the package itself. :) An example for LearnReactions.py is included. Examples for Refine.py are forthcoming. #### Dependencies (there are many, though I tried to keep the # down): - Python 2.7, 3.5 or above, and the Python packages numpy, scipy and networkx. The sklearn package is recommended but not required. These dependencies are satisfied if you get the Python distribution from Enthought Canopy or (I think) Anaconda. Note that future versions of sklearn (0.17) plan to deprecate the Hidden Markov Model so this dependency may need to be updated in the future. - The Cooperative Computing Tools (http://ccl.cse.nd.edu/software/) is recommended for rolling out a highly parallel energy refinement calculation of many pathways. Using the Work Queue library, hundreds to thousands of Q-Chem calculations may be run in parallel across any combination of available computing resources. - Q-Chem 4.2 is required for running the energy refinement calculations. MPI and OpenMP parallelism are both required, because the stability analysis only works with MPI and the other components work with OpenMP. IMPORTANT NOTE: The commercial version of Q-Chem is somewhat problematic for the intrinsic reaction coordinate part of the calculation, because the user has no way to set the IRC initial direction. I have modified the source code to make sure the rpath_direction rem variable works as intended; the Q-Chem binary on Fire has this change, and I submitted the updated source code to the Q-Chem repository. The following is required for drawing the summary PDF at the end of energy refinement: - Gnuplot for drawing the energy diagram. Make sure the SVG terminal is supported. - lxml (Python interface to libxml2) for parsing XML files. Comes with Anaconda and Enthought Canopy. If installing from scratch, you need to install libxml2 and libxslt first. - Openbabel (version from GitHub newer than September 26, 2014). Used for generating SVG images of molecules. As of September 26, 2014, the latest release contained bugs so please check out the code from GitHub (https://github.com/openbabel/openbabel) and build from source. Make sure to build with Python bindings enabled. Building Openbabel requires Eigen which is a pain, but it comes as a Ubuntu package. - rsvg-convert for converting SVG to PDF. SVG is a nice file format for editing vector graphics, but it may look different when viewed on different machines. This is part of the GNOME project and comes as a Ubuntu package; building from souce might be painful. Enjoy! - Lee-Ping License: This software uses the BSD license (except for nebterpolator which uses GNU GPL 3.0). See LICENSE and nebterpolator/LICENSE.
Dear developers, I have tried to take a look at the example given, with a freshly installed VMD version and sadly it just crashed the program. I am not sure if this is an issue with VMD itself, or the given input file is broken.
OS: MacOS Big Sur 11.1 (Mac Book Pro 13" 2020)
VMD version: 1.9.4a51-x86_64-Rev9 (currently only intel+bigsur version from website with tag: (Dec 21, 2020): MacOS X Big Sur fixes w/ Tcl/Tk 8.6.11)
The output is the following:
~/work/nanoreactor/example master ❯ vmd -e reactions.vmd -args coors.xyz х KILL 9s Py wfl_test 08:19:12 am
Info) VMD for MACOSXX86_64, version 1.9.4a51 (December 21, 2020)
Info) http://www.ks.uiuc.edu/Research/vmd/
Info) Email questions and bug reports to [email protected]
Info) Please include this reference in published work using VMD:
Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
Info) -------------------------------------------------------------
Info) Multithreading available, 8 CPUs detected.
Info) CPU features: SSE2 SSE4.1 AVX AVX2 FMA F16 HT
Info) High-DPI OpenGL display support enabled.
Info) OpenGL renderer: Intel(R) Iris(TM) Plus Graphics OpenGL Engine
Info) Features: STENCIL MDE MTX NPOT PP PS GLSL(OVF)
Info) Full GLSL rendering mode is available.
Info) Textures: 2-D (16384x16384), 3-D (2048x2048x2048), Multitexture (8)
usage: mol <command> [args...]
Molecules and Data:
new [file name] [options...] -- load file into a new molecule
new atoms <natoms> -- generate a new molecule with 'empty' atoms
addfile <file name> [options...] -- load files into existing molecule
options: type, first, last, step, waitfor, volsets, filebonds, autobonds,
<molid> (addfile only)
load <file type> <file name> -- load molecule (obsolescent)
urlload <file type> <URL> -- load molecule from URL
pdbload <four letter accession id> -- download molecule from the PDB
cancel <molid> -- cancel load/save of trajectory
delete <molid> -- delete given molecule
rename <molid> <name> -- Rename the specified molecule
dataflag <molid> [set | unset] <flagname> -- Set/unset data output flags
list [all|<molid>] -- displays info about molecules
Molecule GUI Properties:
top <molid> -- make that molecule 'top'
on <molid> -- make molecule visible
off <molid> -- make molecule invisible
fix <molid> -- don't apply mouse motions
free <molid> -- let mouse move molecules
active <molid> -- make molecule active
inactive <molid> -- make molecule inactive
Graphical Representations:
addrep <molid> -- add a new representation
delrep <repid> <molid> -- delete rep
default [color | style | selection | material] <value>
representation|rep <style> -- set the drawing style for new reps
selection <selection> -- set the selection for new reps
color <color> -- set the color for new reps
material <material> -- set the material for new reps
modstyle <repid> <molid> <style> -- change the drawing style for a rep
modselect <repid> <molid> <selection> -- change the selection for a rep
modcolor <repid> <molid> <color> -- change the color for a rep
modmaterial <repid> <molid> <material> -- change the material for a rep
repname <molid> <repid> -- Get the name of a rep
repindex <molid> <repname> -- Get the repid of a rep from its name
reanalyze <molid> -- Re-analyze structure after changes
bondsrecalc <molid> -- Recalculate bonds, current timestep
ssrecalc <molid> -- Recalculate secondary structure (Cartoon)
selupdate <repid> <molid> [on|off] -- Get/Set auto recalc of rep selection
colupdate <repid> <molid> [on|off] -- Get/Set auto recalc of rep color
scaleminmax <molid> <repid> [<min> <max>|auto] -- Get/set colorscale minmax
drawframes <molid> <repid> [<framespec>|now] -- Get/Set drawn frame range
smoothrep <molid> <repid> [smooth] -- Get or set trajectory smoothing value
showperiodic <molid> <repid> [flags] -- Get or set periodic image display
numperiodic <molid> <repid> <n> -- Get or set number of periodic images
showrep <molid> <repid> [on|off] -- Turn selected rep on or off
volaxes <molid> <volID> <Xaxis> <Yaxis> <Zaxis> -- set vol axes
voldelete <molid> <volID> -- delete volumetric data
volmove <molid> <volID> <matrix> -- transform volumetric data
volorigin <molid> <volID> <vector> -- set origin
volscale <molid> <volID> <vector> -- scale volume
Clipping Planes:
clipplane center <clipid> <repid> <molid> [<vector>]
clipplane color <clipid> <repid> <molid> [<vector>]
clipplane normal <clipid> <repid> <molid> [<vector>]
clipplane status <clipid> <repid> <molid> [<mode>]
clipplane num
See also the molinfo command
Usage: Either launch VMD with 'vmd -e test.vmd -args my_xyz_file.xyz'
or open VMD and run 'play my_xyz_file.xyz'
coors.xyz
Info) Using plugin xyz for structure file coors.xyz
Info) Using plugin xyz for coordinates from file coors.xyz
Info) Finished with coordinate file coors.xyz.
Info) Analyzing structure ...
Info) Atoms: 228
Info) Bonds: 0
Info) Angles: 0 Dihedrals: 0 Impropers: 0 Cross-terms: 0
Info) Bondtypes: 0 Angletypes: 0 Dihedraltypes: 0 Impropertypes: 0
Info) Residues: 228
Info) Waters: 0
Info) Segments: 1
Info) Fragments: 228 Protein: 0 Nucleic: 0
0
atomselect0
228
0
color.dat
couldn't open "color.dat": no such file or directory
1510
0
can't read "fp": no such variable
can't read "fp": no such variable
0
bonds.dat
couldn't open "bonds.dat": no such file or directory
can't read "fp": no such variable
charge.dat
can't read "fp": no such variable
spin.dat
can't read "fp": no such variable
0
vmd > 2021-01-25 08:19:49.096 VMD[2916:181886] -[FLWindow tkLayoutChanged]: unrecognized selector sent to instance 0x7f8c4544eb00
2021-01-25 08:19:49.104 VMD[2916:181886] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FLWindow tkLayoutChanged]: unrecognized selector sent to instance 0x7f8c4544eb00'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff204936af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff201cb3c9 objc_exception_throw + 48
2 CoreFoundation 0x00007fff20515c85 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff203fb07d ___forwarding___ + 1467
4 CoreFoundation 0x00007fff203faa38 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x00007fff2040efec __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x00007fff204aa89b ___CFXRegistrationPost_block_invoke + 49
7 CoreFoundation 0x00007fff204aa80f _CFXRegistrationPost + 454
8 CoreFoundation 0x00007fff203dfbde _CFXNotificationPost + 723
9 Foundation 0x00007fff2114eabe -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
10 AppKit 0x00007fff23756caa -[NSWindow(NSFullScreen) _didEnterFullScreen] + 118
11 AppKit 0x00007fff2313fd7f -[_NSWindowEnterFullScreenTransitionController doAfterEnterFullScreen] + 266
12 AppKit 0x00007fff235a817c -[_NSEnterFullScreenTransitionController _performFinalTransitionCleanup] + 50
13 AppKit 0x00007fff235a80ff __68-[_NSEnterFullScreenTransitionController _startFullScreenTransition]_block_invoke + 225
14 libdispatch.dylib 0x00007fff201755dd _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x00007fff201767c7 _dispatch_client_callout + 8
16 libdispatch.dylib 0x00007fff20182b86 _dispatch_main_queue_callback_4CF + 940
17 CoreFoundation 0x00007fff20456970 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
18 CoreFoundation 0x00007fff20418852 __CFRunLoopRun + 2731
19 CoreFoundation 0x00007fff204176ce CFRunLoopRunSpecific + 563
20 HIToolbox 0x00007fff2869c6d0 RunCurrentEventLoopInMode + 292
21 HIToolbox 0x00007fff2869c4cc ReceiveNextEventCommon + 709
22 HIToolbox 0x00007fff2869c1ef _BlockUntilNextEventMatchingListInModeWithFilter + 64
23 AppKit 0x00007fff22c34de9 _DPSNextEvent + 883
24 AppKit 0x00007fff22c335af -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
25 Tk 0x0000000106cfec57 Tk_MacOSXSetupTkNotifier + 355
26 Tcl 0x0000000106e3bb35 Tcl_DoOneEvent + 238
27 VMD 0x0000000104f208fa _ZN13TclTextInterp10doTkUpdateEv + 14
28 VMD 0x0000000104ecbec1 _ZN6UIText11check_eventEv + 47
29 VMD 0x0000000104e253f5 _ZN12CommandQueue12check_eventsEv + 41
30 VMD 0x0000000104ecebb8 _ZN6VMDApp9VMDupdateEi + 38
31 VMD 0x0000000104f038b9 main + 176
32 libdyld.dylib 0x00007fff2033c621 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1] 2916 abort -e reactions.vmd -args coors.xyz
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.