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

[FEATURE REQUEST] Normalise the way indexes are specified in force files #131

Open
lorenzo-rovigatti opened this issue Oct 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@lorenzo-rovigatti
Copy link
Owner

lorenzo-rovigatti commented Oct 3, 2024

As of now, some forces support using words like "last" or "all" when specifying indexes. However, not all forces do, and those that do not also do not check whether the provided index is an accepted token. As a result, using "last" or "all" instead of a proper index can result in an index of 0, which is clearly not what the user want. Here is an example:

{
type = mutual_trap
particle = 0
ref_particle = last
stiff = 1.
r0 = 5
}

{
type = mutual_trap
particle = last
ref_particle = 0
stiff = 1.
r0 = 5
}

which will generate the following lines in the log file:

INFO: Adding a MutualTrap (stiff=1, stiff_rate=0, r0=5, rate=0, ref_particle=0, PBC=0) on particle 0
INFO: Adding a MutualTrap (stiff=1, stiff_rate=0, r0=5, rate=0, ref_particle=0, PBC=0) on particle 0

Note that the particle and ref_particle fields of both forces have been interpreted as 0.

@lorenzo-rovigatti lorenzo-rovigatti added the enhancement New feature or request label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant