Implementations of 2 new cvs: native contact fraction Q and angles between two vectors#327
Open
yihengwuKP wants to merge 24 commits intoSSAGESLabs:mainfrom
Open
Implementations of 2 new cvs: native contact fraction Q and angles between two vectors#327yihengwuKP wants to merge 24 commits intoSSAGESLabs:mainfrom
yihengwuKP wants to merge 24 commits intoSSAGESLabs:mainfrom
Conversation
|
Merging to
|
update the examples, this is simply a better choice of the contacts. Otherwise it contains bonded pairs which will always be there.
p-zubieta
reviewed
Aug 8, 2024
Comment on lines
15
to
25
| def remap_indices(contacts, sorted_unique_indices): | ||
| # create the mapping from old indices to new indices | ||
| old_indices = np.array(sorted_unique_indices) | ||
| new_indices = np.arange(len(sorted_unique_indices)) | ||
| index_mapping = np.zeros(old_indices.max() + 1, dtype=new_indices.dtype) | ||
| index_mapping = index_mapping.at[old_indices].set(new_indices) | ||
|
|
||
| contacts = np.array(contacts) | ||
| remapped_contacts = index_mapping[contacts] | ||
|
|
||
| return remapped_contacts |
Member
There was a problem hiding this comment.
I need to check, but this looks like something that could be accomplished, by using argsort
Collaborator
Author
There was a problem hiding this comment.
yes, and I've just implemented this in commits below
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi I've implemented two new cvs: 1. angle between two vectors 2. native contact fraction Q. Please let me know if anything needs to be modified! I've added another python script under colvars
contacts.pyfor Q, but the vector angles are added inangles.py. I've implemented testing for Q and its derivatives inexample/openmm/cv_Q.