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: re-usable components #232

Open
jhenin opened this issue Mar 7, 2019 · 10 comments
Open

Feature request: re-usable components #232

jhenin opened this issue Mar 7, 2019 · 10 comments
Assignees

Comments

@jhenin
Copy link
Member

jhenin commented Mar 7, 2019

In a first stage, these may be cvc objects that are thin wrappers around other cvcs and only implement getting the values, not applying forces.

@jhenin jhenin assigned jhenin and giacomofiorin and unassigned jhenin Mar 7, 2019
@HanatoK
Copy link
Member

HanatoK commented Mar 14, 2019

Just curious about this feature. Does this mean we can do something like compute RMSD of dihedrals or other CVs without using custom functions or tcl scripts?

@jhenin
Copy link
Member Author

jhenin commented Mar 14, 2019

For that I think you'll still need custom functions or scripts. This feature is useful when several variables are needed that are different combinations of the same components. Then they'll only need to be computed once. In a first "read-only" stage, it will allow doing analysis on individual components while using them in a separate colvar for biasing.

@giacomofiorin
Copy link
Member

@HanatoK To compute a RMSD of a set of dihedral there is a dihedralPC component, which assumes input in the format used by CARMA: https://utopia.duth.gr/glykos/carma.html and uses dihedral components. You can probably make a similar class with very small effort, should the scripted or custom function be too slow.

@giacomofiorin
Copy link
Member

Looks like this needs #254 done before moving ahead. Assign back to me if needed.

@jhenin
Copy link
Member Author

jhenin commented Jan 13, 2022

Hi @giacomofiorin This feature is getting more useful with additions by @HanatoK (PR coming soon). Another possible pathway is to make a colvar depend on another colvar, but this seems more lightweight in terms of architecture changes.

@giacomofiorin
Copy link
Member

giacomofiorin commented Jan 13, 2022

Good to know, I look forward to the PR.

I also agree that it's better to keep formalize the dependencies between components, since we have already a few ad-hoc cases and it is the components that take up the bulk of the computation.

@HanatoK
Copy link
Member

HanatoK commented Jan 13, 2022

Hi @giacomofiorin,
I don't know too much about colvardeps. Is that possible to treat the dependencies between components just the same as colvarbias and the components? If that can be implemented, then we can refer a CVC in different definition of colvar {} blocks to avoid redundant computations.

@giacomofiorin
Copy link
Member

Yes, what you ask is possible in theory but not implemented yet.

@jhenin
Copy link
Member Author

jhenin commented Jan 13, 2022

The current dependency system would allow a CVC to have several parent colvars, just the same way a colvar can have several parent biases.

@giacomofiorin
Copy link
Member

The current dependency system would allow a CVC to have several parent colvars, just the same way a colvar can have several parent biases.

But the loop over CVCs in the SMP version does not take that into account, and could easily end up invoking the same CVCs on multiple threads at the same time.

It's not a big change to work around that, but it needs to be done.

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

No branches or pull requests

3 participants