Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating dihedral type #513

Closed
rsdefever opened this issue Feb 20, 2021 · 2 comments
Closed

Error creating dihedral type #513

rsdefever opened this issue Feb 20, 2021 · 2 comments

Comments

@rsdefever
Copy link
Member

I'm trying to create a DihedralType object and I'm getting an error I don't quite understand:

Code:

DihedralType(
    name="Test dihedral",
    expression="kn * (1 + cos(n * a - a0))",
    parameters={
        "kn": float(kn) * u.K * u.kb,
        "n": int(n) * u.dimensionless,
        "a0": float(a0) * u.degree, 
    }
)

Error:

ValueError: symbol phi is not in expression's free symbols. Cannot use an independent variable which doesn't exist in the expression's free symbols {a, kn, n, a0}
@umesh-timalsina
Copy link
Member

umesh-timalsina commented Feb 20, 2021

@rsdefever. This is related to #509, where you specified the parameters for this DihderalType but didn't explictly specify the independent variable and it was assigned the default value which is phi.

@rsdefever
Copy link
Member Author

Thanks @umesh-timalsina, I didn't realize I needed to specify the independent variables. Easy enough 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants