Back to SimpleMetrics page. Back to Filters page.



Growing Glycans in Rosetta: Accurate de novo glycan modeling, density fitting, and rational sequon design Jared Adolf-Bryfogle, J. W Labonte, J. C Kraft, M. Shapavolov, S. Raemisch, T. Lutteke, F. Dimaio, C. D Bahl, J. Pallesen, N. P King, J. J Gray, D. W Kulp, W. R Schief bioRxiv 2021.09.27.462000;

Run an arbitrary Simple Metric and filter based on the value or values calculated. Please use the RunSimpleMetrics mover to report values into a scorefile.


Set the comparison_type to instruct the filter how to actually filter based on the data. The comparison is done as follows:

metric_value comparison_type cutoff/match value

For example, if comparison_type is set to eq: if metric value is equal to the cutoff/match value we return true.

Acceptable comparison_types are typical equality comparisons:

comparison_type Description
eq Equal
ne Not Equal
lt Less Than
gt Greater Than,
lt_or_eq Less Than or Equal to
gt_or_eq Greater Than or Equal

Numeric Metrics

These include RealMetrics, IntegerMetrics, and their composite counterparts. The cutoff option is required to set a particular cutoff type.

String Metrics

These include StringMetrics and its composite counterpart The match option is required to set some arbitrary string to match to. Only eq and ne comparison_types can be used.

Composite Metrics

Composite Metrics take an additional option, composite_action to instruct the filter exactly what to do with the composite metric. Acceptable options are:

composite_action Description
any Filter on ANY metric in the composite. For example, if we have lt, and cutoff as 5, than if ANY metric is less than 5, we return True.
all Filter on ALL metrics. For example, if we use the same example as above with ALL, then ALL metrics in the composite must be less than 5 to pass the filter
metric_name This can be any composite name. See the individual composite for more. For the case of the CompositeEnergyMetric this can be any scoreterm name. This allows us to filter on any metric name calculated by the composite metric.

Autogenerated Tag Syntax Documentation:

Run a SimpleMetric (Real) as a filter. Set the cutoff and comparison_type to control the behavior of this filter.

<SimpleMetricFilter name="(&string;)" epsilon="(.0001 &real;)"
        metric="(&string;)" comparison_type="(&comparison_types;)"
        composite_action="(&string;)" cutoff="(&real;)" match="(&string;)"
        use_sum_for_per_residue_real="(&bool;)" use_cached_data="(false &bool;)"
        cache_prefix="(&string;)" cache_suffix="(&string;)"
        fail_on_missing_cache="(true &bool;)" confidence="(1.0 &real;)" >
    <Simple Metric Tag ... />
  • epsilon: Epsilon for numerical comparisons
  • metric: The metric to run in this filter.
  • comparison_type: The comparison type. IE not equal, equal, etc. IF value [comparison_type] cutoff_ or match_ we return TRUE. Example (RMSDMetric) cutoff=4.0, comparison_type=lt. We return true if the RMSD is less than 4.0. Required. Choices are: [eq, gt, gt_or_eq, lt, lt_or_eq, ne]
  • composite_action: If you have a composite metric or PerResidueMetric this can be any, all or a specific composite value type (Rosetta ResNum for per-residue metric.
  • cutoff: Number to use to determine if filter passes or not for any RealMetric or CompositeRealMetric. Set the comparison_type to indicate the behavior of this filter.
  • match: String to match on to determine if filter passes or not for any StringMetric or CompositeStringMetric. Set the comparison type to indicate the behavior of this filter.
  • use_sum_for_per_residue_real: If you are using a PerResidueRealMetric, set this to use the SUM of the values to act as a RealMetric instead of acting as a composite metric. Default False.
  • use_cached_data: Use any data stored in the datacache that matches the set metrics name (and any prefix/suffix.) Data is stored during a SimpleMetric's apply function, which is called during RunSimpleMetrics
  • cache_prefix: Any prefix used during apply (RunSimpleMetrics), that we will match on if use_cache is true
  • cache_suffix: Any suffix used during apply (RunSimpleMetrics), that we will match on if use_cache is true
  • fail_on_missing_cache: If use_cached_data is True and cache is not found, should we fail?
  • confidence: Probability that the pose will be filtered out if it does not pass this Filter

"Simple Metric Tag": Any of the SimpleMetrics


Example with comparison to native through -in:file:native:

		<CDR name="L1" cdrs="L1"/>
		<MoveMapFactory name="movemap_L1" bb="0" chi="0">
			<Backbone residue_selector="L1" />
			<Chi residue_selector="L1" />
		<RMSDMetric name="rmsd" rmsd_type="rmsd_protein_bb_heavy" residue_selector="L1" use_native="1"/>
		<SasaMetric name="sasa" residue_selector="L1"/>
		<SecondaryStructureMetric name="ss" residue_selector="L1" />
		<TotalEnergyMetric name="total_energy" residue_selector="L1" use_native="0"/>
		<CompositeEnergyMetric name="composite_energy" residue_selector="L1" use_native="0"/>
		<MinMover name="min_mover" tolerance=".1" movemap_factory="movemap_L1"/> 
		<SimpleMetricFilter name="sasa_filter" metric="sasa" cutoff="100" comparison_type="gt"/>
		<SimpleMetricFilter name="delta_energy" metric="total_energy" cutoff="5" comparison_type="lt"/>
		<SimpleMetricFilter name="composite_all" metric="composite_energy" cutoff="100" composite_action="all" comparison_type="lt"/>
		<SimpleMetricFilter name="ss_filter" metric="ss" match="LLLLLLLLLLL"  comparison_type="ne"/>
		<SimpleMetricFilter name="rmsd_filter" metric="rmsd" cutoff="0.5" comparison_type="lt" />

		<Add mover_name="min_mover" />
		<Add filter_name="sasa_filter" />
		<Add filter_name="delta_energy" />
		<Add filter_name="composite_all" />
		<Add filter_name="ss_filter" />
		<Add filter_name="rmsd_filter" />

See Also