package LocalConfiguration;

use strict;
use lib qw(Core);
use Configuration;

use vars qw/@ISA @EXPORT @EXPORT_OK/;
@EXPORT_OK = ();
@EXPORT = qw/$LOCAL_CONFIG/;
@ISA = qw/Exporter/;

our $LOCAL_CONFIG = {
    # Main configuration
    PROJECT_NAME => 'CASP13',
    PROJECT_SHORTNAME => 'casp13',
    CASP_VERSION => 'CASP13',

    # Templates
    TEMPLATES_DIR => 'templates',
    DEFAULT_ERROR_TEMPLATE => 'error.template',

    # Pages
    DEFAULT_PAGE => 'index.cgi',
    LOGIN_PAGE => '../login.cgi',
    GROUPS_PAGE => 'groups.cgi',
    
    MEETING_REGISTRATION_SUCCESS=> 'meeting_registration.cgi?view=success',
    MEETING_REGISTRATION_SUCCESS_QUESTION=> 'meeting_registration.cgi?view=success_question',

    # Logger
    LOGS_DIR => 'path/to/logdir',
    ERROR_LOGFILE => 'error.log',
    INFO_LOGFILE => 'info.log',
    ACCESS_LOGFILE => 'access.log',

    # Prediction directories
    SUBMITED_PREDICTIONS_DIR => 'predictions/submited',
    MESSAGES_PREDICTIONS_DIR => 'predictions/messages',
    ACCEPTED_PREDICTIONS_DIR => 'predictions/accepted',
    CLEAN_PREDICTIONS_DIR => '/data/CASP13/predictions/cleaned', # 
    TARBALLS_PREDICTIONS_DIR => '/data/CASP13/predictions/tarballs', # temprary directory to create tarballs of TS predictions of server groups
    TARBALLS_ALL_PREDICTIONS_DIR => 'predictions/tarballs_all', # this directory isn't needed any more
    TARGETS_DIR => '/local/CASP13/TARGETS',
    DESCRIPTORS_DIR => 'DSC',
    DATA_TARGETS_DIR => '/local/CASP13/TARGETS',
    #DATA_TARGETS_DIR => 'assessors/TARGETS';
    DATA_MODELS_DIR => '/local/CASP13/MODELS', # directory with TS models - link to predictions/closed_4eval_TS
    DATA_RR_MODELS_DIR => '/local/CASP13/RR_MODELS', # directory with RR models - link to predictions/closed_4eval_RR
    DATA_SERV_MODELS_DIR => '/local/CASP13/SERV_MODELS', # directory with TS models for server groups only
    DATA_QA_MODELS_DIR => '/data/CASP13/predictions/qa_predictions_cleaned',
    DATA_QS_MODELS_DIR => '/data/CASP13/predictions/closed_4eval_QS',
    CHAIN_STRUCTURES_DIR => 'chain_superpositions',
    TARGET_TEMPLATES_DIR => 'TEMPLATES',
    PLOTS_DIR => 'PLOTS',
    GDT_PLOTS_DIR => 'PLOTS/GDT',
    EQV_PLOTS_DIR => 'PLOTS/EQV',
    AL_PLOTS_DIR => 'PLOTS/AL',
    TM_PLOTS_DIR => 'PLOTS/TM',
    MD_PLOTS_DIR => 'PLOTS/MD',
    RF_MD_PLOTS_DIR => 'PLOTS/RF_MD',
    TC_PLOTS_DIR => 'PLOTS/TC',
    LACC_PLOTS_DIR => 'PLOTS/LACC',
    LACC_DIFF_PLOTS_DIR => 'PLOTS/LACC_DIFF',
    QA_PLOTS_DIR => 'PLOTS/QA',
    #Results dir 
    RESULTS_DIR => '/local/CASP13/RESULTS', # it's link to /data/CASPROL/RESULTS

    SUBMITTED_TARGET_DIR => 'exper_struct',
    
    PREDICTIONS_LOGFILE => 'predictions/predictions.log',
    
    # Server Distribution System
    SERVERS_DISTRIBUTION_EMAIL => 'models@predictioncenter.org',
#    SERVERS_DISTRIBUTION_EMAIL => 'servers@predictioncenter.org',
    SERVERS_REQUEST_META_EMAIL => 'casp-meta@predictioncenter.org',
#    SERVERS_REQUEST_META_EMAIL => 'casp8-meta@predictioncenter.org',
    QA_TARBALL_LOCATION => 'http://predictioncenter.org/download_area/CASP13/server_predictions',
    META_MESSAGES_DIR => '/local/Projects/Perl/casp13/src/distribution/messages',
    REQUEST_DIR => '/local/Projects/Perl/casp13/src/distribution/request',
    RESPONSE_DIR => '/local/Projects/Perl/casp13/src/distribution/response',
    NOTIFICATION_EMAIL_DIR   => '/local/Projects/Perl/casp13/src/scripts/predictions/notifications',
    
    PAGE_STEP => 12,
    
    RELESE_HOURS =>  '9',
    RELESE_MINUTES => '00',
    EXPIRED_HOURS => '12',
    EXPIRED_MINUTES => '15',

    QA_STAGE1_RELEASE_DAYS => 2, # 2 days after the date of expiration for server predictions: 2 days for evaluation server models
    QA_STAGE1_EXPIRED_DAYS => 4, # 5 days after date of expiration for server predictions: 2 days for evaluation - 2 days for submission
    QA_STAGE2_RELEASE_DAYS => 4, # same day after stage 1 expired but IMPROTANT: release QA predictions at 12:17 in order to avoid overlaping STAGE1 and STAGE2
    QA_STAGE2_EXPIRED_DAYS => 6, # 6 days after date of expiration for server predictions: 2 days for evaluation - 2 days for 1st stage submission, 1 day - break, 2 days for 2nd stage submission

    NUMBER_MODELS_QA_STAGE1 => 20, # number server models to release for QA prediction at stage 1
    NUMBER_MODELS_QA_STAGE2 => 150, # number server models to release for QA prediction at stage 2
    TARGETS_IGNORED_FOR_QA => '', # list of targets skipped for QA predictions (comma separated)

    # parameter determines how to show results:
    # 1 - don't show results for anybody but organizers, 
    # 2 - show only group codes for assessors (should be set during the evaluation period)
    # 3 - show only group codes for all users (should be set to present results in CASP13 (without disclosing the names of groups))
    # 4 - show group codes and names for all (in regular CASP this value should be set after evaluation period - before meeting)
    SHOW_RESULTS => 4,

    #parameters for contact-related predictions: in CASP13 the parameters is obsolete: OBSOLETE for CASP13
    FOR_TC_RR_GROUPS => '',
    FOR_TC_FILE_LOCATION => '/local/CASP13/tmp_TC/',
    FOR_TC_TARGET_CONTS_DIR => '/local/CASP13/tmp_TC/Targets_conts/',
    EXTRA_EXP_TARBALL_LOCATION => 'https://'.$CONFIG->{BASE_URL}.'/download_area/CASP13/extra_experiments',
};

1;
