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