Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
2111b4b
Use BoxArgs class
drroe Nov 29, 2020
303e497
Use new Param function
drroe Nov 30, 2020
d0c12b7
Move old code determining box from beta only to Parm_Amber, only plac…
drroe Nov 30, 2020
0d388b9
Add back some const pointer functions. Add Assign routine
drroe Nov 30, 2020
5e16105
Use new function
drroe Nov 30, 2020
498f66f
Use new routines. May want to check if box is normal at some point
drroe Nov 30, 2020
6bf6ea2
Use new routines
drroe Nov 30, 2020
7cbf16a
Use new routines. May want to remove boxAngle_ at some point
drroe Nov 30, 2020
ae40aab
Add IsNormal() and IsOrthoNormal()
drroe Dec 1, 2020
e8fae3d
Add xyz abg to shape routine to box
drroe Dec 1, 2020
7e3ec1c
Routine to set shape matrix from xyz abg params
drroe Dec 1, 2020
60b1584
Update for changes in Box class
drroe Dec 1, 2020
6b8ad20
Rearrange code, use fabs where needed.
drroe Dec 1, 2020
9ab13a6
Change to if/else block
drroe Dec 1, 2020
16d8525
Actually set angles
drroe Dec 1, 2020
99e9e7a
Use HasBox instead of Type and NOBOX
drroe Dec 1, 2020
c5998a1
More using HasBox
drroe Dec 1, 2020
5b5b5fd
Use HasBox
drroe Dec 1, 2020
76339be
More use of HasBox
drroe Dec 1, 2020
e67f6b9
More HasBox
drroe Dec 1, 2020
f367381
Use HasBox
drroe Dec 1, 2020
24cb163
Add symmetric matrix assign routine; not used yet.
drroe Dec 1, 2020
35d9617
Fix sync for DatASet_Coords_CRD
drroe Dec 1, 2020
45857c9
Add send and receive
drroe Dec 1, 2020
f9d007a
Add send and recieve for Box
drroe Dec 1, 2020
a569b8a
Use new box MPI routines, update Send/Recv codes
drroe Dec 1, 2020
9783580
Merge branch 'master' into fixshapematrix
drroe Dec 7, 2020
6273f03
Merge branch 'fixshapematrix' into fixshapematrix-rewritebox
drroe Dec 7, 2020
ea64cce
Merge branch 'master' into fixshapematrix
drroe Dec 15, 2020
29cbd11
Merge branch 'fixshapematrix' into fixshapematrix-rewritebox
drroe Dec 15, 2020
79df0d5
Amber formats use new routines
drroe Dec 16, 2020
ed91620
Add setup that accepts individual params instead of an array
drroe Dec 16, 2020
2c17b29
Make assign routine that accepts parameters
drroe Dec 16, 2020
2a97bb7
Add AssignFromUcell
drroe Dec 17, 2020
ca66634
Update more routines for new box
drroe Dec 17, 2020
5ab4e9c
Finish converting gmx routines to new box
drroe Dec 17, 2020
4595f65
Have ReadNextTinkerFrame use Frame. Use forward declares.
drroe Dec 17, 2020
e149716
Use new box routines
drroe Dec 17, 2020
fb0b792
Merge branch 'master' into fixshapematrix
drroe Dec 17, 2020
f610cf3
Merge branch 'fixshapematrix' into fixshapematrix-rewritebox
drroe Dec 17, 2020
5513419
Finish up conversion to new box
drroe Dec 17, 2020
cfe1df5
Fix pnetcdf install
drroe Dec 17, 2020
853a4dd
Add assignment and copy constructor
drroe Dec 18, 2020
bf8fd9f
Should check componentIdx_. not components_
drroe Dec 18, 2020
5558e73
Fix array indexing in GetToMaskDblPtr
drroe Dec 18, 2020
3781218
Fix pointer math error
drroe Dec 18, 2020
503838b
Fix uninitialized variable.
drroe Dec 18, 2020
00cd3fd
Add a debug message
drroe Dec 18, 2020
6802553
Do not overwrite truncated oct angle from amber topology with higher …
drroe Dec 18, 2020
0ef6369
Fix behavior of the truncoct keyword
drroe Dec 18, 2020
1c1367d
Get rid of ucell constructor to avoid unexpected behavior
drroe Dec 19, 2020
c771d0c
Get rid of the ambiguous Box constructor.
drroe Dec 19, 2020
5ab8ed6
Add operator to multiply by scalar
drroe Dec 20, 2020
3be4e4b
Make in-place version return ref to this object
drroe Dec 20, 2020
d9a1523
Add some debug info
drroe Dec 20, 2020
4a8a132
Rework how box info is handled by readFrame
drroe Dec 20, 2020
daf1db2
Remove extra step
drroe Dec 20, 2020
d061b95
Set unset args from other args
drroe Dec 20, 2020
cbaafea
Add debug
drroe Dec 21, 2020
d1e4a30
Merge branch 'fixshapematrix-rewritebox' of github.com:drroe/cpptraj …
drroe Dec 21, 2020
906f421
Check result of SetMissingInfo
drroe Dec 21, 2020
3a155ae
Add more debug info
drroe Dec 21, 2020
9f579cb
Add test for extended metadata in COORDS sets
drroe Dec 21, 2020
83ed035
Fix debug info
drroe Dec 21, 2020
463809a
Make any zero lengths/angles an error message
drroe Dec 21, 2020
4bde726
Make SetBoxType() const, have it return box type
drroe Dec 21, 2020
4f49260
Have SetupFromX routines return 1 if box was somehow invalid, 0 other…
drroe Dec 22, 2020
3597b93
Disable netcdf box if cell variables appear empty
drroe Dec 22, 2020
892fa6d
Do not try to read CRYST1 info in readFrame if it previously seemed i…
drroe Dec 22, 2020
7afc570
Turns out you can preserve unit cell info better as XYZ ABG than unit…
drroe Dec 22, 2020
b4b4728
Add some more checks for debugging
drroe Dec 22, 2020
c11b48a
Add check of netcdf time variable: if first 2 values are zero this is…
drroe Dec 22, 2020
ab1ede0
Use Assign instead of Setup
drroe Dec 23, 2020
360f749
Ensure actual file names are printed for NcTest() (instead of the tem…
drroe Dec 23, 2020
4a694da
Empty 'time' variable no longer being printed.
drroe Dec 23, 2020
f7609f9
Since no longer reading in "bad" time variables from NetCDF, use 'tim…
drroe Dec 23, 2020
8913735
No longer writing empty time variables
drroe Dec 23, 2020
9b50635
Remove old code
drroe Dec 23, 2020
92188ea
Add a check that Frame box has been set up. Should not be necessary e…
drroe Dec 23, 2020
02db902
rank_frames is invalid on non-master ranks
drroe Dec 24, 2020
04f09b5
Output size to debug
drroe Dec 26, 2020
f23b1f8
Make test output name unique
drroe Dec 26, 2020
c36c6db
More debug info
drroe Dec 26, 2020
ffdf91d
Hide some debug info
drroe Dec 28, 2020
06ca67c
Hide unused function. Hide some debug info.
drroe Dec 28, 2020
6960862
Add ortho and nonortho imaged distance tests
drroe Dec 28, 2020
8ac4831
Remove ToRecip call
drroe Dec 28, 2020
85003ff
Remove ToRecip call
drroe Dec 28, 2020
4ce89c3
Remove ToRecip
drroe Dec 28, 2020
561b6cd
Have cuda code use new box functions
drroe Dec 29, 2020
c3dc0f7
Use AbgPtr instead of XyzPtr+3
drroe Dec 29, 2020
6834ed7
Print fractional cell for debug
drroe Dec 29, 2020
bfb00ab
Remove ToRecip calls
drroe Dec 29, 2020
ba36f6e
Remove ToRecip call
drroe Dec 29, 2020
bed8aa1
Use AbgPtr instead of XyzPtr+3
drroe Dec 29, 2020
584c77d
Use AbgPtr instead of XyzPtr+3
drroe Dec 29, 2020
c884d5a
Get rid of intermediate var
drroe Dec 29, 2020
7344870
Remove old code
drroe Dec 29, 2020
f4c6ba0
Remove ToRecip call
drroe Dec 29, 2020
1c6c2ff
Remove ToRecip call
drroe Dec 29, 2020
e27c9b1
Remove ToRecip call
drroe Dec 29, 2020
9e509b3
Use UnitCell and FracCell
drroe Dec 29, 2020
dbd75e9
Remove ToRecip call
drroe Dec 29, 2020
a1d74b1
Remove ToRecip call
drroe Dec 29, 2020
aa2650a
Remove ToRecip call
drroe Dec 29, 2020
d8e9a80
Remove ucell and recip from class, no more ToRecip
drroe Dec 29, 2020
4f4568a
Merge branch 'master' into fixshapematrix
drroe Dec 30, 2020
6ae5657
Merge branch 'fixshapematrix' into fixshapematrix-rewritebox
drroe Dec 30, 2020
5da92bb
Remove ToRecip call
drroe Dec 31, 2020
ea9c55c
Add radial test with volume keyword
drroe Dec 31, 2020
7556983
Remove ToRecip calls
drroe Dec 31, 2020
d6db466
Remove ToRecip
drroe Dec 31, 2020
4171cc1
Remove ToRecip call
drroe Dec 31, 2020
eab14be
Remove ToRecip
drroe Dec 31, 2020
b83f21b
Remove ToRecip
drroe Dec 31, 2020
e72b949
Remove ToRecip
drroe Dec 31, 2020
42d36f4
Remove ToRecip calls
drroe Dec 31, 2020
d9e6632
Remove ToRecip calls.
drroe Dec 31, 2020
ecccabb
Add more documentation for UnitCell() and FracCell(); specifically ho…
drroe Dec 31, 2020
0bfd7fe
Add correct way to determine box center, but do not enable yet since …
drroe Dec 31, 2020
d9e7f33
Remove ToRecip call
drroe Dec 31, 2020
71ddb81
Remove ToRecip
drroe Dec 31, 2020
f8c37ab
Remove ToRecip calls
drroe Dec 31, 2020
4af4f1b
Remove ToRecip
drroe Dec 31, 2020
ab4f5e3
Have RecipLengths() use the fractional cell in box. Eventually want t…
drroe Dec 31, 2020
15ba54d
Remove ToRecip call
drroe Dec 31, 2020
495f200
Remove ToRecip call
drroe Dec 31, 2020
0795702
Get rid of ToRecip
drroe Dec 31, 2020
3bd6cbe
Use AssignFromShapeMatrix
drroe Jan 3, 2021
5ca00d1
Change function names to better describe what they do.
drroe Jan 4, 2021
ec24aef
Use Is_X_Aligned_Ortho() to determine imaging on a per-frame basis.
drroe Jan 4, 2021
3f3dd6e
Improve code docs for DistRoutines and add a new routine that does im…
drroe Jan 4, 2021
d24cd71
Have NoBox() depend on there being an X (A) length. When SetupX() rou…
drroe Jan 4, 2021
799a324
Create new class ImageOption that does not depend on cell type since …
drroe Jan 4, 2021
2c7524e
Have option to have no imaging.
drroe Jan 4, 2021
3bbed25
Add function that does the sqrt calc for distance
drroe Jan 4, 2021
870e118
Have StructureCheck use new imaging methods
drroe Jan 4, 2021
6a25c61
Remove unused function definition
drroe Jan 4, 2021
4d4b500
Compare to 0 is too strict; compare to Constants::SMALL instead
drroe Jan 4, 2021
a2dd7b9
Use ImageOption for GIST. Need to make sure nonortho code is function…
drroe Jan 4, 2021
b895bc0
Add debug option for using regular nonortho distance routine
drroe Jan 4, 2021
d737ba9
Add nonortho option to force non-orthogonal code for debugging. Switc…
drroe Jan 5, 2021
2c66f37
Add GIST non-orthogonal cell test
drroe Jan 5, 2021
ca4cc15
Add note that NonbondEnergy() modifies on grid coords
drroe Jan 5, 2021
84f94ee
Timer already called inside CUDA nonbond routine
drroe Jan 5, 2021
bb66f05
Increase the relative error for the nonorthogonal gist test when usin…
drroe Jan 5, 2021
1335d3e
Add SetImageType functionality and option to force nonortho routines.
drroe Jan 5, 2021
45c26b2
Put imaging type into ImageOption
drroe Jan 5, 2021
32ead19
Intend that SetImageType() only be called when imaging enabled. This …
drroe Jan 5, 2021
8c94f8d
Update cuda closest code for new imaging
drroe Jan 5, 2021
23cbc60
Update watershell code
drroe Jan 5, 2021
45ac5a9
Fix dependencies
drroe Jan 5, 2021
38a660b
ImagedAction not needed for density
drroe Jan 5, 2021
4e34e4b
Use ImageOption
drroe Jan 5, 2021
46f7fa2
Use ImageOption
drroe Jan 5, 2021
35e86da
ImagedAction not needed
drroe Jan 5, 2021
a26e5c8
Use ImageOption
drroe Jan 5, 2021
d3c3bc7
Use ImageOption. Create new DIST2 routine that avoids having to call …
drroe Jan 5, 2021
0b3debb
Add version of DIST2 that takes ImageOption::Type
drroe Jan 6, 2021
d3df498
Use DIST2 that takes ImageOption::Type
drroe Jan 6, 2021
75c39d4
Add hbond test with orthogonal imaging
drroe Jan 6, 2021
d61d97e
Add a function for more in-depth debugging
drroe Jan 6, 2021
eb2446c
In CalcUcellFromXyzAbg try to detect orthogonal box via alpha/beta/ga…
drroe Jan 6, 2021
970922d
Add alignment info to debug output
drroe Jan 6, 2021
52d90c4
Add debug statement
drroe Jan 6, 2021
394ef75
Only use the ImageOption::Type versions of the distance routines.
drroe Jan 6, 2021
4e38b63
Add const double* version of ortho image
drroe Jan 6, 2021
3aa2885
Add double* version of non ortho image function
drroe Jan 6, 2021
487672f
Use ImageOption. Distances are now properly imaged in LIE action!
drroe Jan 6, 2021
fab7d9b
Image option not needed (always using general non-ortho imaging)
drroe Jan 6, 2021
0bed3c0
Add nativecontacts test with ortho imaging
drroe Jan 6, 2021
82baeb5
Use ImageOption for nativecontacts
drroe Jan 6, 2021
c686cf2
Use ImageOption
drroe Jan 7, 2021
247b07d
OrderParameter action never needed ImagedAction
drroe Jan 7, 2021
94b9fe7
Add ortho image test for pairdist
drroe Jan 7, 2021
581eb52
Add pairdist nonortho test
drroe Jan 7, 2021
7efd35e
Use ImageOption for pairdist
drroe Jan 7, 2021
b177754
Add orthogonal image test
drroe Jan 7, 2021
eff014f
Change ortho image test so hist max can reflect imaging differences a…
drroe Jan 7, 2021
36e38c0
Change test name
drroe Jan 7, 2021
bf60d43
Use ImageOption for radial
drroe Jan 7, 2021
97cac26
Have randomizeions use ImageOption
drroe Jan 7, 2021
6c0ad16
replicatecell does not need ImagedAction
drroe Jan 7, 2021
4a386d1
Remove debug info. Use const double* instead of vec
drroe Jan 7, 2021
ba9ad90
Use ImageOption for spam. Use const double* instead of Vec3
drroe Jan 7, 2021
6bc9a84
Use ImageOption for stfc diffusion
drroe Jan 7, 2021
e30bd3b
Remove deprecated ImagedAction and ImagingType
drroe Jan 7, 2021
75290f4
Do not use box type
drroe Jan 7, 2021
704d9f8
Dont use Box Type
drroe Jan 7, 2021
8d9a89b
Do not use Box Type
drroe Jan 7, 2021
001f09b
Choose imaging routines on a per frame basis
drroe Jan 7, 2021
4b46ac4
Add cell shape enum type. Add function to identify cell shape based o…
drroe Jan 8, 2021
cc6c2ed
Do not use box type. Image based on current cell.
drroe Jan 8, 2021
f9b4f4e
Use Is_X_Aligned_Ortho() in areapermol
drroe Jan 8, 2021
5896886
Use Is_X_Aligned_Ortho in channel
drroe Jan 8, 2021
dbb8e30
Choose routines on per-frame basis
drroe Jan 8, 2021
6895a81
Add NO_SHAPE
drroe Jan 8, 2021
f1aa413
Do not use Box::Type
drroe Jan 8, 2021
cc8c820
Do not use box Type in volmap
drroe Jan 8, 2021
dfe9839
Do not pass in recip lengths separately to SetupPairList
drroe Jan 8, 2021
c78c015
No need to pass in RecipLengths separately
drroe Jan 8, 2021
bfc3698
Get rid of old box type completely; replace with CellShape
drroe Jan 8, 2021
7600468
Hide some debug info
drroe Jan 8, 2021
b779788
Use ModifyBox and Assign routine
drroe Jan 8, 2021
54df059
Improve some code docs. Hide some debug info
drroe Jan 8, 2021
8808987
Hide some debug info
drroe Jan 8, 2021
04790d3
Fix mpi build
drroe Jan 9, 2021
2041c56
save file should be first arg to DoTest
drroe Jan 10, 2021
370942b
Results updated for fixed handling of bins not present at the start; …
drroe Jan 11, 2021
84a10f9
Two big fixes. First, rework the histogram loop to avoid branching in…
drroe Jan 11, 2021
dab2cf4
Add pairdist test with two masks
drroe Jan 11, 2021
b210788
Actually run the two mask test
drroe Jan 11, 2021
a3bf917
Hide some debug info
drroe Jan 11, 2021
0cf4e8f
First attempt at rotating unit cell vectors
drroe Jan 11, 2021
4ebde04
Test that imaging after unit cell rotation works
drroe Jan 11, 2021
2a2c224
Hide debug info. Imaging after rms now works ok, remove warning.
drroe Jan 11, 2021
0f99d9d
Add trajectory that has coords (but not unit cell) rotated and coords…
drroe Jan 11, 2021
0adb7cd
x-align warning each writeFrame call
drroe Jan 11, 2021
ef5fd7c
Add routine to determine if matrix is symmetric
drroe Jan 12, 2021
6fc0521
Fix warning; should only occur if box is actually present.
drroe Jan 12, 2021
1edc101
For charmm trajectory, ensure unit cell matrix is symmetric if writin…
drroe Jan 12, 2021
d54998f
Warn about X-alignment for netcdf
drroe Jan 12, 2021
56bb8d8
X-align warnings for netcdf restart/ensemble
drroe Jan 12, 2021
821ec4d
X-align warning for pdb
drroe Jan 12, 2021
3e5e5be
Add X-align check for Amber restart
drroe Jan 13, 2021
400f558
Have align command rotate unit cell. Ensure it works
drroe Jan 13, 2021
0673fba
Rotate unit cell vectors after rms fit
drroe Jan 13, 2021
a70a3b7
No need to rotate unit cell vectors if no box info
drroe Jan 13, 2021
b3a4d42
Rotate unit cell when fitting symm rmsd calc
drroe Jan 13, 2021
83c580b
Rotation warning is misplaced here since the entire cell is not rotated
drroe Jan 13, 2021
037bff3
Also rotate cell in principle when rotation active
drroe Jan 13, 2021
cab9034
If all atoms selected in rotate action, rotate unit cell vectors as w…
drroe Jan 13, 2021
d34c515
CheckImageWarning no longer needed; warnings are printed by individua…
drroe Jan 13, 2021
6731266
Protect in parallel
drroe Jan 13, 2021
b2deab6
Add subsection about the X-aligned warning that can pop up when writi…
drroe Jan 14, 2021
be5d46f
In PME recip, if cell is not x-aligned check if symmetric
drroe Jan 14, 2021
04acb0a
Merge branch 'fixshapematrix-rewritebox' of github.com:drroe/cpptraj …
drroe Jan 14, 2021
f3a96ab
Major version bump for massive rewrite of Box class.
drroe Jan 14, 2021
8c5f297
Hide debug info
drroe Jan 15, 2021
20c1315
Print error message when write fails. Trap write errors for dcd.
drroe Jan 15, 2021
b39d0cf
Properly trap errors when writing gromacs trr
drroe Jan 15, 2021
93a8894
Trap 90 deg cell angles individually since not all of them will neces…
drroe Jan 15, 2021
dbe7d59
Add note about removing box info to avoid rotated ucell warnings if b…
drroe Jan 15, 2021
50cf9df
Instead of using GetSymmetricShapeMatrix (which could conceivably ret…
drroe Jan 15, 2021
fa87807
Add blurb to dev guide about using box when calculating imaged distance.
drroe Jan 15, 2021
80196df
Remove old CRD code
drroe Jan 15, 2021
24aca0e
Remove obsolete routine
drroe Jan 15, 2021
9f69f4e
Fix missing variable in mprintf
drroe Jan 15, 2021
aa80e5b
Remove unnecessary check for box in Frame. Add test of TRAJ set metad…
drroe Jan 19, 2021
226713c
Update year
drroe Jan 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_______________________________________________________________________

CPPTRAJ: 2019 - LICENSE AGREEMENT
CPPTRAJ: 2021 - LICENSE AGREEMENT
_______________________________________________________________________

cpptraj is free software; you can redistribute it and/or modify it
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CPPTRAJ see the following publication:
Disclaimer and Copyright
========================

CPPTRAJ is Copyright (c) 2010-2020 Daniel R. Roe.
CPPTRAJ is Copyright (c) 2010-2021 Daniel R. Roe.
The terms for using, copying, modifying, and distributing CPPTRAJ are
specified in the file LICENSE.

Expand Down
67 changes: 67 additions & 0 deletions doc/CpptrajDevelopmentGuide.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,73 @@ selectedTgt.SetCoordinates( Tgt2, mask );
rmsd = selectedTgt.RMSD_CenteredRef( selectedRef, ...
\end_layout

\begin_layout Subsection
Box
\end_layout

\begin_layout Standard
The Box class holds all unit cell information.
It has the unit cell vectors (stored in a Matrix_3x3 class in row-major
order), as well as the fractional cell matrix (for converting from Cartesian
to fractional coordinates), the box lengths and angles, and the unit cell
volume.
There are in general two ways to set up Box with unit cell information:
the SetupX routines (e.g.
SetupFromXyzAbg()) and AssignX routines (e.g.
AssignFromXyzAbg()).
The SetupX routines perform some extra checks and will return 1 if something
is wrong with the box.
The AssignX routines do not perform these checks and so should be used
where performance is needed (or the state of the box doesn't matter).
\end_layout

\begin_layout Standard
Both the SetupX and AssignX will set the unit and fractional cell matrices,
the box lengths and angles, and the cell volume each time they are called.
The ImageOption class can then be used to determine what kind of imaging
can be performed on the unit cell using the distance calculation routines
(DIST2(), DIST()) found in DistRoutines.h.
For example, this is how distances are calculated using ImageOption imageOpt_
in the distance action.
\end_layout

\begin_layout Standard
1.
In Init(), determine if imaging should be used if possible:
\end_layout

\begin_layout LyX-Code
imageOpt_.InitImaging( !(actionArgs.hasKey("noimage")) );
\end_layout

\begin_layout Standard
2.
In Setup(), determine if imaging will be possible based on if box info
is present:
\end_layout

\begin_layout LyX-Code
imageOpt_.SetupImaging( setup.CoordInfo().TrajBox().HasBox() );
\end_layout

\begin_layout Standard
3.
In DoAction(), determine what imaging to use and then calculate distance
using DIST() from DistRoutines.h:
\end_layout

\begin_layout LyX-Code
if (imageOpt_.ImagingEnabled())
\end_layout

\begin_layout LyX-Code
imageOpt_.SetImageType( frm.Frm().BoxCrd().Is_X_Aligned_Ortho() );
\end_layout

\begin_layout LyX-Code
double Dist = DIST(imageOpt_.ImagingType(), a1, a2_, frm.Frm().BoxCrd());
\end_layout

\begin_layout Section
Console and File Input/Output
\end_layout
Expand Down
106 changes: 106 additions & 0 deletions doc/cpptraj.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -15595,6 +15595,100 @@ trajout output.crd onlyframes 2,5-7
only frames 2, 5, 6, and 7 from input.crd will be written to output.crd.
\end_layout

\begin_layout Subsubsection*
Cell not X-aligned Warning
\end_layout

\begin_layout Standard
Certain Actions (e.g.

\series bold
\emph on
align
\series default
\emph default
,
\series bold
\emph on
rms
\series default
\emph default
,
\series bold
\emph on
principal
\series default
\emph default
, etc.) can rotate the unit cell vectors (i.e.
the box) if they are present.
Some trajectory formats do not support writing out box coordinates if the
unit cell is not
\begin_inset Quotes eld
\end_inset

X-aligned
\begin_inset Quotes erd
\end_inset

; in other words, if the unit cell
\begin_inset Quotes eld
\end_inset

A
\begin_inset Quotes erd
\end_inset

vector is not aligned with the coordinate X-axis and the
\begin_inset Quotes eld
\end_inset

B
\begin_inset Quotes erd
\end_inset

vector is not in the X-Y plane.
If this is the case, the following warnings may appear:
\end_layout

\begin_layout LyX-Code
Warning: Unit cell is not X-aligned.
Box cannot be properly stored as <format>.
\end_layout

\begin_layout LyX-Code
Warning: Set <#>; unit cell is not X-aligned.
Box cannot be properly stored as <format>.
\end_layout

\begin_layout Standard
This means that the frame will be written with the X-aligned unit cell instead
of the actual unit cell.
Imaging will not be possible with a trajectory written this way.
Currently the only trajectory formats that support writing non-X-aligned
cells are the Gromacs TRR and XTC formats.
\end_layout

\begin_layout Standard
If unit cell information is no longer needed, it can be removed (via e.g.
the
\series bold
\emph on
box
\series default
\emph default
action, the
\series bold
\emph on
strip
\series default
\emph default
action with the
\series bold
'nobox'
\series default
keyword, etc.) to prevent these warnings from triggering.
\end_layout

\begin_layout Subsubsection

\shape italic
Expand Down Expand Up @@ -16020,6 +16114,13 @@ veltraj Write velocity trajectory instead of coordinates.
\end_layout

\end_deeper
\begin_layout Standard
Note that by default CPPTRAJ will try to write the symmetric shape matrix
if box information is present.
If this is not possible, CPPTRAJ will fall back to writing unit cell parameters
(lengths and angles) as long as the cell is X-aligned.
\end_layout

\begin_layout Subsubsection

\emph on
Expand All @@ -16037,6 +16138,11 @@ dt Time step tp multiply set numbers by (default 1.0).
\end_layout

\end_deeper
\begin_layout Standard
Note: these formats can write rotated (i.e.
non-X-aligned) unit cells.
\end_layout

\begin_layout Subsubsection

\shape italic
Expand Down
10 changes: 0 additions & 10 deletions src/Action.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions src/Action.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,5 @@ class Action : public DispatchObject {
/// Process array of frames before start required by ranks > 0 (not called by master)
virtual int ParallelPreloadFrames(FArray const&) { return 0; } // TODO: pure virtual
# endif
protected:
/// Print a warning that imaging will not be possible if coordinates are being rotated.
static void CheckImageRotationWarning(ActionSetup const&, const char*);
};
#endif
4 changes: 1 addition & 3 deletions src/Action_Align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ Action::RetType Action_Align::Setup(ActionSetup& setup) {
if (REF_.SetupRef(setup.Top(), tgtMask_.Nselected()))
return Action::SKIP;

// Warn if PBC and rotating
Action::CheckImageRotationWarning(setup, "the alignment");

return Action::OK;
}

Expand All @@ -98,6 +95,7 @@ Action::RetType Action_Align::DoAction(int frameNum, ActionFrame& frm) {
tgtFrame_.SetCoordinates(frm.Frm(), tgtMask_);
tgtFrame_.RMSD_CenteredRef(REF_.SelectedRef(), rot_, tgtTrans_, useMass_);
frm.ModifyFrm().Trans_Rot_Trans(movMask_, tgtTrans_, rot_, REF_.RefTrans());
frm.ModifyFrm().ModifyBox().RotateUcell( rot_ );
REF_.PreviousRef( frm.Frm() );
return Action::MODIFY_COORDS;
}
12 changes: 6 additions & 6 deletions src/Action_AreaPerMol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ Action::RetType Action_AreaPerMol::Init(ArgList& actionArgs, ActionInit& init, i
*/
Action::RetType Action_AreaPerMol::Setup(ActionSetup& setup) {
// Needs box info
if (setup.CoordInfo().TrajBox().Type() == Box::NOBOX) {
if (!setup.CoordInfo().TrajBox().HasBox()) {
mprintf("Warning: No box information for '%s', cannot calculate area.\n",
setup.Top().c_str());
return Action::SKIP;
}
// Probably will not work for non-orthorhombic cells
if (setup.CoordInfo().TrajBox().Type() != Box::ORTHO)
mprintf("Warning: Box is not orthorhombic, calculated area may not be correct.\n");
if (!setup.CoordInfo().TrajBox().Is_X_Aligned_Ortho())
mprintf("Warning: Box is not X-aligned orthorhombic, calculated area may not be correct.\n");
// Determine how many molecules are selected
if (Mask1_.MaskStringSet()) {
if (setup.Top().SetupCharMask(Mask1_)) return Action::ERR;
Expand Down Expand Up @@ -93,11 +93,11 @@ Action::RetType Action_AreaPerMol::Setup(ActionSetup& setup) {
Action::RetType Action_AreaPerMol::DoAction(int frameNum, ActionFrame& frm) {
double area;
if (areaType_ == XY)
area = frm.Frm().BoxCrd().BoxX() * frm.Frm().BoxCrd().BoxY();
area = frm.Frm().BoxCrd().Param(Box::X) * frm.Frm().BoxCrd().Param(Box::Y);
else if (areaType_ == XZ)
area = frm.Frm().BoxCrd().BoxX() * frm.Frm().BoxCrd().BoxZ();
area = frm.Frm().BoxCrd().Param(Box::X) * frm.Frm().BoxCrd().Param(Box::Z);
else // if areaType_ == YZ
area = frm.Frm().BoxCrd().BoxY() * frm.Frm().BoxCrd().BoxZ();
area = frm.Frm().BoxCrd().Param(Box::Y) * frm.Frm().BoxCrd().Param(Box::Z);

area = area / Nmols_;

Expand Down
2 changes: 1 addition & 1 deletion src/Action_AtomMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ Action::RetType Action_AtomMap::Setup(ActionSetup& setup) {
}
if (rmsfit_) {
mprintf("\trmsfit specified, %i atoms.\n",rmsRefFrame_.Natom());
Action::CheckImageRotationWarning(setup, "the RMS-fit");
return Action::OK;
}
mprintf("\tMap for parm %s -> %s (%i atom).\n",TgtFrame_->Top().c_str(),
Expand All @@ -257,6 +256,7 @@ Action::RetType Action_AtomMap::DoAction(int frameNum, ActionFrame& frm) {
Vec3 Trans, refTrans;
double R = rmsTgtFrame_.RMSD(rmsRefFrame_, Rot, Trans, refTrans, false);
frm.ModifyFrm().Trans_Rot_Trans(Trans, Rot, refTrans);
frm.ModifyFrm().ModifyBox().RotateUcell( Rot );
if (rmsdata_!=0)
rmsdata_->Add(frameNum, &R);
} else {
Expand Down
Loading