12/12/2012 Tutorial plan STM4 components and structure Mario Valle USPEX workshop – Stony Brook – 10/12/2012 How to analyze thousands of complex crystal structures in a minute Logistic information Login on the tutorial machines with: CrystalFp batch AVS/Express concepts CrystalFp STM4 components Other STM4 modules STM4 crystallographic support Ready? Go! STM4 components and structure Username/Password: look on the screen saver Test data files are under: CSCSlib/stm4-examples/data Run STM4 with: CrystalFp batch AVS/Express concepts CrystalFp STM4 components Other STM4 modules STM4 crystallographic support Start button Crystallography Conference Software STM4 go STM4 for USPEX tutorial - Mario Valle - 10/12/2012 1 12/12/2012 Start STM4 (and 2″ tutorial) STM4 is a framework for the development of unusual and enhanced techniques for chemistry visualization Launch AVS/Express (with STM4 included): $ express (Linux) C:\> cd CSCSlib C:\CSCSlib> go.bat (Windows) Go to Libraries STM4 Then go to the rightmost column (Full Apps) Drag the MolDisplayApp block in the gray area below marked Applications In the window that pops up select the file format (e.g. PDB) and read a file. (few examples in: CSCSlib/stm4-examples/data) Mouse rotate. Middle Mouse Button+Shift: Zoom. +Ctrl: Pan. Reset with the button. With the Modules drop down menu (top left) select Display Structure and change the molecule appearance to CPK. STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 functional areas Access to the STM4 library Libraries Viewer control Modules GUI View results Build area 2 12/12/2012 STM4 modules (look at them) A B C A. B. C. D. E. F. G. H. I. J. K. D E F G H I J The prebuild CrystalDisplayApp K Readers and writers: chemical formats, screenshots and movies Bonds related modules: compute, count and edit Modules that compute various derived structures Atoms selection by various criteria Trajectory related modules Crystallography support modules: symmetries, replications, etc. Visualization of volumetric data like Gaussian cubes Structure display and related graphical objects Probe, interaction and measurements Ready to run applications (plus display of the STM4 version) Specialized modules (like USPEX output analysis applications) The other components STM4 applications An application is composed by modules connected together Colors of connection ports and lines are related to data type (only compatible types can connect) Each module starts when it receives all the needed data The user interface docks in the right place automatically STM4 pre built application CrystalDisplayApp STM4 for USPEX tutorial - Mario Valle - 10/12/2012 3 12/12/2012 Another application example STM4 data types Molecule Data Type Standard AVS Field Display Parameters Geometries Screen Image STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 module documentation STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 resources STM4 main pages http://mariovalle.name/STM4/ The STM4 modules documentation http://mariovalle.name/STM4/doc/STM4/ STM4 download http://mariovalle.name/STM4/download.html The original STM3 paper (please cite it if you use STM4) M. Valle, STM3: a chemistry visualization platform, Zeitschrift für Kristallographie, vol. 220, no. 5-6, pp. 585-588, 2005 A user level AVS/Express course http://mariovalle.name/AVS/introduction-to-xp.html A (marketing) brochure on AVS/Express http://www.avs.com/software/soft_t/avsxps.html STM4 for USPEX tutorial - Mario Valle - 10/12/2012 4 12/12/2012 New topic STM4 architecture has… STM4 components and structure CrystalFp batch AVS/Express concepts CrystalFp STM4 components Other STM4 modules STM4 crystallographic support …AVS/Express behind the scenes What is AVS/Express? A multiplatform development environment… …for 3D visualization applications …object oriented …based on a visual programming paradigm STM4 for USPEX tutorial - Mario Valle - 10/12/2012 5 12/12/2012 Viz techniques More than 500 visualization techniques available Readers available for a broad range of file formats Network Editor: the build area Applications are built dragging modules from the libraries to the Network Editor Network Editor AVS/Express prototyping support helps to find the most useful technique Any technique can be adapted to suit specific user requirements Dataflow architecture Dataflow architecture Wait Wait Wait Wait Wait STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 for USPEX tutorial - Mario Valle - 10/12/2012 6 12/12/2012 Dataflow architecture Dataflow architecture Enter filename Wait Wait Valid data Wait Execute Wait Wait Wait Wait STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 for USPEX tutorial - Mario Valle - 10/12/2012 Dataflow architecture Dataflow architecture Enter filename Wait Valid data Not valid data Wait Wait Wait Wait STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 for USPEX tutorial - Mario Valle - 10/12/2012 7 12/12/2012 Dataflow architecture Valid data Dataflow architecture Valid data Execute Wait STM4 for USPEX tutorial - Mario Valle - 10/12/2012 The result of this application Execute STM4 for USPEX tutorial - Mario Valle - 10/12/2012 Data Viewer Editors (access to rendering parameters) Quick access Viewer Module GUI STM4 for USPEX tutorial - Mario Valle - 10/12/2012 Status panel 8 12/12/2012 Not only visualization: UI Kit AVS/Express modules with STM4 One of the advantage of STM4 is the possibility to mix AVS/Express standard modules with STM4 ones AVS/Express modules in STM4 Save your work Use extension .v 9 12/12/2012 Various AVS/Express editions AVS homepage: http://www.avs.com/ Developer Edition Official documentation: http://help.avs.com/Express/ Everything you need Modules to develop applications Standard modules can be opened AVS forum: http://forum.avs.com/ AVS/Express built‐in examples Visualization techniques book (in the AVS/Express manuals) Visualization Edition Some AVS/Express resources International AVS Center (IAC): http://www.iavsc.org/ Some modules not available Cannot create runtimes Cost less No differences if you are an End User IAC training material: http://www.iavsc.org/training Patches, doc and examples: ftp://ftp.avs.com/pub/express/ Other resources on: http://mariovalle.name/AVS/ STM4 works with both editions STM4 for USPEX tutorial - Mario Valle - 10/12/2012 New topic A user level AVS/Express course: http://mariovalle.name/AVS/introduction‐to‐xp.html STM4 for USPEX tutorial - Mario Valle - 10/12/2012 Getting Started with CrystalFp STM4 components and structure CrystalFp batch AVS/Express concepts CrystalFp STM4 components Other STM4 modules STM4 crystallographic support 10 12/12/2012 CrystalFp applications Load the structure file CrystalFp no energy CrystalFp with energy CrystalFp with energy and energy landscape Secret fantastic new CrystalFp version STM4 for USPEX tutorial - Mario Valle - 10/12/2012 Load the energy file Initialize CrystalFp, load data 11 12/12/2012 Compute fingerprints & distances Adjust grouping (if needed) Analyze results Build scatterplot 12 12/12/2012 Scatterplot diagnostics Build energy landscape Structure alignment New topic STM4 components and structure CrystalFp batch AVS/Express concepts CrystalFp STM4 components Other STM4 modules STM4 crystallographic support 13 12/12/2012 Start with CrystalDisplayApp Add tetrahedra Add title, logo and background Measure a structure 14 12/12/2012 Output Image (screenshot) Crystallography support Create Movie Crop Structure Replicate Lattice Replicate the structure unit cell along the three base vectors. Apply Symmetries Compute new atoms positions from the space group of the input molecule. Shift Unit Cell Shift the unit cell to re-center periodic phenomena that are split between the opposite sides of the cell. Enlarge Unit Cell Add atoms outside the unit cell by different criteria. Move Structure Translate and rotate a given structure modifying all atoms coordinates. Crop Structure Inside a geometric shape (cube, sphere, tube,…) Crop From Plane Remove atoms that are located more than a given value from a plane. Miller Plane Crop atoms using the plane identified by given Miller indices. Draw Polyhedra Draw polyhedra around selected atoms Draw Simple Polyhedra Draw polyhedra around atoms selected by distance only X Ray Structure Factor Compute and display simplified X-Ray structure factors. Remove Border Atoms Remove atoms connected to atoms outside the unit cell. Merge Unit Cell Apply the unit cell of one structure to another one. Find Symmetries Using KPLOT program. 15 12/12/2012 Find symmetries Fermi surfaces (reads EIGENVAL) Find enthalpy transitions Convex-hull method support 16 12/12/2012 New topic STM4 modules STM4 components and structure CrystalFp batch AVS/Express concepts CrystalFp STM4 components Other STM4 modules STM4 crystallographic support Pre-built applications A B C A. B. C. D. E. F. G. H. I. J. K. D E F G H I J K Readers and writers: chemical formats, screenshots and movies Bonds related modules: compute, count and edit Modules that compute various derived structures Atoms selection by various criteria Trajectory related modules Crystallography support modules: symmetries, replications, etc. Visualization of volumetric data like Gaussian cubes Structure display and related graphical objects Probe, interaction and measurements Ready to run applications (plus display of the STM4 version) Specialized modules (like USPEX output analysis applications) MolDisplayApp Ready to run applications MolDisplayApp Read and display a molecule. CrystalDisplayApp Read and display structures with symmetries and unit cell replication. VolumeDisplayApp Structure plus volumetric data PickDisplayApp Measure structure TracesDisplayApp Trace the motion of atoms PickUnitCellApp Redefine the molecule unit cell by corner picking and crops the structure inside the new unit cell. FermiSurfacesApp and FermiBandsApp Display data from the EIGENFILE MultiComponentApp to support the convex-hull method Plus the STM version string 17 12/12/2012 Readers/writers STM4 – formats supported Readers and writer for various, static and dynamic, chemical file formats plus movies and images production. Read Structure Read a structure from file (Read Structure No Bonds idem without computing bonds). Read Scalar and Read Vector Read a set of scalar or 3D vector values from a file. Make Movie Capture a sequence of frames, one for each different viewer content, and assemble them in a movie (AVI or MPEG). Output Image Save a snapshot of the content of the current viewer. Write Structure Write a structure to a file Write POV Ray Write the graphical scene for raytracing STM4 for USPEX tutorial - Mario Valle - 10/12/2012 Two static structures Display Rendering of chemical structures and other graphical objects. Draw Structure and Draw Sw Structure Render structures Info Sets Editor Edit render characteristics Display Unit Cell Displays the borders of the unit cell. Set Rendering Mode To change the rendering of only some atoms Axis Glyph Display three arrows to mark the origin and the XYZ axis directions, or the unit cell abc vectors. The glyph could also be offset from the origin. Background Fade Provide a colored backdrop for which you can set the four corners colors. Logo Create a logo image to be added to a viewer. Enclosing Ellipsoid Compute an ellipsoid that encloses the given set of atoms. Time Legend Display a progress bar to show the current timestep or current time for an animated molecule trajectory. Color Legend Display a legend for the structure representation colors. Discrete Legend Color swatches for discrete data (eg. bond count) Smooth Tube Create a tube that connect all the given points. Error Tube Create a tube with a radius proportional to the values associated to the connected points. 18 12/12/2012 Display structure Bonds Bonds computation, editing and management. Compute Bonds Compute atomic bonds. Count Bonds Add as atom data the atom's number of bonds. Count H Bonds Count the number of H Bonds present in the input structure. The count is added to the structure global data. Compute Selected Bonds Add bonds for each atom individually plus coordination tetrahedra Set Manual Bonds Manually add bonds between atoms. Compute Selected Bonds Compute derived structures Modules that compute derived structures. Solvent Excluded Surface Compute the molecule Solvent Excluded Surface. Backbone Compute a protein backbone. General Backbone Display a tube through user selected atoms. Vector Glyph Display with arrows the vector data associated with a given structure. Merge Values Add a new scalar or vector data to atoms, bonds or globally to the given structure. Atoms Values Trasp Render atoms with transparency dependent on the associated scalar value Particle Density Compute the average particle mass density using uniform binning. Interpolating Plane Build the least square plane interpolating a set of picked atoms (n ≥ 3). 19 12/12/2012 Interactivity (probe & measure) Measure a structure Interact with the structures: measure and editing. Measure Structure Access information about and measure a displayed structure. Measure Closer Atoms Measure intra-atomic distances between a given atom and the surrounding ones in a given range. Pick Unit Cell Redefines the unit cell for the displayed structure by picking on four atoms. Measure closer atoms Select subsets Selector modules to extract a subset of the atoms. Select Atoms Select specific atoms. Select Fragments Select specific structure fragments (i.e. residues). Threshold Data Select atoms whose associated scalar value meets various criteria. Delete Atoms Interactively delete atoms. 20 12/12/2012 Data threshold Trajectories Modules related to dynamic data. Accumulate Traces Accumulate traces (accumulated positions) for specific atoms in a sequence of time steps. Accumulate Global Data Accumulate a global scalar data in a form suitable for charting. Interpolate Sequence Linearly interpolate a given number of positions between each pair of timesteps. Velocity Mean Compute the average particle velocity using uniform binning. Accumulate atoms traces Volumetric data support Rendering of volumetric data like Gaussian cubes. Isosurface Create an isosurface for a given scalar value. Orthoslice Create an orthoslice for a given scalar value. Volume Render Volumetric render of a scalar valued volume. Cube on Surface Assign to a surface the values of the volume in which the surface is immersed in the positions occupied by the surface itself. Cut Surface Cut a surface (eg. a Solvent Excluded Surface) with a plane. Bicolor Surface Color a surface on one side with a user specified color leaving the other one with its original coloring. Interpolate Volume Interpolate a given scalar volume adding points between original grid points. 21 12/12/2012 Access volumetric data Volume rendering New topic Scripts differences STM4 components and structure CrystalFp batch AVS/Express concepts On Windows CrystalFp STM4 components Release\cfp.exe ^ ‐‐verbose=1 ^ ‐‐elements=“Si O” ^ SiO2‐24atoms.poscar ^ SiO2‐24atoms.enthalpies On Linux ./cfp \ ‐‐verbose=1 \ ‐‐elements=“Si O” \ SiO2‐24atoms.poscar \ SiO2‐24atoms.enthalpies Script.bat Other STM4 modules Script.sh STM4 crystallographic support STM4 for USPEX tutorial - Mario Valle - 10/12/2012 22 12/12/2012 Usage: CrystalFp [options] POSCARfile [ENERGIESfile] ‐v ‐‐verbose (optional argument) Verbose level (if no argument, defaults to 1) ‐? ‐h ‐‐help (no argument) This help ‐t ‐‐elements (required argument) List of chemical elements ‐es ‐‐max‐step ‐‐end‐step (required argument) Last step to load (default: all) ‐ss ‐‐start‐step (required argument) First step to load (default: first) ‐et ‐‐energy‐per‐structure (no argument) Energy from file is per structure, not per atom ‐e ‐‐energy‐threshold (required argument) Energy threshold ‐r ‐‐threshold‐from‐min (required argument) Threshold from minimum energy ‐c ‐‐cutoff‐distance (required argument) Fingerprint forced cutoff distance ‐n ‐‐nano‐clusters ‐‐nanoclusters (no argument) The structures are nanoclusters, not crystals ‐b ‐‐bin‐size (required argument) Bin size for the pseudo‐diffraction methods Generate data ./cfp \ ‐‐verbose=3 \ ‐‐elements="Si O" \ ‐‐end‐step=50 \ ‐‐cutoff‐distance=30 \ ‐‐fingerprint‐method=0 \ ‐‐distance‐method=0 \ ‐‐grouping‐method=1 \ ‐‐grouping‐threshold=0.05 \ ‐‐remove‐dupl=map.dat \ ‐‐checkpoint‐dir=./chk \ ‐‐summary=summary.dat \ ‐‐fld‐fingerprints=fp.fld \ ‐‐fld‐distances=dist.fld \ ‐‐sorted‐distances=sorted.dat \ ‐‐analysis=25 \ ‐‐analysis‐file=analysis.csv \ SiO2‐24atoms.poscar SiO2‐24atoms.enthalpies ‐p ‐‐peak‐size (required argument) Peak smearing size ... Visualize results using R source('readers.r') STM4 for USPEX tutorial - Mario Valle - 10/12/2012 It does also scatterplots! ./cfp \ source('readers.r') # Read sorted distances and display on a log‐log chart ‐‐end‐step=50 \ # Prepare the color palette s <‐ readSortedDist('sorted.dat') ‐‐verbose=3 \ n <‐ 256 plot(s, type='l', log='xy', xlab='Distance', ylab='Cumulative frequency', main=bquote(paste(SiO[2], " 24 atoms"))) ‐‐elements="Si O" \ pal <‐ heat.colors(n) ‐‐fingerprint‐method=0 \ ‐‐distance‐method=0 \ # Display distances d <‐ readDists('dist.dat') image(1:ncol(d), 1:nrow(d), d, col=rev(heat.colors(15)), xlab='Fingerprint1', ylab='Fingerprint2', main=bquote(paste(SiO[2], " 24 atoms"))) # Display all fingerprints and one specific fingerprint (n. 25) with reference lines ‐‐grouping‐method=1 \ ‐‐grouping‐threshold=0.05 \ ‐‐remove‐dupl=map.dat \ ‐‐scatterplot \ # Output the scatterplot x <‐ readScatterplot('scatterplot.dat') idx <‐ cut(x$value, seq(min(x$value), max(x$value), length.out=n+1), labels=FALSE, include.lowest=TRUE) plot(x$x, x$y, xlim=c(‐1,1), ylim=c(‐1,1), col=pal[idx], pch=16, cex=1) ‐‐scatterplot‐file=scatterplot.dat \ # Output the corresponding diagnostic chart f <‐ readFp('fp.dat') ‐‐diagnostic‐file=diagnostic.dat \ x <‐ readScatterplot('diagnostic.dat') image(1:nrow(f), 1:ncol(f), f, col=rev(heat.colors(15)), xlab='Fingerprint', ylab='Distance', main=bquote(paste(SiO[2], " 24 atoms"))) ‐‐scatterplot‐param iterations 200 \ plot(f[25,], type='s', xlab='Distance', ylab='Fingerprint value', main=bquote(paste(SiO[2], " 24 atoms"))) ‐‐scatterplot‐param kind 0 \ ‐‐scatterplot‐param retry 4 \ idx <‐ cut(x$value, seq(min(x$value), max(x$value), length.out=n+1), labels=FALSE, include.lowest=TRUE) ‐‐scatterplot‐param diagnostic 1 \ plot(x$x, x$y, xlim=c(0,1), ylim=c(0,1), col=pal[idx], pch=16, cex=1) abline(h=0, lty=3) SiO2‐24atoms.poscar \ abline(0, 1, lty=1) abline(v=0:3*ncol(f)/3+1, lty=2, col='green') SiO2‐24atoms.enthalpies abline(0.1, 1, lty=3,lwd=2) # All corresponding quantities in a scatterplot table (removing Index and Step) abline(‐0.1, 1, lty=3, lwd=2) a <‐ readAnalysis('analysis.dat') pairs(a[‐c(1,2)], pch='.', cex=4, col='blue') STM4 for USPEX tutorial - Mario Valle - 10/12/2012 STM4 for USPEX tutorial - Mario Valle - 10/12/2012 23 12/12/2012 End of a nice day… Thank you! BTW, I’m mvalle@cscs.ch Long Island sunset 24
© Copyright 2025