Changes between Version 4 and Version 5 of FAQ_MoleculeViewer


Ignore:
Timestamp:
01/04/11 17:12:48 (4 years ago)
Author:
braffert
Comment:

Adding documentation for viewing lammps files, and trajectory to sequence conversion

Legend:

Unmodified
Added
Removed
Modified
  • FAQ_MoleculeViewer

    v4 v5  
    66  3. Molecule Viewers as Output 
    77  4. Sending PDB files to the Molecule Viewer 
     8  5. Sending LAMMPS files to the Molecule Viewer 
     9  6. Displaying trajectories as sequences 
    810 
    911---- 
     
    181183}}} 
    182184 
     185== Sending LAMMPS files to the Molecule Viewer == 
     186 
     187The Molecule Viewer can also display LAMMPS dump files in a manner similar to PDB files, as described above. 
     188The contents of a standard atom style LAMMPS dump file can be placed in the '''<lammps>''' sub-element as follows: 
     189 
     190{{{ 
     191<?xml version="1.0"?> 
     192<run> 
     193    <tool> 
     194        <title>Sending LAMMPS file to Molecule Viewer</title> 
     195    </tool> 
     196    <input> 
     197    </input> 
     198    <output> 
     199        <structure> 
     200            <components> 
     201                <molecule> 
     202                    <lammps> 
     203ITEM: TIMESTEP 
     2040 
     205ITEM: NUMBER OF ATOMS 
     2063 
     207ITEM: BOX BOUNDS 
     208-4.0 4.0 
     209-4.0 4.0 
     210-4.0 4.0 
     211ITEM: ATOMS id type x y z 
     2121 1 -1.24935 -3.41562 0.0 
     2132 2 0.08092 -3.19426 0.0 
     2143 3 0.00055 -1.40789 0.0 
     215                    </lammps> 
     216                </molecule> 
     217            </components> 
     218        </structure> 
     219    </output> 
     220</run> 
     221}}} 
     222 
     223The '''<lammpstypemap>''' sub-element can be used to map the atom type numbers in the dump file to specific elements. 
     224The contents of this element should be a whitespace delimited sequence of element names corresponding to the desired element for each atom type. 
     225For example, a type map of "H S C" will map atom type 1 to hydrogen, 2 to sulfur, and 3 to carbon. 
     226 
     227== Displaying trajectories as sequences == 
     228By default, if a PDB or LAMMPS trajectory is given to the molecule viewer, only the first frame of the trajectory will be visible. 
     229To view the entire trajectory as an animation, put a "yes" in the '''<trajectory>''' sub-element. 
     230When this option is enabled, the PDB or LAMMPS data will be automatically split into unique molecule elements for each time step, and placed into a [wiki:rp_xml_ele_sequence sequence] element. 
     231Example: 
     232 
     233{{{ 
     234<?xml version="1.0"?> 
     235<run> 
     236    <tool> 
     237        <title>Viewing trajectory as sequence</title> 
     238    </tool> 
     239    <input> 
     240    </input> 
     241    <output> 
     242        <structure> 
     243            <components> 
     244                <molecule> 
     245                    <trajectory>yes</trajectory> 
     246                    <pdb> 
     247 
     248                        ... 
     249 
     250                    </pdb> 
     251                </molecule> 
     252            </components> 
     253        </structure> 
     254    </output> 
     255</run> 
     256}}} 
    183257 
    184258[wiki:FAQ Back to Frequently Asked Questions]