Public API#

View Module Index

class sire.cas.Expression#

An Expression is the base class of all algebraic entities.

Author: Christopher Woods

add((Expression)arg1, (Expression)ex) Expression :#

Return this expression added to ex

C++ signature :

SireCAS::Expression add(SireCAS::Expression {lvalue},SireCAS::Expression)

add( (Expression)arg1, (float)val) -> Expression :

Return this expression added to val

C++ signature :

SireCAS::Expression add(SireCAS::Expression {lvalue},double)

add( (Expression)arg1, (Complex)val) -> Expression :

Return this expression added to val

C++ signature :

SireCAS::Expression add(SireCAS::Expression {lvalue},SireMaths::Complex)

assign((Expression)arg1, (Expression)other) Expression :#
C++ signature :

SireCAS::Expression {lvalue} assign(SireCAS::Expression {lvalue},SireCAS::Expression)

base((Expression)arg1) ExpressionBase :#

Return the ExpressionBase base-part of this expression

C++ signature :

SireCAS::ExpressionBase base(SireCAS::Expression {lvalue})

children((Expression)arg1) object :#

Return the child expressions that make up this expression

C++ signature :

SireCAS::Expressions children(SireCAS::Expression {lvalue})

clone((Expression)arg1) Expression :#
C++ signature :

SireCAS::Expression clone(SireCAS::Expression)

conjugate((Expression)arg1) Expression :#

Return the complex conjugate of this expression

C++ signature :

SireCAS::Expression conjugate(SireCAS::Expression {lvalue})

cubed((Expression)arg1) Expression :#

Return the cube of this expression

C++ signature :

SireCAS::Expression cubed(SireCAS::Expression {lvalue})

diff((Expression)arg1, (Symbol)symbol[, (int)level=1]) Expression :#

Synonym for differentiate

C++ signature :

SireCAS::Expression diff(SireCAS::Expression {lvalue},SireCAS::Symbol [,int=1])

differentiate((Expression)arg1, (Symbol)symbol[, (int)level=1]) Expression :#

Differentiate this expression with respect to symbol and return the resulting expression. Throw: SireCAS::unavailable_differential

C++ signature :

SireCAS::Expression differentiate(SireCAS::Expression {lvalue},SireCAS::Symbol [,int=1])

divide((Expression)arg1, (Expression)ex) Expression :#

Return an expression that is this ex

C++ signature :

SireCAS::Expression divide(SireCAS::Expression {lvalue},SireCAS::Expression)

divide( (Expression)arg1, (float)val) -> Expression :

Return an expression that is this divided by val

C++ signature :

SireCAS::Expression divide(SireCAS::Expression {lvalue},double)

divide( (Expression)arg1, (Complex)val) -> Expression :

Return an expression that is divided by the complex number z

C++ signature :

SireCAS::Expression divide(SireCAS::Expression {lvalue},SireMaths::Complex)

evaluate((Expression)arg1, (Values)values) float :#
Evaluate the numerical value of this expression, using the values

supplied in values. Any unidentified symbols or functions are assumed to be equal to zero. Note that this only performs real-arithmetic, so an exception will be thrown if any part of this expression generates a complex result. Throw: SireMaths::domain_error

C++ signature :

double evaluate(SireCAS::Expression {lvalue},SireCAS::Values)

evaluate( (Expression)arg1, (ComplexValues)values) -> Complex :

Evaluate the numerical value of this expression using complex arithmetic. Any unidentified symbols or functions are assumed to be equal to zero.

C++ signature :

SireMaths::Complex evaluate(SireCAS::Expression {lvalue},SireCAS::ComplexValues)

expand((Expression)arg1, (Symbol)symbol) object :#

Return the factors and powers for the symbol symbol, given the values of the other symbols in values. This attempts to rearrange this equation so that it is of the form m symbol^i + n symbol^j … + constant, and it returns the values of m,i, n,j etc.. Note that this will fail if such a rearrangement is not possible Throw: SireCAS::rearrangement_error

C++ signature :

QList<SireCAS::Factor> expand(SireCAS::Expression {lvalue},SireCAS::Symbol)

factor((Expression)arg1) float :#

Return the factor of this expression

C++ signature :

double factor(SireCAS::Expression {lvalue})

functions((Expression)arg1) object :#

Return all of the functions used in this expression

C++ signature :

SireCAS::Functions functions(SireCAS::Expression {lvalue})

hash((Expression)arg1) int :#
C++ signature :

unsigned int hash(SireCAS::Expression {lvalue})

integ((Expression)arg1, (Symbol)symbol) Expression :#

Synonym for integrate

C++ signature :

SireCAS::Expression integ(SireCAS::Expression {lvalue},SireCAS::Symbol)

integrate((Expression)arg1, (Symbol)symbol) Expression :#

Integrate this expression with respect to symbol and return the resulting expression. Throw: SireCAS::unavailable_integral

C++ signature :

SireCAS::Expression integrate(SireCAS::Expression {lvalue},SireCAS::Symbol)

invert((Expression)arg1) Expression :#

Return 1 expression

C++ signature :

SireCAS::Expression invert(SireCAS::Expression {lvalue})

is_complex()#
isComplex( (Expression)arg1) -> bool :

Return whether or not this expression has complex parts

C++ signature :

bool isComplex(SireCAS::Expression {lvalue})

is_compound()#
isCompound( (Expression)arg1) -> bool :

Return whether or not this is a compound expression (contains more than a single expression, e.g. Sum, Product or PowerFunction)

C++ signature :

bool isCompound(SireCAS::Expression {lvalue})

is_constant()#
isConstant( (Expression)arg1) -> bool :

Return whether or not this expression is constant for all values

C++ signature :

bool isConstant(SireCAS::Expression {lvalue})

is_function()#
isFunction( (Expression)arg1, (Symbol)symbol) -> bool :

Return whether or not this is a function of symbol

C++ signature :

bool isFunction(SireCAS::Expression {lvalue},SireCAS::Symbol)

is_zero()#
isZero( (Expression)arg1) -> bool :

Return whether or not this expression is equal to 0 for all values

C++ signature :

bool isZero(SireCAS::Expression {lvalue})

multiply((Expression)arg1, (Expression)ex) Expression :#

Return an expression that is this multiplied by ex

C++ signature :

SireCAS::Expression multiply(SireCAS::Expression {lvalue},SireCAS::Expression)

multiply( (Expression)arg1, (float)val) -> Expression :

Return an expression that is this multipled by val

C++ signature :

SireCAS::Expression multiply(SireCAS::Expression {lvalue},double)

multiply( (Expression)arg1, (Complex)val) -> Expression :

Return an expression that is this multiplied by the complex value z

C++ signature :

SireCAS::Expression multiply(SireCAS::Expression {lvalue},SireMaths::Complex)

negate((Expression)arg1) Expression :#

Return the negative of this expression

C++ signature :

SireCAS::Expression negate(SireCAS::Expression {lvalue})

pow((Expression)arg1, (int)n) Expression :#

Return this expression raised to the power n

C++ signature :

SireCAS::Expression pow(SireCAS::Expression {lvalue},int)

pow( (Expression)arg1, (float)n) -> Expression :

Return this expression raised to a real number power

C++ signature :

SireCAS::Expression pow(SireCAS::Expression {lvalue},double)

pow( (Expression)arg1, (Complex)n) -> Expression :

Return this expresssion raised to a complex power

C++ signature :

SireCAS::Expression pow(SireCAS::Expression {lvalue},SireMaths::Complex)

pow( (Expression)arg1, (Rational)n) -> Expression :

Return this expression raised to the rational power n

C++ signature :

SireCAS::Expression pow(SireCAS::Expression {lvalue},SireMaths::Rational)

pow( (Expression)arg1, (Expression)n) -> Expression :

Return this expression raised to a function

C++ signature :

SireCAS::Expression pow(SireCAS::Expression {lvalue},SireCAS::Expression)

root((Expression)arg1, (int)n) Expression :#

Return the nth root of this expression

C++ signature :

SireCAS::Expression root(SireCAS::Expression {lvalue},int)

series((Expression)arg1, (Symbol)symbol, (int)order) Expression :#

Return a series expansion of this function with respect to symbol up to order n. If an expansion is not possible, then this just returns this expression

C++ signature :

SireCAS::Expression series(SireCAS::Expression {lvalue},SireCAS::Symbol,int)

simplify((Expression)arg1[, (int)options=0]) Expression :#

Try to simplify this expression by using built-in identities. If SireCAS::UNSAFE_COMPLEX_SIMPLIFICATIONS is passed, then allow the use of identities that are not necessarily true in the complex domain, e.g. z = sin(arcsin(z))

C++ signature :

SireCAS::Expression simplify(SireCAS::Expression {lvalue} [,int=0])

squared((Expression)arg1) Expression :#

Return the square of this expression

C++ signature :

SireCAS::Expression squared(SireCAS::Expression {lvalue})

substitute((Expression)arg1, (Identities)identities) Expression :#

Return an expression whereby the identities in identities have been substituted into this expression

C++ signature :

SireCAS::Expression substitute(SireCAS::Expression {lvalue},SireCAS::Identities)

subtract((Expression)arg1, (Expression)ex) Expression :#

Return an expression that is this - ex

C++ signature :

SireCAS::Expression subtract(SireCAS::Expression {lvalue},SireCAS::Expression)

subtract( (Expression)arg1, (float)val) -> Expression :

Return an expression that is this - val

C++ signature :

SireCAS::Expression subtract(SireCAS::Expression {lvalue},double)

subtract( (Expression)arg1, (Complex)val) -> Expression :

Return an expression that is this - val

C++ signature :

SireCAS::Expression subtract(SireCAS::Expression {lvalue},SireMaths::Complex)

symbols((Expression)arg1) object :#

Return all of the symbols used in this expression

C++ signature :

SireCAS::Symbols symbols(SireCAS::Expression {lvalue})

to_open_m_m_string()#
toOpenMMString( (Expression)arg1) -> object :

Return a string representation of this expression in the OpenMM syntax

C++ signature :

QString toOpenMMString(SireCAS::Expression {lvalue})

to_string()#
toString( (Expression)arg1) -> object :

Return a string representation of this expression

C++ signature :

QString toString(SireCAS::Expression {lvalue})

typename()#

typeName() -> str :

C++ signature :

char const* typeName()

what((Expression)arg1) str :#
C++ signature :

char const* what(SireCAS::Expression {lvalue})

class sire.cas.LambdaSchedule#

This is a schedule that specifies how parameters are changed according to a global lambda value. The change can be broken up by sub lever, and by stage.

add_charge_scale_stages()#
addChargeScaleStages( (LambdaSchedule)arg1 [, (float)scale=0.2]) -> None :
Sandwich the current set of stages with a charge-descaling and

a charge-scaling stage. This prepends a charge-descaling stage that scales the charge parameter down from initial to :gamma:.initial (where :gamma:=`scale`). The charge parameter in all of the exising stages in this schedule are then multiplied by :gamma:. A final charge-rescaling stage is then appended that scales the charge parameter from :gamma:.final to final.

C++ signature :

void addChargeScaleStages(SireCAS::LambdaSchedule {lvalue} [,double=0.2])

addChargeScaleStages( (LambdaSchedule)arg1, (object)decharge_name, (object)recharge_name [, (float)scale=0.2]) -> None :

C++ signature :

void addChargeScaleStages(SireCAS::LambdaSchedule {lvalue},QString,QString [,double=0.2])

add_lever()#
addLever( (LambdaSchedule)arg1, (object)lever) -> None :
Add a lever to the schedule. This is only useful if you want to

plot how the equations would affect the lever. Levers will be automatically added by any perturbation run that needs them, so you dont need to add them manually yourself.

C++ signature :

void addLever(SireCAS::LambdaSchedule {lvalue},QString)

add_levers()#
addLevers( (LambdaSchedule)arg1, (object)levers) -> None :
Add some levers to the schedule. This is only useful if you want to

plot how the equations would affect the lever. Levers will be automatically added by any perturbation run that needs them, so you dont need to add them manually yourself.

C++ signature :

void addLevers(SireCAS::LambdaSchedule {lvalue},QStringList)

add_morph_stage()#
addMorphStage( (LambdaSchedule)arg1) -> None :
Append a morph stage onto this schedule. The morph stage is a

standard stage that scales each forcefield parameter by (1-:lambda:).initial + :lambda:.final

C++ signature :

void addMorphStage(SireCAS::LambdaSchedule {lvalue})

addMorphStage( (LambdaSchedule)arg1, (object)name) -> None :

C++ signature :

void addMorphStage(SireCAS::LambdaSchedule {lvalue},QString)

add_stage()#
addStage( (LambdaSchedule)arg1, (object)stage, (Expression)equation) -> None :
Append a stage called name which uses the passed equation

to the end of this schedule. The equation will be the default equation that scales all parameters (levers) that dont have a custom lever for this stage.

C++ signature :

void addStage(SireCAS::LambdaSchedule {lvalue},QString,SireCAS::Expression)

append_stage()#
appendStage( (LambdaSchedule)arg1, (object)stage, (Expression)equation) -> None :
Append a stage called name which uses the passed equation

to the end of this schedule. The equation will be the default equation that scales all parameters (levers) that dont have a custom lever for this stage.

C++ signature :

void appendStage(SireCAS::LambdaSchedule {lvalue},QString,SireCAS::Expression)

assign((LambdaSchedule)arg1, (LambdaSchedule)other) LambdaSchedule :#
C++ signature :

SireCAS::LambdaSchedule {lvalue} assign(SireCAS::LambdaSchedule {lvalue},SireCAS::LambdaSchedule)

static charge_scaled_morph([(float)scale=0.2]) LambdaSchedule :#
Return a LambdaSchedule that represents a central morph

stage that is sandwiched between a charge descaling, and a charge rescaling stage. The first stage scales the charge lever down from 1.0 to scale. This is followed by a standard morph stage using the descaled charges. This the finished with a recharging stage that restores the charges back to their original values.

C++ signature :

SireCAS::LambdaSchedule charge_scaled_morph([ double=0.2])

clamp((LambdaSchedule)arg1, (float)lambda_value) float :#
Clamp and return the passed lambda value so that it is between a valid

range for this schedule (typically between [0.0-1.0] inclusive).

C++ signature :

double clamp(SireCAS::LambdaSchedule {lvalue},double)

clear((LambdaSchedule)arg1) None :#

Completely clear all stages and levers

C++ signature :

void clear(SireCAS::LambdaSchedule {lvalue})

clone((LambdaSchedule)arg1) LambdaSchedule :#
C++ signature :

SireCAS::LambdaSchedule clone(SireCAS::LambdaSchedule)

static final() Symbol :#
Return the symbol used to represent the final

(:lambda:=1) value of the forcefield parameter

C++ signature :

SireCAS::Symbol final()

get_constant()#
getConstant( (LambdaSchedule)arg1, (object)constant) -> float :
Return the value of the passed constant that may be

used in any of the stage equations

C++ signature :

double getConstant(SireCAS::LambdaSchedule {lvalue},QString)

getConstant( (LambdaSchedule)arg1, (Symbol)constant) -> float :
Return the value of the passed constant that may be

used in any of the stage equations

C++ signature :

double getConstant(SireCAS::LambdaSchedule {lvalue},SireCAS::Symbol)

get_constant_symbol()#
getConstantSymbol( (LambdaSchedule)arg1, (object)constant) -> Symbol :

Get the Symbol used to represent the named constant constant

C++ signature :

SireCAS::Symbol getConstantSymbol(SireCAS::LambdaSchedule {lvalue},QString)

get_equation()#
getEquation( (LambdaSchedule)arg1, (object)stage) -> Expression :
Return the default equation used to control the parameters for

the stage stage.

C++ signature :

SireCAS::Expression getEquation(SireCAS::LambdaSchedule {lvalue},QString)

getEquation( (LambdaSchedule)arg1, (object)stage, (object)lever) -> Expression :
Return the equation used to control the specified lever

at the specified stage. This will be a custom equation if that has been set for this lever, or else the default equation for this stage.

C++ signature :

SireCAS::Expression getEquation(SireCAS::LambdaSchedule {lvalue},QString,QString)

get_lambda_in_stage()#
getLambdaInStage( (LambdaSchedule)arg1, (float)lambda_value) -> float :
Return the stage-local value of :lambda: that corresponds to the

global value of :lambda: at lambda_value

C++ signature :

double getLambdaInStage(SireCAS::LambdaSchedule {lvalue},double)

get_lever_stages()#
getLeverStages( (LambdaSchedule)arg1, (object)lambda_values) -> object :
Return the list of lever stages that are used for the passed list

of lambda values. The lever names will be returned in the matching order of the lambda values.

C++ signature :

QStringList getLeverStages(SireCAS::LambdaSchedule {lvalue},QVector<double>)

getLeverStages( (LambdaSchedule)arg1 [, (int)num_lambda=101]) -> object :
Return the lever stages used for the list of nvalue lambda values

generated for the global lambda value between 0 and 1 inclusive.

C++ signature :

QStringList getLeverStages(SireCAS::LambdaSchedule {lvalue} [,int=101])

get_lever_values(lambda_values=None, levers=None, num_lambda=101, initial=1.0, final=2.0, to_pandas: bool = True)#

Return the values a parameter starting at ‘initial’ and going to ‘final’ would take for the specified lambda values.

Return this as a pandas DataFrame is ‘to_pandas’ is True

lambda_values: list[float]

A list of lambda values to evaluate. If this is not passed then the lambda values will be auto-generated

levers: str or list[str]

A list of the levers for which to retrieve the values. If this is not given, then all of the levers will be returned.

num_lambda: int

The number of lambda values to auto-generate if a list of lambda values is not passed. This defaults to 101.

initial: float

The initial value of the parameter (value at lambda=0). Defaults to 0.0

final: float

The final value of the parameter (value at lambda=1). Defaults to 1.0

to_pandas: bool

Whether or not to return the result as a pandas DataFrame (defaults to True)

get_levers()#
getLevers( (LambdaSchedule)arg1) -> object :
Return all of the levers that have been explicitly added

to the schedule. Note that levers will be automatically added by any perturbation run that needs them, so you dont normally need to manage them manually yourself.

C++ signature :

QStringList getLevers(SireCAS::LambdaSchedule {lvalue})

get_stage()#
getStage( (LambdaSchedule)arg1, (float)lambda_value) -> object :
Return the name of the stage that controls the forcefield parameters

at the global value of :lambda: equal to lambda_value

C++ signature :

QString getStage(SireCAS::LambdaSchedule {lvalue},double)

get_stages()#
getStages( (LambdaSchedule)arg1) -> object :
Return the names of all of the stages in this schedule, in

the order they will be performed

C++ signature :

QStringList getStages(SireCAS::LambdaSchedule {lvalue})

static initial() Symbol :#
Return the symbol used to represent the initial

(:lambda:=0) value of the forcefield parameter

C++ signature :

SireCAS::Symbol initial()

insert_stage()#
insertStage( (LambdaSchedule)arg1, (int)i, (object)stage, (Expression)equation) -> None :
Insert a stage called name at position i which uses the passed

equation. The equation will be the default equation that scales all parameters (levers) that dont have a custom lever for this stage.

C++ signature :

void insertStage(SireCAS::LambdaSchedule {lvalue},int,QString,SireCAS::Expression)

is_null()#

isNull( (LambdaSchedule)arg1) -> bool :

C++ signature :

bool isNull(SireCAS::LambdaSchedule {lvalue})

static lam() Symbol :#
Return the symbol used to represent the :lambda: coordinate.

This symbol is used to represent the per-stage :lambda: variable that goes from 0.0-1.0 within that stage.

C++ signature :

SireCAS::Symbol lam()

morph((LambdaSchedule)arg1, (object)lever, (float)initial, (float)final, (float)lambda_value) float :#
Return the parameters for the specified lever called lever_name

that have been morphed from the passed list of initial values (in initial) to the passed list of final values (in final) for the specified global value of :lambda: (in lambda_value).

The morphed parameters will be returned in the matching order to initial and final.

This morphs a single floating point parameters.

C++ signature :

double morph(SireCAS::LambdaSchedule {lvalue},QString,double,double,double)

morph( (LambdaSchedule)arg1, (object)lever, (object)initial, (object)final, (float)lambda_value) -> object :
Return the parameters for the specified lever called lever_name

that have been morphed from the passed list of initial values (in initial) to the passed list of final values (in final) for the specified global value of :lambda: (in lambda_value).

The morphed parameters will be returned in the matching order to initial and final.

This morphs floating point parameters. There is an overload of this function that morphs integer parameters, in which case the result would be rounded to the nearest integer.

C++ signature :

QVector<double> morph(SireCAS::LambdaSchedule {lvalue},QString,QVector<double>,QVector<double>,double)

morph( (LambdaSchedule)arg1, (object)lever, (object)initial, (object)final, (float)lambda_value) -> object :
Return the parameters for the specified lever called lever_name

that have been morphed from the passed list of initial values (in initial) to the passed list of final values (in final) for the specified global value of :lambda: (in lambda_value).

The morphed parameters will be returned in the matching order to initial and final.

This function morphs integer parameters. In this case, the result will be the rounded to the nearest integer.

C++ signature :

QVector<int> morph(SireCAS::LambdaSchedule {lvalue},QString,QVector<int>,QVector<int>,double)

num_levers()#
nLevers( (LambdaSchedule)arg1) -> int :
Return the number of levers that have been explicitly added

to the schedule. Note that levers will be automatically added by any perturbation run that needs them, so you dont normally need to manage them manually yourself.

C++ signature :

int nLevers(SireCAS::LambdaSchedule {lvalue})

num_stages()#
nStages( (LambdaSchedule)arg1) -> int :

Return the number of stages in this schedule

C++ signature :

int nStages(SireCAS::LambdaSchedule {lvalue})

prepend_stage()#
prependStage( (LambdaSchedule)arg1, (object)stage, (Expression)equation) -> None :
Prepend a stage called name which uses the passed equation

to the start of this schedule. The equation will be the default equation that scales all parameters (levers) that dont have a custom lever for this stage.

C++ signature :

void prependStage(SireCAS::LambdaSchedule {lvalue},QString,SireCAS::Expression)

remove_equation()#
removeEquation( (LambdaSchedule)arg1, (object)stage, (object)lever) -> None :
Remove the custom equation for the specified lever at the

specified stage. The lever will now use the default equation at this stage.

C++ signature :

void removeEquation(SireCAS::LambdaSchedule {lvalue},QString,QString)

remove_lever()#
removeLever( (LambdaSchedule)arg1, (object)lever) -> None :
Remove a lever from the schedule. This will not impact any

perturbation runs that use this schedule, as any missing levers will be re-added.

C++ signature :

void removeLever(SireCAS::LambdaSchedule {lvalue},QString)

remove_levers()#
removeLevers( (LambdaSchedule)arg1, (object)levers) -> None :
Remove some levers from the schedule. This will not impact any

perturbation runs that use this schedule, as any missing levers will be re-added.

C++ signature :

void removeLevers(SireCAS::LambdaSchedule {lvalue},QStringList)

set_constant()#
setConstant( (LambdaSchedule)arg1, (object)constant, (float)value) -> Symbol :
Set the value of a constant that may be used in any

of the stage equations.

C++ signature :

SireCAS::Symbol setConstant(SireCAS::LambdaSchedule {lvalue},QString,double)

setConstant( (LambdaSchedule)arg1, (Symbol)constant, (float)value) -> Symbol :
Set the value of a constant that may be used in any

of the stage equations.

C++ signature :

SireCAS::Symbol setConstant(SireCAS::LambdaSchedule {lvalue},SireCAS::Symbol,double)

set_default_equation()#
setDefaultEquation( (LambdaSchedule)arg1, (object)stage, (Expression)equation) -> None :
Set the default equation used to control levers for the

stage stage to equation. This equation will be used to control any levers in this stage that dont have their own custom equation.

C++ signature :

void setDefaultEquation(SireCAS::LambdaSchedule {lvalue},QString,SireCAS::Expression)

set_equation()#
setEquation( (LambdaSchedule)arg1, (object)stage, (object)lever, (Expression)equation) -> None :
Set the custom equation used to control the specified

lever at the stage stage to equation. This equation will only be used to control the parameters for the specified lever at the specified stage.

C++ signature :

void setEquation(SireCAS::LambdaSchedule {lvalue},QString,QString,SireCAS::Expression)

static standard_morph() LambdaSchedule :#
Return a LambdaSchedule that represents a standard morph,

where every forcefield parameter is scaled by (1-:lambda:).initial + :lambda:.final

C++ signature :

SireCAS::LambdaSchedule standard_morph()

to_string()#

toString( (LambdaSchedule)arg1) -> object :

C++ signature :

QString toString(SireCAS::LambdaSchedule {lvalue})

typename()#

typeName() -> str :

C++ signature :

char const* typeName()

what((LambdaSchedule)arg1) str :#
C++ signature :

char const* what(SireCAS::LambdaSchedule {lvalue})

class sire.cas.Symbol#

This class represents an algebraic symbol in the equation (e.g. x or y)

Author: Christopher Woods

assign((Symbol)arg1, (Symbol)other) Symbol :#
C++ signature :

SireCAS::Symbol {lvalue} assign(SireCAS::Symbol {lvalue},SireCAS::Symbol)

assign( (Symbol)arg1, (int)symid) -> Symbol :

C++ signature :

SireCAS::Symbol {lvalue} assign(SireCAS::Symbol {lvalue},unsigned int)

children((Symbol)arg1) object :#

There are no child expressions in a symbol

C++ signature :

SireCAS::Expressions children(SireCAS::Symbol {lvalue})

clone((Symbol)arg1) Symbol :#
C++ signature :

SireCAS::Symbol clone(SireCAS::Symbol)

differentiate((Symbol)arg1, (Symbol)symbol) Expression :#

Differentiate this symbol with respect to sym. This returns 1.0 if this is sym, else it returns 0.0

C++ signature :

SireCAS::Expression differentiate(SireCAS::Symbol {lvalue},SireCAS::Symbol)

evaluate((Symbol)arg1, (Values)values) float :#
Evaluate this symbol - returns the value of the symbol in values if

it is present, else it returns 0.0

C++ signature :

double evaluate(SireCAS::Symbol {lvalue},SireCAS::Values)

evaluate( (Symbol)arg1, (ComplexValues)values) -> Complex :

Evaluate this symbol - returns the value of the symbol in values if it is present, else it returns 0

C++ signature :

SireMaths::Complex evaluate(SireCAS::Symbol {lvalue},SireCAS::ComplexValues)

expand((Symbol)arg1, (Symbol)symbol) object :#
C++ signature :

QList<SireCAS::Factor> expand(SireCAS::Symbol {lvalue},SireCAS::Symbol)

functions((Symbol)arg1) object :#

This is not a function

C++ signature :

SireCAS::Functions functions(SireCAS::Symbol {lvalue})

hash((Symbol)arg1) int :#

Hash a symbol

C++ signature :

unsigned int hash(SireCAS::Symbol {lvalue})

id()#
ID( (Symbol)arg1) -> int :

Return the unique ID number of the symbol

C++ signature :

unsigned int ID(SireCAS::Symbol {lvalue})

integrate((Symbol)arg1, (Symbol)symbol) Expression :#

Integrate this symbol with respect to sym. If sym == this, then return 0.5 sym^2, else return this sym

C++ signature :

SireCAS::Expression integrate(SireCAS::Symbol {lvalue},SireCAS::Symbol)

is_constant()#
isConstant( (Symbol)arg1) -> bool :

A symbol is by definition not constant

C++ signature :

bool isConstant(SireCAS::Symbol {lvalue})

is_function()#
isFunction( (Symbol)arg1, (Symbol)arg0) -> bool :

Is this a function of symbol

C++ signature :

bool isFunction(SireCAS::Symbol {lvalue},SireCAS::Symbol)

is_null()#
isNull( (Symbol)arg1) -> bool :

Return whether or not the symbol is null

C++ signature :

bool isNull(SireCAS::Symbol {lvalue})

substitute((Symbol)arg1, (Identities)identities) Expression :#

Return the expression that matches this symbol in identities - or return an expression holding only this symbol if it does no exist in identities

C++ signature :

SireCAS::Expression substitute(SireCAS::Symbol {lvalue},SireCAS::Identities)

symbols((Symbol)arg1) object :#

Return this symbol

C++ signature :

SireCAS::Symbols symbols(SireCAS::Symbol {lvalue})

to_string()#
toString( (Symbol)arg1) -> object :

Return a string representation of this symbol

C++ signature :

QString toString(SireCAS::Symbol {lvalue})

typename()#

typeName() -> str :

C++ signature :

char const* typeName()

what((Symbol)arg1) str :#
C++ signature :

char const* what(SireCAS::Symbol {lvalue})

sire.cas.lam A Symbol representing λ.#

This class represents an algebraic symbol in the equation (e.g. x or y)

Author: Christopher Woods

sire.cas.x A Symbol representing x#

This class represents an algebraic symbol in the equation (e.g. x or y)

Author: Christopher Woods

sire.cas.y A Symbol representing y#

This class represents an algebraic symbol in the equation (e.g. x or y)

Author: Christopher Woods