Replies: 3 comments 1 reply
-
The only way I can think of right now is a string, say comma separated, which you parse yourself (there might already be a split function you could use). We could implement a modification to the parser that array parameters can handle handle a single value input, and if so, set all array elements equal to it, but I don't think that happens now. And to the extent that these strings are expected to be the same format as the 2nd extxyz line (which is not necessarily going to remain true once we have the separate reader, unless we refactor it so it can be used for standalone strings) it'll break the consistency between fortran and python, because only in fortran are the array dimensions known before parsing.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Reading a string and then doing my own parsing was what I had in mind as fallback option, so I'll probably try that one out. I'll keep an eye for possible issues with quippy. |
Beta Was this translation helpful? Give feedback.
0 replies
-
have a look at how e0 is done - that can be set as a scalar, or as a string (which is then parsed into an array)
…-- Gábor
Gábor Csányi
Professor of Molecular Modelling
Engineering Laboratory, University of Cambridge
Pembroke College Cambridge
Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/
On 14 Aug 2021, at 14:33, Miguel A. Caro ***@***.***> wrote:
Reading a string and then doing my own parsing was what I had in mind as fallback option, so I'll probably try that one out. I'll keep an eye for possible issues with quippy.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to simplify the soap_turbo string and make it more soap-like. What would be the best way to call
param_register()
for a variable that is internally an array, but allowing the user to define it as a scalar (so that all the array elements would default to this scalar)?Example, in soap_turbo the number of radial basis functions is defined for each element, if you have a soap descriptor with 3 species, you'd do something like
n_max={10 8 9}
. But imagine that you don't want or need to optimize the number of basis functions per species and just want all of them to use the same number by, e.g., definingn_max=9
. Then the code would setn_max(1:3) = 9
either insideparam_register()
or indescriptors.f95
using some "flag" of information retrievable fromparam_register()
.What would be the easiest, most "quipionic" way to go about this?
Beta Was this translation helpful? Give feedback.
All reactions