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

Prevent same name for RANGE and FUNCTION. #1316

Closed
1uc opened this issue Jun 12, 2024 · 0 comments · Fixed by #1318
Closed

Prevent same name for RANGE and FUNCTION. #1316

1uc opened this issue Jun 12, 2024 · 0 comments · Fixed by #1318

Comments

@1uc
Copy link
Collaborator

1uc commented Jun 12, 2024

The following MOD file:

: Example of MOD file using sparse solver

NEURON {
    SUFFIX glia
    RANGE alfa, beta
    RANGE Aalfa, Valfa, Abeta, Vbeta
}

PARAMETER {
    Aalfa = 353.91 ( /ms)
    Valfa = 13.99 ( /mV)
    Abeta = 1.272  ( /ms)
    Vbeta = 13.99 ( /mV)
    n1 = 5.422
    n4 = 0.738
}

STATE {
    C1
    C2
}

BREAKPOINT {
    SOLVE kstates METHOD sparse
}

FUNCTION alfa(v(mV)) {
    alfa = Aalfa*exp(v/Valfa)
}

FUNCTION beta(v(mV)) {
    beta = Abeta*exp(-v/Vbeta)
}

KINETIC kstates {
    ~ C1 <-> C2 (n1*alfa(v),n4*beta(v))
}

Uses alfa both as a RANGE variable and as a function, nocmodl rejects the file, but nmodl will happily generate code for.

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

Successfully merging a pull request may close this issue.

1 participant