sampledoc

Getting started

Clone Github repository

The STREAMM tools code is maintained in a Github repository at https://github.com/NREL/streamm-tools hosted by the National Renewable Energy Lab (NREL). The main STREAMM repo contains many projects that use the tools code as well as the separate suite of unit/regression tests. The web based interface allows one to download the tools repo using the GUI. The tools repo can be downloaded using the linux command line

git clone https://github.com/NREL/streamm-tools.git

The tools repo contains the following directories and files

  • README.md – Repo notes
  • analysis – 3rd party codes used for post-processing
  • config.sh – Configuration script that sets PYTHONPATH and other needed environment variables
  • da_builder – Donor-Acceptor builder source code
  • doc – Sphinx documentation and scripts for creating Python API from docstrings
  • examples – High-level specific examples using the tools/scripts and tools/src code (documented in /doc)
  • scripts – High-level drivers using tools/src code
  • src – Main classes implementing the STREAMM tools functionality

Configure tools

The config.sh script is provided to set various environment variables and the PYTHONPATH required for the source code modules to run correctly. Before using STREAMM tools or running the tests execute

source config.sh

This will set the correct environment for the current terminal session. To set permanently, note the output of the script and then set in your local environment.

Dependencies

STREAMM is a purely python application and needs no external compilers other than python.

Python modules:

- boost.mpi
- copy
- datetime
- fileinput
- fnmatch
- glob
- json
- math
- matplotlib.pyplot
- mpiBase
- numpy
- optparse
- os
- os.path
- pickle
- platform
- random
- re
- shlex
- shutil
- socket
- string
- subprocess
- sys
- time
- traceback
- units

Note

Not all these modules need to be installed to utilize the STREAMM tool kit.

Running tests

The tests for the STREAMM tools are in a separate Github repository https://github.com/NREL/streamm-tools-tests hosted by the National Renewable Energy Lab (NREL). The tools repo can be downloaded using the linux command line

git clone https://github.com/NREL/streamm-tools-tests.git

If the tools repo has been configured correctly the check.sh script can be used to run the units tests. The help info for check.sh is output from

check.sh

To run a particular test

check.sh 'test-name.py'

and to run all tests

check.sh all

Test descriptions

test_angleContainer.main()[source]

This test shows various operators within Angle and AngleContainer classes. Shows memory management structure and access methods

test_bondContainer.main()[source]

This test shows various operators within Bond and BondContainer classes

test_checkTypes.main()[source]

This test illustrates the search capability for multiple tags This can be combined new class method that returns iterator over search results

test_dihedralContainer.main()[source]

This test shows various operators within Dihedral and DihedralContainer classes Also shows memory management structure and access methods

test_dumpLammps.main()[source]

Tests a specifc workflow for LAMMPS that uses the simulationLAMMPS1 derived class

test_periodictable.main()[source]

Test functionality of periodictable: 1) print atomic symbol and mass, 2) find an element with mass 12.0110 3) print it’s properties, 4) find an element with symbol S and 5) print it’s properties

test_ffparameters.main()[source]

This test sets creates a parameter container for classical force field parameters and adds LJ paramters, Bonds Angles and Dihedrals

test_n2_mpiBase.main()[source]

Testing methods in the python MPI wrapper classes (in mpiBase.py)

test_nX_mpiBase_splitData.main()[source]

Driver for the splitTest.py module. Testing robustness of the list split algorithm needed for MPI wrapper class

test_particleConstructors.main()[source]

This test illustrates the different ways Particle constructors can be used by using default values etc

test_particleContainer.main()[source]

This test shows various operators within Particle and ParticleContainer classes. Shows memory management structure and access methods.

test_particleSetInfo.main()[source]

This test illustrates the different ways ParticleContainer can set Particle object data (eg the [] operator on ParticleContainer)

test_ptclContainerConstructor.main()[source]

This test illustrates the setting a ParticleContainer with pre-existing IDs

test_searchTags.main()[source]

This test illustrates the search capability for multiple tags This can be combined new class method that returns iterator over search results

test_simulation.main()[source]

This test shows basics of the Simulation classes Highlights differences between setting reference to the structure container and a deepcopy

test_strucAdd.main()[source]

This test shows how to add StructureContainer objects together

test_strucAdd2.main()[source]

This test shows how to add StructureContainer objects together A special test to double-check re-labeling ... add a big container to a ‘small’ one

test_strucCompressID.main()[source]

This test shows how reorder (compress) global IDs for a StructureContainer

test_strucCompressIDWithAngles.main()[source]

This test shows compressing IDs when structureContainer has angles included

test_strucDumpSave.main()[source]

This test shows how to save/dump/restore state of structureContainers using pickle

test_strucEmpty.main()[source]

This shows operations on empty StructureContainer objects for ‘robustness’

test_strucEmpty2.main()[source]

This shows operations on empty StructureContainer objects for ‘robustness’

test_strucSetPtclPos.main()[source]

This test shows how the setPtclPos method works to externally set all particle positions from a list

test_strucWithAngles.main()[source]

This test shows structureContainer functionality with angles included

test_strucWithDihedrals.main()[source]

This test shows structureContainer functionality with dihedrals included

test_subStructure.main()[source]

This test shows how to set up Structure container with Particle/Bond-Containers and shows how IDs changed in StructureContainer propagate to values set in BondContainer for its held particle ID values Illustrates how a substructure method can return subgroup

test_subStructureWithAngles.main()[source]

This test shows how to set up Structure container with Particle/Bond-Containers Shows how ID changed in Structure propagate to values set in BondContainer and and an AngleContainer for its held particle ID values Illustrates how a substructure method could return subgroup

test_subStructureWithDihedrals.main()[source]

Illustrates how a substructure method returns subgroup with all 4 types”