##########################################################################################################################
##### Settings file for ProtASR 2.2
##### Ancestral sequence reconstruction of proteins under structurally constrained substitution models
##### Miguel Arenas & Ugo Bastolla
##### (c) 2014-2018
##### Contact: miguelmmmab@gmail.com
##### 
##### Parameters with an "*" are mandatory (must be specified)
##### Text with an "#" is not read. Parameter values must be introduced immediately after the "="
##########################################################################################################################


####################################################
#### Alignment of amino acid sequences and tree ####
####################################################

### Target alignment file with a rooted tree ### # nexus format with a rooted tree, see documentation and examples
*NameOfNexusFile=trxb_MOD2_MAFFT9.nex


#############################
### Settings for the ASR  ###
#############################

# Substitution model: MEANFIELD (requires specification of settings in the following section), Blosum62, cpREV64, Dayhoff, DayhoffDCMUT, G1974a, G1974c, G1974p, G1974v, Grantham, HIVb, HIVw, JTT, JonesDCMUT, LG, Miyata, MtArt, MtMam, MtRev24, MtZoa, RtRev, VT, WAG
*SubsModel=MEANFIELD


# Consider frequencies from the model (+F) (0: No, 1: Yes)
*ModelFreqs=0


# Estimate (0) or fix (1) gamma shape parameter  
*TypeG=1

# Gamma shape parameter value. Initial or fixed alpha, 0:infinity (constant rate)
*AlphaG=0

# Different alphas for genes, introduce a number
*Malpha=0


# Estimate (0) or fix (1) rho (correlation parameter)
*TypeRho=1

# Rho (correlation parameter). initial or fixed rho, 0:no correlation
*RhoCorr=0



###############################################################################################
### Settings to compute the substitution model based on the protein structure - MEANFIELD - ###
###############################################################################################

### Input files defining the protein ###
# PDB file (must be placed in the current directory)
*PDBfile=1TDE.pdb

# Chain of the PDB file
*CHAIN=A


### Thermodynamic model ###
# Temperature
*TEMP=0.5

# Configurational entropy per residue (unfolded)		
*SU1=0.065

# Configurational entropy per residue (misfolded)
*SC1=0.065

# Configurational entropy offset (misfolded)		
*SC0=0.0

# Use up to 1,2,3 moments of misfolding energy?
*REM=2

# Coefficient of local interactions
*A_LOC=0

# Contacts map (must be placed in the ProtEvol directory)	
*FILE_STR=structures.in


### Mean field model ###
# Number of substitutions to simulate data (0 by default, not required for ASR)
*TMAX=0

# LAMBDA~ NPOP*exp(-DELTA G/TEMP)
*LAMBDA_par=0.90

# Optimize LAMBDA? (0: No, 1: Yes, default)
OPT_LAMBDA=1

# Target value of DeltaG if OPT_LAMBDA
DG_OPT=-1

# Optimization criterion. Allowed: NAT ALL DG  
*MODEL=ALL

# WildType model: No (0) or yes (1) 
*WTmodel=1


### Mutation model ###
# Global matrix. Mean (0) or mean weighted by frequencies (1)
*GLOBALMATRIX=0

# Exchangeability. Allowed: MUT, EXCH, FLUX, RATE
*EXCHANGE=FLUX

# Rate matrix. Allowed: JTT, WAG
*MATRIX=JTT

# Get nucleotide frequencies from sequence? (0: Use input nucleotide frequencies, 1: Fit nucleotide frequencies from prot sequences, 2: Fit amino acid frequencies from prot sequences)
*GET_FREQ=2

# Improve mutation parameters after selection?
*REMUT=0


## DNA Parameters for model MUT ##
# Frequency for A
*fA=0.25

# Frequency for T
*fT=0.25

# Frequency for C
*fC=0.25

# Frequency for G
*fG=0.25

# CpG transition ratio
*kCpG=2

# Transition transversion ratio (Kappa, >1)
*TT_RATIO=1.3

# Ratio between 1-nuc and 2-nuc mutations (0-1)
*TWONUCMUT=0.25










