class Constraints(taxNames, constraintTree)

A container for tree topology constraints.

A list of taxNames in the same order as in the data or alignment, and the same order as in other tree or trees objects.
A partially resolved tree object that describes the constraints. You need to include all the taxNames.

For example:

tNames = ['A', 'B', 'C', 'D', 'E']
read('(A, B, (E, D), C);')
constTree = var.trees.pop()
c = Constraints(tNames, constTree)
t = func.randomTree(taxNames=tName, constraints=c)

The constraint tree should not have a bifurcating root.

You can pass a Constraints object to func.randomTree() and Mcmc() to enforce constraints.