A work in progress - complete parameter estimation, including global parameters and branch lengths. Currently only the multi-threaded version.
Comment out some superfluous messages (but they might be useful at some point)
Implement convergence check for the Estimator of all parameters
AbstractRunner is empty
tdg.Analyse - Set the MatrixArrayPool size after we've read the tree
tdg.Constants - Add intial_branch_length for the initial estimation step
tdg.Estimator - Set the MatrixArrayPool size after we've read the tree, initial fitness is F=0 for all 20 residues, increase convergence criteria slightly (should be an option…?), output the tree at the end
tdg.MatrixArrayPool - keeps a pool of double[64*64] and double[tree.internalnodecode][64] for LikelihoodCalculator and TDGCodonModel, in an attempt to reduce memory usage for large alignments (but reduce the millions of mallocs)
tdg.MultiThreadedRunner - in optimiseMutationModel, use a single TDGCodonModel, wrapped in a CachedTDGCodonModel, to greatly increase estimation of globals in the first step.
tdg.model.CachedTDGCodonModel - wraps TDGCodonModel and caches transition probabilities. Useful when all branch lengths are equal, or you have a few discrete sets
tdg.model.Fitness - keep a static F[0-19]=0 fitness ("mutationalOnlyFitness") that can be used in the initial estimation step
tdg.model.LikelihoodCalculator -  probMatrix and internalConditionals are now taken from MatrixArrayPool
tdg.model.TDGCodonModel - PtTemp is taken from MatrixArrayPool, Q and B and no local parameters, because we don't need them after construction of U, lambda and UInv
tdg.model.TDGGlobals - check that pi argument is 4 elements and normalise the values so they sum to 1.
tdg.utils.CoreUtils - move static methods from 'm' class here. Remove m.
tdg.utils.Pair - use intellij-stub for equals and hashcode methods
tdg.utils.Triple - same as Pair but for 3 items
AbstractRunner - move methods from DistributedRunner and MultiThreadRunner here, and template them for the two subclasses
DistributedRunner - extends AbstractRunner to distribute computation over many nodes (see tdg.distributed classes)
Estimator - add instantiation of DistributedRunner, no need to pass alignment each time to Runner, add writeResults method to write optima of each iteration to file
EstimateOptions - -distributed is boolean, -hosts is variable size list
FitnessStore - implements Iterator
MultiThreadedRunner - move main algorithm to AbstractRunner, only implement the required methods for template
Runner - methods do not need alignment
Server/ServiceAPI/ServiceImpl/TestAPI/TestClient/TestImpl/TestServer - server/client framework that uses hessian to distributed computations (sip)
Calculator - a very simple wrapper around log-likelihood calculation…required?
LikelihoodCalculator - store Partial objects at root rather than just the partial array
Parameter - made Serializable
TDGGlobals - made Serializable
PhyloUtils - always optimise fitness for all amino acids
commons-logging required by hessianserver
hessian/hessianserver - for tdg.distributed and DistributedRunner
AbstractRunner - decrease optimiser tolerance (these should be in a config file somewhere), print mutation optimiser every 25 evaluations, optimise branch lengths until likelihood converges, getLikelihoodSum and updateBranchLength take the node number rather than the Node instance (which drags in their entire tree)
Constants - decrease fitness optimisation tolerance, restore scaling threshold and node step
DistributedRunner - display server/site assignment, getLikelihoodSum and updateBranchLength take the number number, implement optimiseFitness method, shutdown thread pool in close()
Estimator - load hosts from file supplied on the command line, add checkpointing so we can continue from a saved set of mutation, tree and fitness parameters (xxx_optima.txt files), decrease tolerance for optimisation, add timestamp to output
EstimatorOptions - add -hostfile and -checkpoint[file] options
MultiThreadedRunner - add setSites() to override default "all sites" behaviour (for distributing sites among machines), add multiple runs of fitness optimisation with different initial parameters (this should be an option), getLikelihoodSum and updateBranchLength take the number number
Runner - set branch length minimum to 1e-9
Server - write hostname ip and port
ServerAPI - getLikelihoodSum and updateBranchLength take the number number, add methods for distributed fitness parameter optimisation
ServiceImpl - implements ServerAPI but is essential wrapper around MultiThreadedRunner
Calculator - fix bug that wasn't using the 'cleanedCodons' function
LikelihoodCalculator - getNodeLikelihood and setBranch use the node number, not the Node class
Commit before removal
Removed - now part of Estimator and Calculator
Remove unused Calculator class
AbstractRunner, DistributedRunner, Estimator, EstimatorOptions, MultiThreadedRunner, Runner, ServiceAPI, ServiceImpl  - implement use of a penalty using a Prior
Constants - fix convergence tolerance to 5e-6 and use throughout
LikelihoodCalculator - add penalty when calculating root node likelihood
Prior, NormalPrior, DirichletPrior - make serializable
PhyloUtils - add 'getobservedaminoacids' (needs to be cleaned up with getdistinctaminoacids at some point)