Cycle

class hoomd.variant.Cycle(A, B, t_start, t_A, t_AB, t_B, t_BA)

Bases: Variant

A cycle of linear ramps.

Parameters:
  • A (float) – The first value.

  • B (float) – The second value.

  • t_start (int) – The start time step.

  • t_A (int) – The hold time at the first value.

  • t_AB (int) – The time spent ramping from A to B.

  • t_B (int) – The hold time at the second value.

  • t_BA (int) – The time spent ramping from B to A.

Cycle holds the value A until time t_start. It continues holding that value until t_start + t_A. Then it ramps linearly from A to B over t_AB steps and holds the value B for t_B steps. After this, it ramps back from B to A over t_BA steps and repeats the cycle starting with t_A. Cycle repeats this cycle indefinitely.

Example plot of a cycle variant.

Example:

variant = hoomd.variant.Cycle(
    A=1.0,
    B=2.0,
    t_start=10_000,
    t_A=100_000,
    t_AB=1_000_000,
    t_B=200_000,
    t_BA=2_000_000,
)

Members inherited from Variant:

__call__()

Evaluate the function. Read more...

property max

Maximum value of the variant. Read more...

property min

Minimum value of the variant. Read more...


Members defined in Cycle:

A

The first value.

Type:

float

B

The second value.

Type:

float

t_start

The start time step.

Type:

int

t_A

The holding time at A.

Type:

int

t_AB

The time spent ramping from A to B.

Type:

int

t_B

The holding time at B.

Type:

int

t_BA

The time spent ramping from B to A.

Type:

int