 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
24 "Usage: bmodmap [options] in.star",
25 "--------------------------------",
26 "Generates a map from a model.",
29 "-all Reset selection to all components before other selections.",
32 "-verbose 7 Verbosity of output.",
33 "-datatype u Force writing of a new image data type.",
34 "-origin 0,0,0 Origin placement within image (default 0,0,0).",
35 "-size 10,10,10 Map size, input map size otherwise (voxels).",
36 "-sampling 1 Sampling (default 1 angstrom/voxel).",
37 "-sigma 3.5 Density decay around a component (default 10).",
40 "-parameters param.star Input parameter file.",
43 "-output model.star New model file.",
44 "-map density.map New map file.",
49 int main(
int argc,
char **argv)
66 for ( curropt = option; curropt; curropt = curropt->
next ) {
67 if ( curropt->
tag ==
"all" ) reset = 1;
68 if ( curropt->
tag ==
"origin" ) {
69 if ( curropt->
value[0] ==
'c' ) {
72 origin = curropt->
origin();
76 if ( curropt->
tag ==
"size" )
77 size = curropt->
size();
78 if ( curropt->
tag ==
"sampling" )
79 sam = curropt->
scale();
80 if ( curropt->
tag ==
"sigma" )
81 if ( ( sigma = curropt->
value.
real() ) < 1 )
82 cerr <<
"-sigma: The component density decay radius must be specified!" << endl;
83 if ( curropt->
tag ==
"parameters" )
85 if ( curropt->
tag ==
"output" )
87 if ( curropt->
tag ==
"map" )
96 while ( optind < argc )
string_add(&file_list, argv[optind++]);
98 cerr <<
"Error: No model files specified!" << endl;
106 cerr <<
"Error: Input file not read!" << endl;
112 if ( set_origin == 2 ) origin = {double(size[0]/2), double(size[1]/2), double(size[2]/2)};
A class for a command line input option.
Vector3< double > scale()
Bimage * img_from_model(Bmodel *model, Vector3< double > ori, Vector3< long > size, Vector3< double > sam, double sigma)
Calculates a map from model component coordinates.
int string_kill(Bstring *list)
Kills a string linked list.
Header file for reading and writing atomic model files.
int bexit(int value)
Exit function for cleanup and debugging.
Header file for model to map conversions.
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Header file for option handlers.
Vector3< double > origin()
long models_process(Bmodel *model, long(modfunc)(Bmodel *))
Process a list of models using the specified function.
int main(int argc, char **argv)
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
int model_kill(Bmodel *model)
Deallocates all memory in the list.
General image parameter class.
Header file for reading and writing atomic model files.
Utilities for timing functions.
long model_reset_selection(Bmodel *model)
Resets the selection to all components.
double timer_start()
Starts timer and prints the time.
int model_set_map_filenames(Bmodel *model, Bstring &mapfile)
Sets all the map file names of selected models.
Header file for general utilities.
int write_model(Bstring &filename, Bmodel *model)
Writes model parameters.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
void change_type(char letter)
Get the data type indicated by a single letter code.
Header file for 2D and 3D image I/O.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Library routines used for model processing.
Bmodel * read_model(Bstring &filename)
DataType
Base data type specifier.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.