-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add ability to move and rotate (via RMS fitting on coordinates) grids #913
Merged
Conversation
This file contains 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
implementation; which calc routine gets used will depend on if the grid is X-aligned and orthogonal or not.
performance for orthogonal grids.
for. Add more code documentation
first frame to current frame. Since rms fit to a single reference is usually what is done before grid, this gives results more in line to what is expected.
inheriting class implement summation of the grid.
gridset keyword for 'vector' command.
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.
Version 5.4.1.
This represents a significant enhancement in grid functionality in cpptraj. Grids are no longer locked in as being orthogonal or non-orthgonal. The GridBin class has been reworked to be general - when the grid is X-aligned, the orthogonal routines are used, otherwise the non-orthogonal routines are used. Which routines are used are set via internal function pointers which are updated if the grid is ever rotated.
There are now 3 new modes for
grid
(anddipole
andgfe
, which use the GridAction class under the hood).boxcenter
: Ensure grid remains centered in the middle of the unit cell.maskcenter <mask>
: Ensure grid remains centered on atoms selected by<mask>
.rmsfit <mask>
: Center and rotate grid to match selected coordinates from the first frame.The
rmsfit
more is functionally equivalent to RMS-fitting the coordinates prior togrid
, but allows this without having to modify the coordinates. The speed of gridding has also been increased by almost 50% in my limited tests.For example, the following will auto-image the trajectory, then create a grid of water density (selected by
:WAT@O
) that follows and rotates with the atoms selected by:TCS
:Also added a keyword to the
vector
command calledgridset
, which allows calculation of "box" vectors from grid data sets instead of the Frame box. This allows one to visualize the grid as it's being moved/rotated.For example: