Skip to content
Snippets Groups Projects
Commit ab13e8d4 authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

SCHWED-4657: fix default MolckSettings in molck binary.

parent aa65a3cc
Branches
Tags
No related merge requests found
...@@ -37,29 +37,33 @@ All Options ...@@ -37,29 +37,33 @@ All Options
The molck executable supports several other command line options, The molck executable supports several other command line options,
please find them following: please find them following:
.. code-block:: bash .. code-block:: bash
usage: molck [options] file1.pdb [file2.pdb [...]] Usage: molck [options] file1.pdb [file2.pdb [...]]
options Options
--complib=path location of the compound library file. If not provided, the --complib=path Location of the compound library file. If not provided,
following locations are searched in this order: the following locations are searched in this order:
1. Working directory, 1. Working directory,
2. OpenStructure standard library location (if the 2. OpenStructure standard library location (if the
executable is part of a standard OpenStructure installation) executable is part of a standard OpenStructure
--rm=<a>,<b> remove atoms and residues matching some criteria: installation)
--rm=<a>,<b> Remove atoms and residues matching some criteria:
- zeroocc - Remove atoms with zero occupancy - zeroocc - Remove atoms with zero occupancy
- hyd - Remove hydrogen atoms - hyd - Remove hydrogen atoms
- oxt - Remove terminal oxygens - oxt - Remove terminal oxygens
- nonstd - Remove all residues not one of the 20 standard amino acids - nonstd - Remove all residues not one of the
- unk - Remove unknown and atoms not following the nomenclature 20 standard amino acids
--fix-ele clean up element column - unk - Remove unknown and atoms not following
--stdout write cleaned file(s) to stdout the nomenclature
--out=filename write cleaned file(s) to disk. % characters in the filename are Default: hyd
replaced with the basename of the input file without extension. --fix-ele Clean up element column
Default: %-molcked.pdb --stdout Write cleaned file(s) to stdout
--color=auto|on|off whether output should be colored --out=filename Write cleaned file(s) to disk. % characters in the
--map-nonstd maps modified residues back to the parent amino acid, for example filename are replaced with the basename of the input
MSE -> MET, SEP -> SER. file without extension. Default: %-molcked.pdb
--color=auto|on|off Whether output should be colored. Delault: auto
--map-nonstd Maps modified residues back to the parent amino acid,
for example: MSE -> MET, SEP -> SER.
================ ================
Molck Python API Molck Python API
......
...@@ -23,28 +23,32 @@ namespace po=boost::program_options; ...@@ -23,28 +23,32 @@ namespace po=boost::program_options;
namespace fs=boost::filesystem; namespace fs=boost::filesystem;
const char* USAGE= const char* USAGE=
"this is molck - the molecule checker\n" "This is molck - the molecule checker\n"
"usage: molck [options] file1.pdb [file2.pdb [...]]\n" "Usage: molck [options] file1.pdb [file2.pdb [...]]\n"
"options \n" "Options\n"
" --complib=path location of the compound library file. If not provided, the \n" " --complib=path Location of the compound library file. If not provided,\n"
" following locations are searched in this order: \n" " the following locations are searched in this order:\n"
" 1. Working directory, 2. OpenStructure standard library location (if the \n" " 1. Working directory,\n"
" executable is part of a standard OpenStructure installation) \n" " 2. OpenStructure standard library location (if the\n"
" --rm=<a>,<b> remove atoms and residues matching some criteria \n" " executable is part of a standard OpenStructure\n"
" zeroocc - Remove atoms with zero occupancy \n" " installation)\n"
" hyd - Remove hydrogen atoms \n" " --rm=<a>,<b> Remove atoms and residues matching some criteria:\n"
" oxt - Remove terminal oxygens \n" " - zeroocc - Remove atoms with zero occupancy\n"
" nonstd - Remove all residues not one of the 20 standard amino acids \n" " - hyd - Remove hydrogen atoms\n"
" unk - Remove unknown and atoms not following the nomenclature\n" " - oxt - Remove terminal oxygens\n"
" --fix-ele clean up element column\n" " - nonstd - Remove all residues not one of the\n"
" --stdout write cleaned file(s) to stdout \n" " 20 standard amino acids\n"
" --out=filename write cleaned file(s) to disk. % characters in the filename are \n" " - unk - Remove unknown and atoms not following\n"
" replaced with the basename of the input file without extension. \n" " the nomenclature\n"
" Default: %-molcked.pdb \n" " Default: hyd\n"
" --color=auto|on|off \n" " --fix-ele Clean up element column\n"
" whether output should be colored\n" " --stdout Write cleaned file(s) to stdout\n"
" --map-nonstd maps modified residues back to the parent amino acid, for example\n" " --out=filename Write cleaned file(s) to disk. % characters in the\n"
" MSE -> MET, SEP -> SER.\n"; " filename are replaced with the basename of the input\n"
" file without extension. Default: %-molcked.pdb\n"
" --color=auto|on|off Whether output should be colored. Delault: auto\n"
" --map-nonstd Maps modified residues back to the parent amino acid,\n"
" for example: MSE -> MET, SEP -> SER.\n";
void usage() void usage()
{ {
...@@ -139,8 +143,10 @@ int main(int argc, char *argv[]) ...@@ -139,8 +143,10 @@ int main(int argc, char *argv[])
usage(); usage();
} }
IOProfile prof; IOProfile prof;
prof.fault_tolerant=true; prof.fault_tolerant = true;
ost::mol::alg::MolckSettings settings; // set all settings to false by default (set to true if args given)
ost::mol::alg::MolckSettings settings(false, false, false, false, false,
false, false, false);
String rm; String rm;
String color; String color;
...@@ -152,15 +158,15 @@ int main(int argc, char *argv[]) ...@@ -152,15 +158,15 @@ int main(int argc, char *argv[])
po::options_description desc("Options"); po::options_description desc("Options");
desc.add_options() desc.add_options()
("rm", po::value<String>(&rm)->default_value("hyd"), "atoms to be removed") ("rm", po::value<String>(&rm)->default_value("hyd"), "atoms to be removed")
("color", po::value<String>(&color)->default_value("auto"), ("color", po::value<String>(&color)->default_value("auto"),
"whether the output should be colored.") "whether the output should be colored.")
("files", po::value< std::vector<String> >(), "input file(s)") ("files", po::value< std::vector<String> >(), "input file(s)")
("stdout", "write cleaned file(s) to stdout") ("stdout", "write cleaned file(s) to stdout")
("out,o", po::value<String>(&output_blueprint_string)->default_value("%-molcked.pdb"), ("out,o", po::value<String>(&output_blueprint_string)->default_value("%-molcked.pdb"),
"write cleaned file to output using blueprint to determine path") "write cleaned file to output using blueprint to determine path")
("map-nonstd", "map non standard residues back to standard ones (e.g.: MSE->MET,SEP->SER,etc.)") ("map-nonstd", "map non standard residues back to standard ones (e.g.: MSE->MET,SEP->SER,etc.)")
("fix-ele", "insert element") ("fix-ele", "insert element")
("complib", po::value<String>(&custom_path)->default_value(""),"location of the compound library file") ("complib", po::value<String>(&custom_path)->default_value(""),"location of the compound library file")
; ;
po::positional_options_description p; po::positional_options_description p;
p.add("files", -1); p.add("files", -1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment