1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
mod dataset;
mod cu;
mod job;

pub const APPLET_TEMPLATE: &str = "\
    {about-with-newline}\n\
    {usage-heading}\n    {usage}\n\
    \n\
    {all-args}{after-help}\
";

pub fn create() -> clap::Command {
    const PARSER_TEMPLATE: &str = "\
        {all-args}
    ";

    clap::Command::new("chiral")
        .multicall(true)
        .arg_required_else_help(true)
        .subcommand_required(true)
        .subcommand_value_name("APPLET")
        .subcommand_help_heading("APPLETS")
        .help_template(PARSER_TEMPLATE)
        .subcommand(cu::command())
        .subcommand(dataset::command())
        .subcommand(job::command())
        .subcommand(
            clap::Command::new("ver")
                .about("Print program version")
                .help_template(APPLET_TEMPLATE),
        )
        .subcommand(
            clap::Command::new("quit")
                .alias("exit")
                .about("Quit the REPL")
                .help_template(APPLET_TEMPLATE),
        )
}

pub const EXAMPLES_CU: &str = "\
\nRun OpenBabel substructure matching with input molecule 'c1cccc1N=O' on dataset 'test_chembl', and save the results locally 
cu job --operator ob_ss --dataset test_chembl --smiles c1ccccc1N=O -s
\nRun fingerprint based similarity search with input molecule 'c1cccc1N=O' on dataset 'test_chembl', using OpenBabel ECFP4 fingerprint, setting minimal tanimoto coefficient to 0.25, and save the results locally.
cu job --operator ob_sim --dataset test_chembl --smiles c1ccccc1N=O --fingerprint ob_ecfp4_1024 --threshold 0.25 -s
";

pub const LIST_CU: &str = "\
ob_ss   OpenBabel Substructure Matching
ob_sim  OpenBabel Similarity Searching
";

pub const LIST_DS: &str = "\
test_chembl     a subset of ChEMBL with 10,000 entries
chembl30        ChEMBL 30 with 2,136,187 entires
";