MMTSB
Tool Set Documentation

setprop.pl

From MMTSB
Jump to: navigation, search

Usage

usage:   setprop.pl [options] tag proptag [value]
options: [-dir datadir]
         [-remove]
         [-at index]
         [-f file]
         [-inx index]
Show source


Description

This script can be used to manually modify or add property values for a structure ensemble. Required parameters are a tag identifying the structure subset for which the property should be set and a property tag to identify the property itself.

In order to set or change a single value the new value can be given as the last argument while the option -at may be used to specify the structure index. Alternatively a whole series of data may be read from a file given with -f. The values from the file are then set consecutively starting at index 1 unless a different first index is given with -at. If the input file contains multiple data fields per line, the first value of each line is used by default, a different field index can be specifeid with -inx.

The location of the ensemble directory may be given with -dir if it is not the current directory.

setprop.pl can also be used to remove a property and all its values from a data file. The -remove option is available for this purpose. This option should be used with care since there is no way to restore data once it has been removed.

Options

-help 
usage information
-dir directory 
data directory
-remove 
remove data for property
-at index 
enter data at specific index
-f file 
read data from external file
-inx index 
column index for data when reading from external file

Examples

setprop.pl -dir data -at 4 sample etot 20.14
modifies the value for etot in the sample structure with the index 4


setprop.pl -dir data -f etot.data -inx 2 sample etot
sets etot values from the second column in the file etot.data for structures associated with the sample tag