Skip to content

Commit 9d0b5eb

Browse files
authored
Merge pull request #672 from drroe/xtalsymm
Add the 'xtalsymm' action
2 parents f6465ac + 44892f7 commit 9d0b5eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+66932
-65
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CPPTRAJ see the following publication:
4545
Disclaimer and Copyright
4646
========================
4747

48-
CPPTRAJ is Copyright (c) 2010-2018 Daniel R. Roe.
48+
CPPTRAJ is Copyright (c) 2010-2019 Daniel R. Roe.
4949
The terms for using, copying, modifying, and distributing CPPTRAJ are
5050
specified in the file LICENSE.
5151

@@ -165,6 +165,9 @@ Code for the reciprocal part of the particle mesh Ewald calculation.
165165
* Christina Bergonzo (National Institute of Standards and Technology, Gaithersburg, MD)
166166
Fixes and improvements to nucleic acid dihedral angle definitions (DihedralSearch).
167167

168+
* David S. Cerutti (Rutgers University, Piscataway, NJ, USA)
169+
Original code for the 'xtalsymm' Action.
170+
168171
#### Various Contributions
169172
* David A. Case (Rutgers University, Piscataway, NJ, USA)
170173
* Hai Nguyen (Rutgers University, Piscataway, NJ, USA)

configure

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ USE_CPPTRAJDEBUG=0 # Enable internal cpptraj debug flags
130130
CLEAN='yes' # yes = clean after configure, no = do not
131131
PERFORM_CHECKS='yes' # yes = Check compilers/libraries, no = do not
132132

133-
AR_CMD='ar cqs' # Archive command for creating static libraries.
134-
RM_CMD='/bin/rm -f' # Command for removing files.
135-
136133
# Flags for large file support
137134
LFS='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
138135

@@ -1903,43 +1900,22 @@ fi
19031900
# CUDA
19041901
if [ $USE_CUDA -eq 1 ] ; then
19051902
CUDA_TARGET='cuda_kernels/libcpptraj_cuda.a'
1906-
cat > src/cuda_kernels/cuda.config.h <<EOF
1907-
AR = $AR_CMD
1908-
DEL_FILE = $RM_CMD
1909-
EOF
1910-
BuildRules src/cuda_kernels/cuda.config.h nvcc
19111903
fi
19121904
# Readline
19131905
if [ "${LIB_STAT[$LREADLINE]}" = 'bundled' ] ; then
19141906
READLINE_TARGET=${LIB_FLAG[$LREADLINE]}
1915-
cat > src/readline/readline.config.h <<EOF
1916-
DIRECTIVES = -DHAVE_CONFIG_H
1917-
INCLUDE = -I.
1918-
AR = $AR_CMD
1919-
DEL_FILE = $RM_CMD
1920-
EOF
1921-
BuildRules src/readline/readline.config.h cc
19221907
else
19231908
READLINE_TARGET='noreadline'
19241909
fi
19251910
# Xdrfile
19261911
if [ "${LIB_STAT[$LXDRFILE]}" = 'bundled' ] ; then
19271912
XDRFILE_TARGET=${LIB_FLAG[$LXDRFILE]}
1928-
cat > src/xdrfile/xdrfile.config.h <<EOF
1929-
AR = $AR_CMD
1930-
DEL_FILE = $RM_CMD
1931-
EOF
1932-
BuildRules src/xdrfile/xdrfile.config.h cc
19331913
else
19341914
XDRFILE_TARGET='noxdrfile'
19351915
fi
19361916
# Arpack
19371917
if [ "${LIB_STAT[$LARPACK]}" = 'bundled' ] ; then
19381918
ARPACK_TARGET=${LIB_FLAG[$LARPACK]}
1939-
cat > src/arpack/arpack.config.h <<EOF
1940-
DEL_FILE = $RM_CMD
1941-
EOF
1942-
BuildRules src/arpack/arpack.config.h f77
19431919
else
19441920
ARPACK_TARGET='noarpack'
19451921
fi
@@ -1971,8 +1947,6 @@ if [ ! -z "$DBGFLAGS" ] ; then
19711947
echo "DBGFLAGS=$DBGFLAGS" >> config.h
19721948
fi
19731949
cat >> config.h <<EOF
1974-
DEL_FILE = $RM_CMD
1975-
19761950
SHARED_SUFFIX=$SHARED_SUFFIX
19771951
DIRECTIVES=$DIRECTIVES
19781952
INCLUDE=$INCLUDE
@@ -2002,6 +1976,14 @@ EOF
20021976
# BuildRules config.h cc cxx
20031977
#fi
20041978

1979+
# ----- Create config for external libraries -----
1980+
external_config='external.config.h'
1981+
cat > $external_config <<EOF
1982+
# CPPTRAJ config for external libraries.
1983+
# configured using: $CONFIGURECMD
1984+
EOF
1985+
BuildRules $external_config nvcc cc f77
1986+
20051987
# ----- Create directories if necessary ----------
20061988
if [ ! -e "$CPPTRAJBIN" ] ; then
20071989
mkdir "$CPPTRAJBIN"

doc/cpptraj.lyx

Lines changed: 163 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ Cpptraj
117117
has a wide range of functionality, and makes use of OpenMP/MPI to speed
118118
up many calculations, including processing ensembles of trajectories and/or
119119
conducting multiple analyses in parallel with MPI.
120-
121120
\begin_inset CommandInset citation
122121
LatexCommand citep
123122
key "Roe2018"
124123
literal "true"
125124

126125
\end_inset
127126

127+
128128
\end_layout
129129

130130
\begin_layout Standard
@@ -13580,7 +13580,7 @@ Mod
1358013580
\begin_layout Standard
1358113581
\align center
1358213582
\begin_inset Tabular
13583-
<lyxtabular version="3" rows="82" columns="3">
13583+
<lyxtabular version="3" rows="83" columns="3">
1358413584
<features islongtable="true" longtabularalignment="center">
1358513585
<column alignment="center" valignment="top" width="1.3in">
1358613586
<column alignment="center" valignment="top" width="4.5in">
@@ -16021,7 +16021,7 @@ Calculate unit cell volume.
1602116021
</cell>
1602216022
</row>
1602316023
<row>
16024-
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
16024+
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1602516025
\begin_inset Text
1602616026

1602716027
\begin_layout Plain Layout
@@ -16030,7 +16030,7 @@ watershell
1603016030

1603116031
\end_inset
1603216032
</cell>
16033-
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
16033+
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1603416034
\begin_inset Text
1603516035

1603616036
\begin_layout Plain Layout
@@ -16040,13 +16040,43 @@ Calculate the number of waters in the first and second solvation shells
1604016040

1604116041
\end_inset
1604216042
</cell>
16043-
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
16043+
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1604416044
\begin_inset Text
1604516045

1604616046
\begin_layout Plain Layout
1604716047

1604816048
\end_layout
1604916049

16050+
\end_inset
16051+
</cell>
16052+
</row>
16053+
<row>
16054+
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
16055+
\begin_inset Text
16056+
16057+
\begin_layout Plain Layout
16058+
xtalsymm
16059+
\end_layout
16060+
16061+
\end_inset
16062+
</cell>
16063+
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
16064+
\begin_inset Text
16065+
16066+
\begin_layout Plain Layout
16067+
Superimpose symmetry-related parts of a system using crystallographic symmetry
16068+
operations.
16069+
\end_layout
16070+
16071+
\end_inset
16072+
</cell>
16073+
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
16074+
\begin_inset Text
16075+
16076+
\begin_layout Plain Layout
16077+
X
16078+
\end_layout
16079+
1605016080
\end_inset
1605116081
</cell>
1605216082
</row>
@@ -31502,6 +31532,134 @@ closest
3150231532
As of version 17 this command is CUDA-enabled in CUDA versions of CPPTRAJ.
3150331533
\end_layout
3150431534

31535+
\begin_layout Subsection
31536+
xtalsymm
31537+
\end_layout
31538+
31539+
\begin_layout LyX-Code
31540+
xtalsymm <mask> group <space group> [collect [centroid]]
31541+
\end_layout
31542+
31543+
\begin_layout LyX-Code
31544+
[ first | reference | ref <name> | refindex <#> ]
31545+
\end_layout
31546+
31547+
\begin_layout LyX-Code
31548+
[na <na>] [nb <nb>] [nc <nc>]
31549+
\end_layout
31550+
31551+
\begin_deeper
31552+
\begin_layout Description
31553+
<mask> Select atoms to perform symmetry operations on.
31554+
\end_layout
31555+
31556+
\begin_layout Description
31557+
group
31558+
\begin_inset space ~
31559+
\end_inset
31560+
31561+
<space
31562+
\begin_inset space ~
31563+
\end_inset
31564+
31565+
group> Symmetry space group (e.g.
31566+
31567+
\begin_inset Quotes eld
31568+
\end_inset
31569+
31570+
P1
31571+
\begin_inset Quotes erd
31572+
\end_inset
31573+
31574+
,
31575+
\begin_inset Quotes eld
31576+
\end_inset
31577+
31578+
P121
31579+
\begin_inset Quotes erd
31580+
\end_inset
31581+
31582+
, etc.)
31583+
\end_layout
31584+
31585+
\begin_layout Description
31586+
[collect] If specified, reimage solvent molecules by atom.
31587+
\end_layout
31588+
31589+
\begin_deeper
31590+
\begin_layout Description
31591+
[centroid] If specified along with collect, reimage solvent molecules by
31592+
molecule.
31593+
\end_layout
31594+
31595+
\end_deeper
31596+
\begin_layout Description
31597+
[first
31598+
\begin_inset space ~
31599+
\end_inset
31600+
31601+
|
31602+
\begin_inset space ~
31603+
\end_inset
31604+
31605+
reference
31606+
\begin_inset space ~
31607+
\end_inset
31608+
31609+
|
31610+
\begin_inset space ~
31611+
\end_inset
31612+
31613+
ref
31614+
\begin_inset space ~
31615+
\end_inset
31616+
31617+
<name>
31618+
\begin_inset space ~
31619+
\end_inset
31620+
31621+
|
31622+
\begin_inset space ~
31623+
\end_inset
31624+
31625+
refindex
31626+
\begin_inset space ~
31627+
\end_inset
31628+
31629+
<#>] Reference structure to use for determining crystal symmetry.
31630+
\end_layout
31631+
31632+
\begin_layout Description
31633+
[na
31634+
\begin_inset space ~
31635+
\end_inset
31636+
31637+
<na>] Number of replicas along the A vector (default 1).
31638+
\end_layout
31639+
31640+
\begin_layout Description
31641+
[nb
31642+
\begin_inset space ~
31643+
\end_inset
31644+
31645+
<nb>] Number of replicas along the B vector (default 1).
31646+
\end_layout
31647+
31648+
\begin_layout Description
31649+
[nc
31650+
\begin_inset space ~
31651+
\end_inset
31652+
31653+
<nc>] Number of replicas along the C vector (default 1).
31654+
\end_layout
31655+
31656+
\end_deeper
31657+
\begin_layout Standard
31658+
Calculate the optimal approach for superimposing symmetry-related subunits
31659+
of the simulation back onto one another.
31660+
This modifies the coordinate state for all future actions.
31661+
\end_layout
31662+
3150531663
\begin_layout Section
3150631664
Analysis Commands
3150731665
\end_layout

src/Action_ClusterDihedral.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Action::RetType Action_ClusterDihedral::Init(ArgList& actionArgs, ActionInit& in
6262
{
6363
# ifdef MPI
6464
if (init.TrajComm().Size() > 1) {
65-
mprinterr("Error: 'clusterdihedral' not supported with > 1 thread (%i threads currently)\n",
65+
mprinterr("Error: 'clusterdihedral' not supported with > 1 process (%i processes currently)\n",
6666
init.TrajComm().Size());
6767
return Action::ERR;
6868
}

src/Action_Contacts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Action::RetType Action_Contacts::Init(ArgList& actionArgs, ActionInit& init, int
5454
# ifdef MPI
5555
// Since output is to CpptrajFiles, not practical in parallel.
5656
if (init.TrajComm().Size() > 1) {
57-
mprinterr("Error: 'contacts' action does not work with > 1 thread (%i threads currently).\n"
57+
mprinterr("Error: 'contacts' action does not work with > 1 process (%i processes currently).\n"
5858
"Error: Consider using 'nativecontacts' instead.\n", init.TrajComm().Size());
5959
return Action::ERR;
6060
}

src/Action_CreateCrd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ Action::RetType Action_CreateCrd::Init(ArgList& actionArgs, ActionInit& init, in
5757
mprintf("\tNot strictly enforcing that all frames have same # atoms.\n");
5858
# ifdef MPI
5959
if (init.TrajComm().Size() > 1)
60-
mprintf("Warning: Synchronization of COORDS data sets over multiple threads is\n"
60+
mprintf("Warning: Synchronization of COORDS data sets over multiple processes is\n"
6161
"Warning: experimental and may be slower than reading in via a single\n"
62-
"Warning: thread. Users are encouraged to run benchmarks before\n"
62+
"Warning: process. Users are encouraged to run benchmarks before\n"
6363
"Warning: extensive usage.\n");
6464
# endif
6565
return Action::OK;

src/Action_CreateReservoir.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Action::RetType Action_CreateReservoir::Init(ArgList& actionArgs, ActionInit& in
3535
# endif
3636
# ifdef MPI
3737
if (init.TrajComm().Size() > 1) {
38-
mprinterr("Error: 'createreservoir' action does not work with > 1 thread (%i threads currently).\n", init.TrajComm().Size());
38+
mprinterr("Error: 'createreservoir' action does not work with > 1 process (%i processes currently).\n", init.TrajComm().Size());
3939
return Action::ERR;
4040
}
4141
# endif

src/Action_Density.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ Action::RetType Action_Density::Init(ArgList& actionArgs, ActionInit& init, int
107107
} else {
108108
# ifdef MPI
109109
if (init.TrajComm().Size() > 1) {
110-
mprinterr("Error: 'density' with masks does not work with > 1 thread"
111-
" (%i threads currently).\n", init.TrajComm().Size());
110+
mprinterr("Error: 'density' with masks does not work with > 1 process"
111+
" (%i processes currently).\n", init.TrajComm().Size());
112112
return Action::ERR;
113113
}
114114
# endif

src/Action_FilterByData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Action::RetType Action_FilterByData::Init(ArgList& actionArgs, ActionInit& init,
9696
# ifdef MPI
9797
if (!multi_ && init.TrajComm().Size() > 1)
9898
mprintf("Warning: Trajectories written after 'filter' may have issues if\n"
99-
"Warning: the number of threads writing is > 1 (currently %i threads)\n",
99+
"Warning: the number of processes writing is > 1 (currently %i processes)\n",
100100
init.TrajComm().Size());
101101
# endif
102102
return Action::OK;

src/Action_GIST.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Action::RetType Action_GIST::Init(ArgList& actionArgs, ActionInit& init, int deb
5858
{
5959
# ifdef MPI
6060
if (init.TrajComm().Size() > 1) {
61-
mprinterr("Error: 'gist' action does not work with > 1 thread (%i threads currently).\n",
61+
mprinterr("Error: 'gist' action does not work with > 1 process (%i processes currently).\n",
6262
init.TrajComm().Size());
6363
return Action::ERR;
6464
}

0 commit comments

Comments
 (0)