Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ed7a323
save ustc and coordsave implement
momokchung Mar 21, 2024
6f0187e
print system dipole implementation
momokchung Mar 22, 2024
cf1503a
generate interface
momokchung Mar 22, 2024
e8b97d6
add coordsave to prtdyn
momokchung Mar 22, 2024
e84fa5c
implement SAVE-ONLY and SAVE-USYSEXC
momokchung Mar 23, 2024
4240757
onlysave initialize
momokchung Mar 23, 2024
08dba79
nodyn option
momokchung Mar 23, 2024
e81dbdc
save .dyn at the end of simulation if not saved during simulation
momokchung Mar 26, 2024
43f21dd
add interface
momokchung Mar 26, 2024
c402789
time dependent field
momokchung Mar 27, 2024
ea7b072
add external field interface
momokchung Mar 27, 2024
d3fe1f9
fix use_exfld bug in epolar openmp directive
momokchung Mar 28, 2024
d70fd58
print unique atom type dipole and velocity
momokchung Sep 25, 2024
7e00665
move msystem to kmpole
momokchung Sep 25, 2024
83a90df
separate compute center routine
momokchung Sep 26, 2024
93da866
mdsave extended format
momokchung Sep 26, 2024
5bba55f
include charge dipoles in SAVE-USYSTEM and add SAVE-UCHARGE keyword
momokchung Sep 11, 2025
7135a7b
update interface
momokchung Sep 11, 2025
a995e62
enforce MonteCarlo barostat for NPT + external field simulations
momokchung Sep 14, 2025
9524fa7
allow NPT + external field simulation if barostat is anisotropic
momokchung Sep 15, 2025
1ee7429
typo in dynamic.f
momokchung Sep 16, 2025
9132e1d
print external field
momokchung Sep 26, 2025
3345a33
add SAVE-UDIRECT, SAVE-DEFIELD, SAVE-TEFIELD keywords
momokchung Sep 28, 2025
aad9340
update interface
momokchung Sep 28, 2025
35246e0
remove unnecessary loop in induce.f
momokchung Sep 29, 2025
05b89f9
call bounds in exfield to maintain PBC
momokchung Mar 5, 2026
236c08c
call bounds in exfield to maintain PBC
momokchung Mar 5, 2026
decfc39
Unify prt routines
momokchung Mar 6, 2026
886d166
Merge remote-tracking branch 'origin/dev' into NIST
momokchung Mar 7, 2026
6138902
small changes after merging
momokchung Mar 7, 2026
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
25 changes: 12 additions & 13 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,18 @@ set(_FILES
orbital orbits orient orthog output overlap params paths pbstuf pdb
phipsi picalc piorbs pistuf pitors pme pmestuf pmpb polar polgrp
polopt polpcg polpot poltcg polymer potent potfit predict pressure
prmkey promo prtarc prtcif prtdyn prterr prtfrc prtint prtmol2 prtpdb
prtprm prtseq prtuind prtvel prtxyz ptable qmstuf qrsolve quatfit
random rattle readcart readcif readdcd readdyn readgau readgdma
readint readmbis readmol readmol2 readpdb readprm readseq readxyz
refer repel replica reppot resdue respa restrn rgddyn rgdstep richmond
rigid ring rings rmsfit rotbnd rotlist rotpole rxnfld rxnpot scales
sdstep search sequen server setprm settle shake shapes shunt sigmoid
simplex sizes sktstuf socket solpot solute sort square stodyn strbnd
strtor suffix surface surfatom switch syntrn tarray tcgstuf temper
tettor tettors titles tncg torphase torpot torque tors torsions tortor
tree trimtext tritor tritors unionball unitcell units uprior urey
urypot usage valfit vdw vdwpot verlet version vibs virial volume warp
xtals xyzatm zatom zclose zcoord
prmkey promo prtarc prtcif prtdyn prterr prtint prtmol2 prtpdb prtprm
prtseq prtxyz ptable qmstuf qrsolve quatfit random rattle readcart
readcif readdcd readdyn readgau readgdma readint readmbis readmol
readmol2 readpdb readprm readseq readxyz refer repel replica reppot
resdue respa restrn rgddyn rgdstep richmond rigid ring rings rmsfit
rotbnd rotlist rotpole rxnfld rxnpot scales sdstep search sequen server
setprm settle shake shapes shunt sigmoid simplex sizes sktstuf socket
solpot solute sort square stodyn strbnd strtor suffix surface surfatom
switch syntrn tarray tcgstuf temper tettor tettors titles tncg
torphase torpot torque tors torsions tortor tree trimtext tritor tritors
unionball unitcell units uprior urey urypot usage valfit vdw vdwpot
verlet version vibs virial volume warp xtals xyzatm zatom zclose zcoord
)

set(_LIB "")
Expand Down
5 changes: 2 additions & 3 deletions interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ add_library (tinkerObjF OBJECT
../source/tortor.f
../source/tree.f
../source/tritor.f
../source/uatom.f
../source/units.f
../source/uprior.f
../source/urey.f
Expand Down Expand Up @@ -482,14 +483,11 @@ add_library (tinkerObjF OBJECT
../source/prtcif.f
../source/prtdyn.f
../source/prterr.f
../source/prtfrc.f
../source/prtint.f
../source/prtmol2.f
../source/prtpdb.f
../source/prtprm.f
../source/prtseq.f
../source/prtuind.f
../source/prtvel.f
../source/prtxyz.f
../source/qrsolve.f
../source/quatfit.f
Expand Down Expand Up @@ -542,6 +540,7 @@ add_library (tinkerObjF OBJECT
../source/trimtext.f
../source/tritors.f
../source/unionball.f
../source/uniquetyp.f
../source/unitcell.f
../source/verlet.f
../source/version.f
Expand Down
3 changes: 3 additions & 0 deletions interface/c/tinker/detail/boxes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ extern double TINKER_MOD(boxes, gamma_sin);
extern double TINKER_MOD(boxes, gamma_cos);
extern double TINKER_MOD(boxes, beta_term);
extern double TINKER_MOD(boxes, gamma_term);
extern double TINKER_MOD(boxes, xcenter);
extern double TINKER_MOD(boxes, ycenter);
extern double TINKER_MOD(boxes, zcenter);
extern double TINKER_MOD(boxes, lvec)[3][3];
extern double TINKER_MOD(boxes, recip)[3][3];
extern int TINKER_MOD(boxes, orthogonal);
Expand Down
3 changes: 3 additions & 0 deletions interface/c/tinker/detail/extfld.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
#ifdef __cplusplus
extern "C" {
#endif
extern double TINKER_MOD(extfld, exfreq);
extern double TINKER_MOD(extfld, exfld)[3];
extern double TINKER_MOD(extfld, texfld)[3];
extern int TINKER_MOD(extfld, use_exfld);
extern int TINKER_MOD(extfld, use_exfreq);
#ifdef __cplusplus
}
#endif
1 change: 1 addition & 0 deletions interface/c/tinker/detail/moment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern double TINKER_MOD(moment, yzqpl);
extern double TINKER_MOD(moment, zxqpl);
extern double TINKER_MOD(moment, zyqpl);
extern double TINKER_MOD(moment, zzqpl);
extern int* TINKER_MOD(moment, momuse);
#ifdef __cplusplus
}
#endif
14 changes: 14 additions & 0 deletions interface/c/tinker/detail/output.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,30 @@
#ifdef __cplusplus
extern "C" {
#endif
extern int TINKER_MOD(output, nonly);
extern int* TINKER_MOD(output, ionly);
extern int* TINKER_MOD(output, ionlyinv);
extern double* TINKER_MOD(output, print3n);
extern int TINKER_MOD(output, archive);
extern int TINKER_MOD(output, binary);
extern int TINKER_MOD(output, noversion);
extern int TINKER_MOD(output, overwrite);
extern int TINKER_MOD(output, coordsave);
extern int TINKER_MOD(output, dynsave);
extern int TINKER_MOD(output, cyclesave);
extern int TINKER_MOD(output, onlysave);
extern int TINKER_MOD(output, arcsave);
extern int TINKER_MOD(output, dcdsave);
extern int TINKER_MOD(output, velsave);
extern int TINKER_MOD(output, frcsave);
extern int TINKER_MOD(output, uindsave);
extern int TINKER_MOD(output, ustcsave);
extern int TINKER_MOD(output, uchgsave);
extern int TINKER_MOD(output, usyssave);
extern int TINKER_MOD(output, vsyssave);
extern int TINKER_MOD(output, udirsave);
extern int TINKER_MOD(output, defsave);
extern int TINKER_MOD(output, tefsave);
extern char TINKER_MOD(output, coordtype)[9];
#ifdef __cplusplus
}
Expand Down
17 changes: 17 additions & 0 deletions interface/c/tinker/detail/uatom.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "macro.hh"
#include "sizes.hh"

#ifdef __cplusplus
extern "C" {
#endif
extern int TINKER_MOD(uatom, nunique);
extern int TINKER_MOD(uatom, utype)[TINKER_MOD__maxtyp];
extern int TINKER_MOD(uatom, utypeinv)[TINKER_MOD__maxtyp];
extern double TINKER_MOD(uatom, utv1)[TINKER_MOD__maxtyp][3];
extern double TINKER_MOD(uatom, utv2)[TINKER_MOD__maxtyp][3];
extern double TINKER_MOD(uatom, utv3)[TINKER_MOD__maxtyp][3];
#ifdef __cplusplus
}
#endif
1 change: 1 addition & 0 deletions interface/c/tinker/modc.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
#include "detail/tortor.hh"
#include "detail/tree.hh"
#include "detail/tritor.hh"
#include "detail/uatom.hh"
#include "detail/units.hh"
#include "detail/uprior.hh"
#include "detail/urey.hh"
Expand Down
44 changes: 26 additions & 18 deletions interface/c/tinker/routines.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ void tinkerFortranRuntimeEnd();
// active.f
void active_();
#define tinker_f_active active_
void saveonly_();
#define tinker_f_saveonly saveonly_
void msystem_();
#define tinker_f_msystem msystem_

// alterchg.f
void alterchg_();
Expand Down Expand Up @@ -108,6 +112,8 @@ void calendar_(int* year, int* month, int* day, int* hour, int* minute, int* sec
// center.f
void center_(int* n1, double* x1, double* y1, double* z1, int* n2, double* x2, double* y2, double* z2, double* xmid, double* ymid, double* zmid);
#define tinker_f_center center_
void compcent_(double* xcm, double* ycm, double* zcm);
#define tinker_f_compcent compcent_

// chkpole.f
void chkpole_();
Expand Down Expand Up @@ -1970,6 +1976,8 @@ void moments_(char* mode, tinker_fchar_len_t mode_cap);
inline void tinker_f_moments(tinker_fchars mode) {
return moments_(mode.string, mode.capacity);
}
void dmoments_(double* xm, double* ym, double* zm, double* xustc, double* yustc, double* zustc, double* xuind, double* yuind, double* zuind, double* xuchg, double* yuchg, double* zuchg);
#define tinker_f_dmoments dmoments_

// mutate.f
void mutate_();
Expand Down Expand Up @@ -2247,12 +2255,6 @@ void prtdyn_();
void prterr_();
#define tinker_f_prterr prterr_

// prtfrc.f
void prtfrc_(int* ifrc);
#define tinker_f_prtfrc prtfrc_
void prtdcdf_(int* idcd, int* first);
#define tinker_f_prtdcdf prtdcdf_

// prtint.f
void prtint_(int* izmt);
#define tinker_f_prtint prtint_
Expand All @@ -2277,23 +2279,23 @@ void prtprm_(int* itxt);
void prtseq_(int* iseq);
#define tinker_f_prtseq prtseq_

// prtuind.f
void prtuind_(int* iind);
#define tinker_f_prtuind prtuind_
void prtdcdu_(int* idcd, int* first);
#define tinker_f_prtdcdu prtdcdu_

// prtvel.f
void prtvel_(int* ivel);
#define tinker_f_prtvel prtvel_
void prtdcdv_(int* idcd, int* first);
#define tinker_f_prtdcdv prtdcdv_

// prtxyz.f
void prtxyz_(int* ixyz);
#define tinker_f_prtxyz prtxyz_
void prtvec3_(int* iunit, char* mode, tinker_fchar_len_t mode_cap);
inline void tinker_f_prtvec3(int* iunit, tinker_fchars mode) {
return prtvec3_(iunit, mode.string, mode.capacity);
}
void copyvec3_(double* print3n, char* mode, tinker_fchar_len_t mode_cap);
inline void tinker_f_copyvec3(double* print3n, tinker_fchars mode) {
return copyvec3_(print3n, mode.string, mode.capacity);
}
void prtdcd_(int* idcd, int* first);
#define tinker_f_prtdcd prtdcd_
void prtdcdv3_(int* idcd, int* first, char* mode, tinker_fchar_len_t mode_cap);
inline void tinker_f_prtdcdv3(int* idcd, int* first, tinker_fchars mode) {
return prtdcdv3_(idcd, first, mode.string, mode.capacity);
}

// qrsolve.f
void qrfact_(int* n, int* m, double* a, int* pivot, int* ipvt, double* rdiag);
Expand Down Expand Up @@ -2913,6 +2915,12 @@ void addbogus_(double* bcoord, double* brad);
void tetra_volume_(double* r12sq, double* r13sq, double* r14sq, double* r23sq, double* r24sq, double* r34sq, double* vol);
#define tinker_f_tetra_volume tetra_volume_

// uniquetyp.f
void uniquetyp_();
#define tinker_f_uniquetyp uniquetyp_
void velunique_();
#define tinker_f_velunique velunique_

// unitcell.f
void unitcell_();
#define tinker_f_unitcell unitcell_
Expand Down
9 changes: 9 additions & 0 deletions interface/cpp/tinker/detail/boxes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ extern double& gamma_sin;
extern double& gamma_cos;
extern double& beta_term;
extern double& gamma_term;
extern double& xcenter;
extern double& ycenter;
extern double& zcenter;
extern double (&lvec)[3][3];
extern double (&recip)[3][3];
extern int& orthogonal;
Expand Down Expand Up @@ -53,6 +56,9 @@ extern "C" double TINKER_MOD(boxes, gamma_sin);
extern "C" double TINKER_MOD(boxes, gamma_cos);
extern "C" double TINKER_MOD(boxes, beta_term);
extern "C" double TINKER_MOD(boxes, gamma_term);
extern "C" double TINKER_MOD(boxes, xcenter);
extern "C" double TINKER_MOD(boxes, ycenter);
extern "C" double TINKER_MOD(boxes, zcenter);
extern "C" double TINKER_MOD(boxes, lvec)[3][3];
extern "C" double TINKER_MOD(boxes, recip)[3][3];
extern "C" int TINKER_MOD(boxes, orthogonal);
Expand Down Expand Up @@ -83,6 +89,9 @@ double& gamma_sin = TINKER_MOD(boxes, gamma_sin);
double& gamma_cos = TINKER_MOD(boxes, gamma_cos);
double& beta_term = TINKER_MOD(boxes, beta_term);
double& gamma_term = TINKER_MOD(boxes, gamma_term);
double& xcenter = TINKER_MOD(boxes, xcenter);
double& ycenter = TINKER_MOD(boxes, ycenter);
double& zcenter = TINKER_MOD(boxes, zcenter);
double (&lvec)[3][3] = TINKER_MOD(boxes, lvec);
double (&recip)[3][3] = TINKER_MOD(boxes, recip);
int& orthogonal = TINKER_MOD(boxes, orthogonal);
Expand Down
9 changes: 9 additions & 0 deletions interface/cpp/tinker/detail/extfld.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
#include "macro.hh"

namespace tinker { namespace extfld {
extern double& exfreq;
extern double (&exfld)[3];
extern double (&texfld)[3];
extern int& use_exfld;
extern int& use_exfreq;

#ifdef TINKER_FORTRAN_MODULE_CPP
extern "C" double TINKER_MOD(extfld, exfreq);
extern "C" double TINKER_MOD(extfld, exfld)[3];
extern "C" double TINKER_MOD(extfld, texfld)[3];
extern "C" int TINKER_MOD(extfld, use_exfld);
extern "C" int TINKER_MOD(extfld, use_exfreq);

double& exfreq = TINKER_MOD(extfld, exfreq);
double (&exfld)[3] = TINKER_MOD(extfld, exfld);
double (&texfld)[3] = TINKER_MOD(extfld, texfld);
int& use_exfld = TINKER_MOD(extfld, use_exfld);
int& use_exfreq = TINKER_MOD(extfld, use_exfreq);
#endif
} }
3 changes: 3 additions & 0 deletions interface/cpp/tinker/detail/moment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extern double& yzqpl;
extern double& zxqpl;
extern double& zyqpl;
extern double& zzqpl;
extern int*& momuse;

#ifdef TINKER_FORTRAN_MODULE_CPP
extern "C" double TINKER_MOD(moment, netchg);
Expand All @@ -35,6 +36,7 @@ extern "C" double TINKER_MOD(moment, yzqpl);
extern "C" double TINKER_MOD(moment, zxqpl);
extern "C" double TINKER_MOD(moment, zyqpl);
extern "C" double TINKER_MOD(moment, zzqpl);
extern "C" int* TINKER_MOD(moment, momuse);

double& netchg = TINKER_MOD(moment, netchg);
double& netdpl = TINKER_MOD(moment, netdpl);
Expand All @@ -51,5 +53,6 @@ double& yzqpl = TINKER_MOD(moment, yzqpl);
double& zxqpl = TINKER_MOD(moment, zxqpl);
double& zyqpl = TINKER_MOD(moment, zyqpl);
double& zzqpl = TINKER_MOD(moment, zzqpl);
int*& momuse = TINKER_MOD(moment, momuse);
#endif
} }
Loading