Example #1
0
 /// <summary>
 /// ScoreTotal copying constructor.
 /// </summary>
 /// <param name="s">Score to copy.</param>
 public ScoreTotal(ScoreTotal s)
     : base(s)
 {
     this.Sm = new ScoreMean(s.Sm);
     this.So = new ScoreOptimum(s.So);
     this.TargetTm = s.TargetTm;
 }
Example #2
0
        /// <summary>
        /// Evaluate the chromosome.
        /// </summary>
        /// <param name="templates">List of overlap templates.</param>
        /// <param name="settings">Designer settings.</param>
        /// <returns>Total score of the chromosome.</returns>
        public ScoreTotal Evaluate(List<Overlap> templates, DesignerSettings settings, bool ignoreHeterodimers)
        {
            this.ToOverlaps(templates);

            bool accept = true;
            foreach (Overlap o in this.Overlaps)
            {
                if (!o.IsAcceptable(settings.MaxTh, settings.MaxTd, ignoreHeterodimers))
                {
                    accept = false;
                    break;
                }
            }

            if (accept)
                this.Score.Rescore(Overlaps);
            else
                this.Score = ScoreTotal.Inacceptable;

            return this.Score;
        }