├── benchmark ├── bin │ └── .placeholder ├── KernelTesting │ └── bromobenzene.inpcrd └── Coordinates │ ├── Dipeptides │ ├── GLY_ff14SB.inpcrd │ ├── GLY_ff19SB.inpcrd │ ├── MET_ff14SB.inpcrd │ ├── MET_ff19SB.inpcrd │ ├── LYS_ff14SB.inpcrd │ ├── LYS_ff19SB.inpcrd │ ├── TRP_ff14SB.inpcrd │ └── TRP_ff19SB.inpcrd │ ├── Tetrapeptides │ ├── GLY_SER_MET_ff19SB.inpcrd │ ├── SER_ALA_HID_ff19SB.inpcrd │ ├── CYS_ASN_GLY_ff14SB.inpcrd │ ├── GLU_ASP_LEU_ff14SB.inpcrd │ ├── HID_CYS_PRO_ff14SB.inpcrd │ ├── SER_HIE_ILE_ff14SB.inpcrd │ ├── LYS_GLY_ASN_ff14SB.inpcrd │ ├── VAL_ASN_SER_ff19SB.inpcrd │ ├── GLN_PRO_HIE_ff19SB.inpcrd │ ├── HIE_THR_THR_ff19SB.inpcrd │ ├── ASP_PHE_GLN_ff19SB.inpcrd │ └── MET_VAL_CYS_ff19SB.inpcrd │ └── Tripeptides │ ├── VAL_GLY_ff19SB.inpcrd │ ├── PRO_ALA_ff14SB.inpcrd │ ├── ASP_PRO_ff14SB.inpcrd │ ├── GLY_ILE_ff14SB.inpcrd │ ├── GLN_GLU_ff19SB.inpcrd │ └── SER_LYS_ff19SB.inpcrd ├── test ├── Namelists │ ├── topol │ │ └── nothing.top │ └── coord │ │ ├── nothing.inpcrd │ │ ├── gly.inpcrd │ │ ├── ala.inpcrd │ │ ├── pro.inpcrd │ │ ├── gly_gly.inpcrd │ │ ├── gly_ala.inpcrd │ │ ├── phe.inpcrd │ │ ├── tyr.inpcrd │ │ ├── gly_pro.inpcrd │ │ ├── lys.inpcrd │ │ ├── arg.inpcrd │ │ ├── trp.inpcrd │ │ ├── gly_phe.inpcrd │ │ ├── gly_tyr.inpcrd │ │ ├── gly_lys.inpcrd │ │ ├── gly_arg.inpcrd │ │ └── gly_trp.inpcrd ├── FileManagement │ └── example │ │ ├── A │ │ ├── some_text.txt │ │ └── extra.txt │ │ ├── B │ │ └── some_text.txt │ │ ├── C │ │ ├── some_text.txt │ │ ├── subdir │ │ │ ├── some_data.dat │ │ │ ├── some_text.txt │ │ │ └── letter.txt │ │ └── letter.txt~ │ │ ├── D │ │ ├── some_text.txt │ │ └── extra.txt │ │ ├── Ee │ │ └── some_text.txt │ │ ├── F │ │ └── some_text.txt │ │ └── G_ext │ │ ├── some_text.txt │ │ └── extra.txt ├── Trajectory │ ├── chloride.inpcrd │ ├── sodium.inpcrd │ ├── nacl.inpcrd │ ├── bromobenzene_iso.inpcrd │ ├── bromobenzene.inpcrd │ ├── symmetry_C1.inpcrd │ ├── ala_dipeptide.inpcrd │ ├── symmetry_C2.inpcrd │ ├── symmetry_C3.inpcrd │ ├── bromobenzene_vs_iso.inpcrd │ ├── bromobenzene_vs.inpcrd │ ├── symmetry_L1.inpcrd │ ├── biotin.inpcrd │ ├── symmetry_L1_vs.inpcrd │ ├── symmetry_C4.inpcrd │ ├── med_1.inpcrd │ ├── symmetry_C5.inpcrd │ └── symmetry_C6.inpcrd ├── Reporting │ └── progressbar.output ├── Topology │ └── ala_charges.m ├── Parsing │ ├── remdynamics.txt │ ├── formatted_numbers.txt │ └── simpsons.txt ├── Chemistry │ ├── lig1_c8h8.inpcrd │ ├── lig2_c8h8.inpcrd │ ├── anthracene_like.inpcrd │ ├── morphine_like.inpcrd │ └── pyrene_like.inpcrd ├── Synthesis │ └── assemble_restraints.h └── MoleculeFormat │ └── sulfonamide.mol ├── CODEOWNERS ├── src ├── version.h.in ├── MoleculeFormat │ ├── mol2.pdf │ ├── ctfileformats2016.pdf │ └── tripos_format.h ├── Accelerator │ ├── syncwarp.cui │ ├── cuda_wrappers.tpp │ ├── cuda_wrappers.h │ ├── hpc_hybrid.h │ ├── hpc_hybrid_util.h │ └── card_utilities.h ├── Math │ ├── clustering.cpp │ ├── fft.cpp_wip │ ├── rounding.cui │ ├── fft.tpp_wip │ ├── sorting_enumerators.cpp │ ├── log_scale_spline.cpp │ ├── sorting_enumerators.h │ ├── statistical_enumerators.cpp │ ├── fft.h_wip │ └── matrix_formulas.cui ├── Potential │ ├── hpc_surface_area.cu │ ├── convolution_manager.tpp │ ├── cacheresource.tpp │ ├── energy_abstracts.tpp │ ├── hpc_map_density.h │ ├── scorecard.tpp │ ├── eval_synthesis.cpp │ └── nbemulator.cpp ├── Trajectory │ ├── checkpoint.tpp │ ├── hpc_coordinate_graft.cuh │ ├── coordinate_series.cpp │ ├── barostat.cpp │ ├── barostat.h │ ├── hpc_coordinate_graft.cu │ ├── write_annotated_frame.tpp │ ├── coordinate_swap_plan.cpp │ ├── coordinate_intake.h │ └── coordinateframe.tpp ├── DataTypes │ ├── casting_ops.cpp │ ├── mixed_types.h │ └── casting_ops.h ├── Constants │ └── generalized_born.tpp ├── Topology │ ├── atomgraph.cpp │ ├── atomgraph_constants.h │ ├── atomgraph_abstracts.cpp │ └── atomgraph_intake.h ├── Structure │ ├── structure_utils.h │ ├── structure_utils.cpp │ ├── mesh_foundation.tpp │ └── rmsd_plan.tpp ├── MolecularMechanics │ ├── small_molecule_batch.h │ └── hpc_kinetic.h ├── Namelists │ └── namelist_inventory.cpp ├── Synthesis │ ├── implicit_solvent_workspace.tpp │ └── atomgraph_synthesis.tpp ├── FileManagement │ └── file_enumerators.cpp ├── UnitTesting │ └── vector_report.tpp ├── Numerics │ ├── host_bit_counting.h │ ├── split_fixed_precision.tpp │ ├── numeric_enumerators.cpp │ └── numeric_enumerators.h ├── Chemistry │ └── residue_dictionary.h ├── copyright.h ├── Random │ ├── random_enumerators.cpp │ └── random_enumerators.h ├── ForceField │ └── forcefield_enumerators.cpp ├── Parsing │ └── parse.tpp ├── Reporting │ ├── display.h │ └── display.cpp ├── Analysis │ └── comparison_guide.tpp └── Restraints │ └── restraint_enumerators.h ├── images ├── StormmLogo.jpg └── StormmLogoSmall.jpg ├── .gitignore ├── apps ├── Emul │ ├── src │ │ ├── emulate_analysis.cpp │ │ ├── emulate_analysis.h │ │ ├── emulate_enumerators.cpp │ │ └── emulate_enumerators.h │ └── CMakeLists.txt ├── Ffrn │ ├── CMakeLists.txt │ └── test │ │ └── SulfonamideTest.sh ├── CMakeLists.txt ├── Dyna │ ├── src │ │ ├── setup.h │ │ └── setup.cpp │ ├── CMakeLists.txt │ └── test │ │ ├── WaterTest.sh │ │ └── AminoAcidTest.sh ├── Conf │ └── CMakeLists.txt ├── Gbsa │ ├── src │ │ ├── mmgbsa_testing.h │ │ ├── mmgbsa_analysis.h │ │ └── mmgbsa_carveout.h │ ├── test │ │ └── BasicDocking.sh │ └── CMakeLists.txt └── Tutorial │ ├── hpc_randomwalk.h │ ├── hpc_tutorial_i.h │ └── CMakeLists.txt ├── CountTests.sh ├── entrypoint ├── LICENSE ├── docker ├── STORMM-CPU-ONLY-CONFIG │ └── Dockerfile └── STORMM-CONFIG │ └── Dockerfile ├── Dockerfile └── ChangeAllSuchWords.sh /benchmark/bin/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/Namelists/topol/nothing.top: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/Namelists/coord/nothing.inpcrd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @cerutti.david 2 | * @suobset 3 | -------------------------------------------------------------------------------- /test/FileManagement/example/A/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/A 2 | -------------------------------------------------------------------------------- /test/FileManagement/example/B/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/B 2 | -------------------------------------------------------------------------------- /test/FileManagement/example/C/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/C 2 | -------------------------------------------------------------------------------- /test/FileManagement/example/D/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/D 2 | -------------------------------------------------------------------------------- /test/FileManagement/example/Ee/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/Ee 2 | -------------------------------------------------------------------------------- /test/FileManagement/example/F/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/F 2 | -------------------------------------------------------------------------------- /test/FileManagement/example/G_ext/some_text.txt: -------------------------------------------------------------------------------- 1 | This is example/G_ext 2 | -------------------------------------------------------------------------------- /src/version.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define STORMM_VERSION "@STORMM_VERSION@" 4 | -------------------------------------------------------------------------------- /images/StormmLogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Psivant/stormm/HEAD/images/StormmLogo.jpg -------------------------------------------------------------------------------- /test/Trajectory/chloride.inpcrd: -------------------------------------------------------------------------------- 1 | Cl- 2 | 1 3 | 2.1500000 1.8740000 -1.0030000 4 | -------------------------------------------------------------------------------- /test/Trajectory/sodium.inpcrd: -------------------------------------------------------------------------------- 1 | Na+ 2 | 1 3 | 0.0000000 0.0000000 0.0000000 4 | -------------------------------------------------------------------------------- /images/StormmLogoSmall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Psivant/stormm/HEAD/images/StormmLogoSmall.jpg -------------------------------------------------------------------------------- /test/FileManagement/example/A/extra.txt: -------------------------------------------------------------------------------- 1 | More text can go here 2 | Try adding a second line, too 3 | -------------------------------------------------------------------------------- /test/FileManagement/example/D/extra.txt: -------------------------------------------------------------------------------- 1 | More text can go here 2 | Try adding a second line, too 3 | -------------------------------------------------------------------------------- /test/FileManagement/example/G_ext/extra.txt: -------------------------------------------------------------------------------- 1 | More text can go here 2 | Try adding a second line, too 3 | -------------------------------------------------------------------------------- /src/MoleculeFormat/mol2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Psivant/stormm/HEAD/src/MoleculeFormat/mol2.pdf -------------------------------------------------------------------------------- /test/FileManagement/example/C/subdir/some_data.dat: -------------------------------------------------------------------------------- 1 | 0.05 5.00 7.01 8.02 2 | 2.04 4.10 9.33 6.55 3 | 0.01 7.77 2.46 9.50 4 | -------------------------------------------------------------------------------- /test/Trajectory/nacl.inpcrd: -------------------------------------------------------------------------------- 1 | Na+ 2 | 2 3 | 0.1780000 2.4060000 -0.9670000 -1.0560000 -0.3760000 -0.7770000 4 | -------------------------------------------------------------------------------- /src/MoleculeFormat/ctfileformats2016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Psivant/stormm/HEAD/src/MoleculeFormat/ctfileformats2016.pdf -------------------------------------------------------------------------------- /test/FileManagement/example/C/subdir/some_text.txt: -------------------------------------------------------------------------------- 1 | This is another file which contains text, and should be picked up by a 2 | recursive search. 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | 3 | # Common IDE/OS files 4 | .vscode 5 | .idea 6 | .DS_Store 7 | .cache 8 | 9 | # Local conda environments 10 | .conda 11 | -------------------------------------------------------------------------------- /apps/Emul/src/emulate_analysis.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "emulate_analysis.h" 3 | 4 | namespace emulation { 5 | 6 | } // namespace emulation 7 | -------------------------------------------------------------------------------- /src/Accelerator/syncwarp.cui: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | __device__ __forceinline__ void syncWarp() { 5 | #if (__CUDA_ARCH__ >= 700) 6 | __syncwarp(); 7 | #else 8 | return; 9 | #endif 10 | } 11 | -------------------------------------------------------------------------------- /src/Math/clustering.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | 3 | namespace stormm { 4 | namespace stmath { 5 | 6 | //------------------------------------------------------------------------------------------------- 7 | 8 | } // namespace stmath 9 | } // namespace stormm 10 | -------------------------------------------------------------------------------- /apps/Emul/src/emulate_analysis.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef EMULATE_ANALYSIS_H 3 | #define EMULATE_ANALYSIS_H 4 | 5 | #include 6 | #include 7 | #include "copyright.h" 8 | 9 | namespace emulation { 10 | 11 | } // namespace emulation 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /CountTests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -e test.stats.nofile ] ; then 4 | rm test.stats.nofile 5 | fi 6 | for FI in `ls ${STORMM_BUILD}/test` ; do 7 | ${STORMM_BUILD}/test/${FI} | grep "Success." >> test.stats.nofile 8 | done 9 | cat test.stats.nofile | awk '{ print $2 }' 10 | -------------------------------------------------------------------------------- /test/Reporting/progressbar.output: -------------------------------------------------------------------------------- 1 | [#######################################################################] 100% 2 | {|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||} 100% 3 | 100% 4 | {|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||} 100% 5 | -------------------------------------------------------------------------------- /src/Math/fft.cpp_wip: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "fft.h" 3 | 4 | namespace stormm { 5 | namespace math { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | 9 | } // namespace math 10 | } // namespace stormm 11 | -------------------------------------------------------------------------------- /test/FileManagement/example/C/letter.txt~: -------------------------------------------------------------------------------- 1 | Gentle reader, 2 | 3 | This program is built to serve you in your 4 | quest to improve molecular simulations and 5 | bring about a new understanding of physics- 6 | based models. Use in good health. 7 | 8 | Sincerely, 9 | The Roivant Discovery Team 10 | -------------------------------------------------------------------------------- /test/FileManagement/example/C/subdir/letter.txt: -------------------------------------------------------------------------------- 1 | Gentle reader, 2 | 3 | This program is built to serve you in your 4 | quest to improve molecular simulations and 5 | bring about a new understanding of physics- 6 | based models. Use in good health. 7 | 8 | Sincerely, 9 | The Roivant Discovery Team 10 | -------------------------------------------------------------------------------- /src/Potential/hpc_surface_area.cu: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "surface_area.h" 3 | 4 | namespace stormm { 5 | namespace energy { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | 9 | 10 | } // namespace energy 11 | } // namespace stormm 12 | -------------------------------------------------------------------------------- /apps/Ffrn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(APP_NAME "ffrefine.${STORMM_APP_SUFFIX}") 2 | 3 | add_executable(${APP_NAME} 4 | ${CMAKE_CURRENT_SOURCE_DIR}/src/ffrefine.cpp) 5 | 6 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 7 | 8 | install(TARGETS ${APP_NAME} 9 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 10 | -------------------------------------------------------------------------------- /src/Math/rounding.cui: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | //------------------------------------------------------------------------------------------------- 5 | __device__ __forceinline__ int devcRoundUp(const int jagged, const int increment) { 6 | return ((jagged + increment - 1) / increment) * increment; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /src/Math/fft.tpp_wip: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace math { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | fftButterfly2(T* 10 | 11 | } // namespace math 12 | } // namespace stormm 13 | -------------------------------------------------------------------------------- /apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #--- Build the apps --- 2 | 3 | set(STORMM_APP_SUFFIX "stormm") 4 | 5 | if (STORMM_ENABLE_CUDA) 6 | set(STORMM_APP_SUFFIX "${STORMM_APP_SUFFIX}.cuda") 7 | endif() 8 | 9 | add_subdirectory(Dyna) 10 | add_subdirectory(Ffrn) 11 | add_subdirectory(Conf) 12 | add_subdirectory(Gbsa) 13 | add_subdirectory(Emul) 14 | add_subdirectory(Tutorial) 15 | -------------------------------------------------------------------------------- /apps/Dyna/src/setup.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef DYNAMICS_SETUP_H 3 | #define DYNAMICS_SETUP_H 4 | 5 | #include "copyright.h" 6 | #include "../../../src/Synthesis/static_mask_synthesis.h" 7 | #include "../../../src/Synthesis/systemcache.h" 8 | 9 | namespace dyna_app { 10 | namespace setup { 11 | 12 | } // namespace setup 13 | } // namespace dyna_app 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /apps/Dyna/src/setup.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "copyright.h" 4 | #include "../../../src/Potential/static_exclusionmask.h" 5 | #include "../../../src/Reporting/error_format.h" 6 | #include "../../../src/Topology/atomgraph_enumerators.h" 7 | #include "setup.h" 8 | 9 | namespace dyna_app { 10 | namespace setup { 11 | 12 | } // namespace setup 13 | } // namespace dyna_app 14 | -------------------------------------------------------------------------------- /src/Trajectory/checkpoint.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace trajectory { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | 9 | 10 | //------------------------------------------------------------------------------------------------- 11 | 12 | 13 | } // namespace trajectory 14 | } // namespace stormm 15 | -------------------------------------------------------------------------------- /apps/Dyna/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(APP_NAME "dynamics.${STORMM_APP_SUFFIX}") 2 | 3 | add_executable(${APP_NAME} 4 | ${CMAKE_CURRENT_SOURCE_DIR}/src/setup.cpp 5 | ${CMAKE_CURRENT_SOURCE_DIR}/src/setup.h) 6 | 7 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/simulator.cpp) 8 | 9 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 10 | 11 | install(TARGETS ${APP_NAME} 12 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 13 | -------------------------------------------------------------------------------- /src/Accelerator/cuda_wrappers.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace card { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template cudaError_t wrapCudaFuncGetAttributes(cudaFuncAttributes *attrib, T ptr) { 9 | return cudaFuncGetAttributes(attrib, reinterpret_cast(ptr)); 10 | } 11 | 12 | } // namespace card 13 | } // namespace stormm 14 | -------------------------------------------------------------------------------- /src/Trajectory/hpc_coordinate_graft.cuh: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HPC_COORDINATE_GRAFT_H 3 | #define STORMM_HPC_COORDINATE_GRAFT_H 4 | 5 | #include "copyright.h" 6 | 7 | namespace stormm { 8 | namespace trajectory { 9 | 10 | /// \brief Unroll the template switch over the origin's data type following a switch evaluation 11 | /// over the destination object's data type in launchGraftCoordXYZ. 12 | /// 13 | /// \param 14 | 15 | } // namespace trajectory 16 | } // namespace stormm 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /test/Trajectory/bromobenzene_iso.inpcrd: -------------------------------------------------------------------------------- 1 | default_name 2 | 12 3 | 61.7370000 61.6110000 58.5120000 62.2630000 62.5570000 58.5020000 4 | 60.3390000 61.5930000 58.5240000 59.7850000 62.5230000 58.5240000 5 | 59.6540000 60.3730000 58.5370000 58.5720000 60.3590000 58.5470000 6 | 60.3690000 59.1700000 58.5370000 59.8390000 58.2260000 58.5470000 7 | 61.7680000 59.1870000 58.5250000 62.3160000 58.2540000 58.5250000 8 | 62.4530000 60.4080000 58.5120000 64.3630000 60.4310000 58.4940000 9 | -------------------------------------------------------------------------------- /apps/Conf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(APP_NAME "conformer.${STORMM_APP_SUFFIX}") 2 | 3 | add_executable(${APP_NAME} 4 | ${CMAKE_CURRENT_SOURCE_DIR}/src/analysis.cpp 5 | ${CMAKE_CURRENT_SOURCE_DIR}/src/analysis.h 6 | ${CMAKE_CURRENT_SOURCE_DIR}/src/setup.cpp 7 | ${CMAKE_CURRENT_SOURCE_DIR}/src/setup.h) 8 | 9 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/conformer.cpp) 10 | 11 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 12 | 13 | install(TARGETS ${APP_NAME} 14 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 15 | -------------------------------------------------------------------------------- /apps/Emul/src/emulate_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include "../../../src/copyright.h" 2 | #include "emulate_enumerators.h" 3 | 4 | namespace emulation { 5 | 6 | //------------------------------------------------------------------------------------------------- 7 | std::string getEnumeratorName(const FittingContribution input) { 8 | switch (input) { 9 | case FittingContribution::ENERGY: 10 | return std::string("ENERGY"); 11 | case FittingContribution::FORCE: 12 | return std::string("FORCE"); 13 | } 14 | __builtin_unreachable(); 15 | } 16 | 17 | } // namespace emulation 18 | -------------------------------------------------------------------------------- /test/Trajectory/bromobenzene.inpcrd: -------------------------------------------------------------------------------- 1 | default_name 2 | 12 3 | 61.7370000 61.6110000 58.5120000 62.2630000 62.5570000 58.5020000 4 | 60.3390000 61.5930000 58.5240000 59.7850000 62.5230000 58.5240000 5 | 59.6540000 60.3730000 58.5370000 58.5720000 60.3590000 58.5470000 6 | 60.3690000 59.1700000 58.5370000 59.8390000 58.2260000 58.5470000 7 | 61.7680000 59.1870000 58.5250000 62.3160000 58.2540000 58.5250000 8 | 62.4530000 60.4080000 58.5120000 64.3630000 60.4310000 58.4940000 9 | 48.0000000 48.0000000 48.0000000 90.0000000 90.0000000 90.0000000 10 | -------------------------------------------------------------------------------- /test/Topology/ala_charges.m: -------------------------------------------------------------------------------- 1 | % Snapshot data, 22 double { GENERAL 6 16 12 } (6 x %16.12f per line). 2 | charges = [ 3 | 0.112300038338 -0.366199970245 0.112300038338 0.112300038338 0.597199916840 -0.567900061607 4 | -0.415699958801 0.271900057793 0.033699989319 0.082299947739 -0.182500004768 0.060299992561 5 | 0.060299992561 0.060299992561 0.597299933434 -0.567899942398 -0.415699958801 0.271900057793 6 | -0.149000048637 0.097599983215 0.097599983215 0.097599983215 0.000000000000 0.000000000000 7 | ]; 8 | charges = reshape(transpose(charges), 1, 24); 9 | charges = charges(1:22); 10 | -------------------------------------------------------------------------------- /benchmark/KernelTesting/bromobenzene.inpcrd: -------------------------------------------------------------------------------- 1 | default_name 2 | 12 3 | 61.7370000 61.6110000 58.5120000 62.2630000 62.5570000 58.5020000 4 | 60.3390000 61.5930000 58.5240000 59.7850000 62.5230000 58.5240000 5 | 59.6540000 60.3730000 58.5370000 58.5720000 60.3590000 58.5470000 6 | 60.3690000 59.1700000 58.5370000 59.8390000 58.2260000 58.5470000 7 | 61.7680000 59.1870000 58.5250000 62.3160000 58.2540000 58.5250000 8 | 62.4530000 60.4080000 58.5120000 64.3630000 60.4310000 58.4940000 9 | 48.0000000 48.0000000 48.0000000 90.0000000 90.0000000 90.0000000 10 | -------------------------------------------------------------------------------- /apps/Emul/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(APP_NAME "emulate.${STORMM_APP_SUFFIX}") 2 | 3 | add_executable(${APP_NAME} 4 | ${CMAKE_CURRENT_SOURCE_DIR}/src/emulate_analysis.cpp 5 | ${CMAKE_CURRENT_SOURCE_DIR}/src/emulate_analysis.h 6 | ${CMAKE_CURRENT_SOURCE_DIR}/src/emulate_enumerators.cpp 7 | ${CMAKE_CURRENT_SOURCE_DIR}/src/emulate_enumerators.h) 8 | 9 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/emulate.cpp) 10 | 11 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 12 | 13 | install(TARGETS ${APP_NAME} 14 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 15 | -------------------------------------------------------------------------------- /src/DataTypes/casting_ops.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "casting_ops.h" 3 | 4 | namespace stormm { 5 | namespace data_types { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | const std::vector constCastVector(const std::vector &va) { 9 | std::vector result; 10 | const size_t nva = va.size(); 11 | result.reserve(nva); 12 | for (size_t i = 0; i < nva; i++) { 13 | result.push_back(const_cast(va[i])); 14 | } 15 | return result; 16 | } 17 | 18 | } // namespace data_types 19 | } // namespace stormm 20 | -------------------------------------------------------------------------------- /test/Parsing/remdynamics.txt: -------------------------------------------------------------------------------- 1 | &dynamics 2 | nstlim = 57, ntpr = 19, ntwx = 19, nscm = 3, 3 | dt = 1.5, rigid_geom = off, tol = 5.4e-7, 4 | rattle_iter = 45, 5 | rattle_style center_sum, ntt = 3, 6 | tevo_start = 5, tevo_end = 8 7 | vrand = 6, gamma_ln = 0.004, 8 | tcache_depth = 6, 9 | thermostat_seed = 21858302, 10 | tcache_config double 11 | &end 12 | 13 | &remd 14 | total_swaps = 10000, 15 | remd_type Temperature, 16 | freq_swaps = 100, swap_store Successful, 17 | temp_distribution = "Van Der Spoel", 18 | exchange_probability = 0.2, tolerance = 0.0001, 19 | max_replicas = 1000, low_temperature = 293.7, 20 | high_temperature = 393.7 21 | &end -------------------------------------------------------------------------------- /entrypoint: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ $# -lt 1 ]; then 5 | echo "Usage: stormm {mmgbsa|dynamics|ffrefine|conformer} " 6 | exit 1 7 | fi 8 | 9 | APP="$1" 10 | shift 11 | 12 | case "$APP" in 13 | mmgbsa) 14 | exec /app/stormmbuild/apps/Gbsa/mmgbsa.stormm.cuda "$@" 15 | ;; 16 | dynamics) 17 | exec /app/stormmbuild/apps/Dyna/dynamics.stormm.cuda "$@" 18 | ;; 19 | ffrefine) 20 | exec /app/stormmbuild/apps/Ffrn/ffrefine.stormm.cuda "$@" 21 | ;; 22 | conformer) 23 | exec /app/stormmbuild/apps/Conf/conformer.stormm.cuda "$@" 24 | ;; 25 | *) 26 | echo "Usage: stormm {mmgbsa|dynamics|ffrefine|conformer} " 27 | exit 1 28 | ;; 29 | esac -------------------------------------------------------------------------------- /src/Trajectory/coordinate_series.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "coordinate_series.h" 3 | 4 | namespace stormm { 5 | namespace trajectory { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | ValidCoordinateTypes::ValidCoordinateTypes(const size_t double_id_in, const size_t float_id_in, 9 | const size_t short_id_in, const size_t int_id_in, 10 | const size_t llint_id_in) : 11 | double_id{double_id_in}, float_id{float_id_in}, short_id{short_id_in}, int_id{int_id_in}, 12 | llint_id{llint_id_in} 13 | {} 14 | 15 | } // namespace trajectory 16 | } // namespace stormm 17 | -------------------------------------------------------------------------------- /test/Chemistry/lig1_c8h8.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 19 3 | 1.6550000 0.6550000 -0.0060000 3.0670000 1.2800000 -0.0040000 4 | 4.0990000 0.4170000 0.0040000 3.2680000 2.0690000 1.0670000 5 | 3.2760000 2.0600000 -1.0800000 0.6610000 1.6530000 -0.0100000 6 | 1.0400000 2.6420000 -0.0120000 -0.7380000 1.6350000 -0.0130000 7 | -1.1270000 2.6230000 -0.0160000 -1.7720000 0.6970000 -0.0120000 8 | -2.7410000 1.1260000 -0.0150000 -1.7740000 -0.6980000 -0.0080000 9 | -2.7610000 -1.0890000 -0.0080000 -0.8170000 -1.7130000 -0.0040000 10 | -1.2310000 -2.6890000 -0.0020000 0.5790000 -1.6930000 -0.0030000 11 | 0.9670000 -2.6810000 -0.0010000 1.6170000 -0.7550000 -0.0040000 12 | 2.5610000 -1.2300000 -0.0030000 13 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 19 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.4263364 7.9070416 0.0000058 11 | 5.4753161 8.4396400 0.0000102 6.9942767 8.1786319 0.8898277 12 | 6.9942688 8.1786372 -0.8898193 13 | -------------------------------------------------------------------------------- /src/Constants/generalized_born.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace generalized_born_defaults { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | NeckGeneralizedBornKit::NeckGeneralizedBornKit(const int table_size_in, const T neck_cut_in, 10 | const T kscale_in, const T* max_separation_in, 11 | const T* max_value_in) : 12 | table_size{table_size_in}, neck_cut{neck_cut_in}, kscale{kscale_in}, 13 | max_separation{max_separation_in}, max_value{max_value_in} 14 | {} 15 | 16 | } // namespace generalized_born_defaults 17 | } // namespace stormm 18 | -------------------------------------------------------------------------------- /apps/Gbsa/src/mmgbsa_testing.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef MMGBSA_TESTING_H 3 | #define MMGBSA_TESTING_H 4 | 5 | namespace mmgbsa { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | // Run unit tests of the program-specific code. 9 | //------------------------------------------------------------------------------------------------- 10 | int runUnitTests(); 11 | 12 | //------------------------------------------------------------------------------------------------- 13 | // Run regression tests with some inputs from the main STORMM repository. 14 | //------------------------------------------------------------------------------------------------- 15 | int runRegressionTests(); 16 | 17 | } // namespace mmgbsa 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/Topology/atomgraph.cpp: -------------------------------------------------------------------------------- 1 | #ifdef STORMM_USE_HPC 2 | # include 3 | #endif 4 | #include "copyright.h" 5 | #include "atomgraph.h" 6 | 7 | namespace stormm { 8 | namespace topology { 9 | 10 | #ifdef STORMM_USE_HPC 11 | //------------------------------------------------------------------------------------------------- 12 | void AtomGraph::upload() { 13 | int_data.upload(); 14 | double_data.upload(); 15 | float_data.upload(); 16 | char4_data.upload(); 17 | } 18 | 19 | //------------------------------------------------------------------------------------------------- 20 | void AtomGraph::download() { 21 | int_data.download(); 22 | double_data.download(); 23 | float_data.download(); 24 | char4_data.download(); 25 | } 26 | #endif 27 | 28 | } // namespace topology 29 | } // namespace stormm 30 | -------------------------------------------------------------------------------- /src/Structure/structure_utils.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_STRUCTURE_UTILS_H 3 | #define STORMM_STRUCTURE_UTILS_H 4 | 5 | #include "copyright.h" 6 | 7 | namespace stormm { 8 | namespace structure { 9 | 10 | /// \brief Check the supplied bounds for a partial scan or update of coordinates. 11 | /// 12 | /// \param lower_limit The lower limit of atoms to scan 13 | /// \param upper_limit The (proposed) upper limit of atoms to scan 14 | /// \param natom The number of atoms actually available in the coordinate set of interest 15 | /// \param caller Name of the calling function 16 | void coordinateBoundsCheck(const int lower_limit, const int upper_limit, const int natom, 17 | const char* caller = nullptr); 18 | 19 | } // namespace structure 20 | } // namespace stormm 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /apps/Gbsa/src/mmgbsa_analysis.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef MMGBSA_ANALYSIS_H 3 | #define MMGBSA_ANALYSIS_H 4 | 5 | #include "../../../src/copyright.h" 6 | #include "../../../src/Namelists/nml_files.h" 7 | #include "../../../src/Namelists/nml_report.h" 8 | #include "../../../src/Reporting/section_contents.h" 9 | #include "mmgbsa_problem_set.h" 10 | 11 | namespace mmgbsa { 12 | 13 | using stormm::namelist::FilesControls; 14 | using stormm::namelist::ReportControls; 15 | using stormm::review::SectionContents; 16 | 17 | /// \brief Summarize the chemical features of each ligand topology. 18 | void addLigandTopologySummary(const MMGBSAProblemSet &sandbox, const FilesControls &ficon, 19 | const ReportControls &repcon, std::vector *outp); 20 | 21 | } // namespace mmgbsa 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/DataTypes/mixed_types.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_MIXED_TYPES_H 3 | #define STORMM_MIXED_TYPES_H 4 | 5 | #include "copyright.h" 6 | 7 | namespace stormm { 8 | namespace data_types { 9 | 10 | /// \brief A combination of integer and double data. Like other mixed tuples in this library, 11 | /// this will maintain the x, y, z, and w member variable naming conventions. 12 | struct CombineIDp { 13 | int x; 14 | double y; 15 | }; 16 | 17 | /// \brief a templated, combined type for tagging any data type with an associated integer count 18 | template struct ValueWithCounter { 19 | T value; 20 | int count; 21 | }; 22 | 23 | } // namespace data_types 24 | } // namespace stormm 25 | 26 | namespace stormm { 27 | using data_types::CombineIDp; 28 | using data_types::ValueWithCounter; 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/Structure/structure_utils.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "copyright.h" 3 | #include "Reporting/error_format.h" 4 | #include "structure_utils.h" 5 | 6 | namespace stormm { 7 | namespace structure { 8 | 9 | //------------------------------------------------------------------------------------------------- 10 | void coordinateBoundsCheck(const int lower_limit, const int upper_limit, const int natom, 11 | const char* caller) { 12 | if (lower_limit < 0 || upper_limit < 0 || lower_limit >= natom || upper_limit > natom) { 13 | rtErr("A coordinate set with " + std::to_string(natom) + " particles cannot rotate " 14 | "indices " + std::to_string(lower_limit) + " to " + std::to_string(upper_limit) + ".", 15 | caller); 16 | } 17 | } 18 | 19 | } // namespace structure 20 | } // namespace stormm 21 | -------------------------------------------------------------------------------- /src/Accelerator/cuda_wrappers.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_KFUNC_POINTERS_H 3 | #define STORMM_KFUNC_POINTERS_H 4 | 5 | #include "copyright.h" 6 | 7 | # ifdef STORMM_USE_HPC 8 | # include 9 | 10 | namespace stormm { 11 | namespace card { 12 | 13 | # ifdef STORMM_USE_CUDA 14 | /// \brief A templated function to accept any function pointer and reinterpret it as a constant 15 | /// char pointer for submission to a standard cudaFuncGetAttributes() call. This will 16 | /// return a CUDA error type that should read "cudaSuccess." 17 | /// 18 | /// \param attrib 19 | /// \param 20 | template cudaError_t wrapCudaFuncGetAttributes(cudaFuncAttributes *attrib, T ptr); 21 | # endif 22 | 23 | } // namespace card 24 | } // namespace stormm 25 | 26 | # include "cuda_wrappers.tpp" 27 | 28 | # endif 29 | #endif 30 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/GLY_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 19 0.0000000E+00 3 | 2.0444101 0.9716411 -0.0000025 2.0006479 2.0599432 -0.0000103 4 | 1.4805249 2.4051646 0.8913294 1.4805476 2.4051532 -0.8913672 5 | 3.4091770 2.6062637 0.0000055 4.3665461 1.8440237 0.0000318 6 | 3.5363771 3.9303124 -0.0000110 2.7055566 4.5048843 -0.0000359 7 | 4.8221552 4.6295687 -0.0000001 5.3897755 4.3373796 0.8837696 8 | 5.3898043 4.3373585 -0.8837454 4.6617346 6.1524110 -0.0000187 9 | 3.5413877 6.6600520 -0.0000732 5.7905813 6.8726522 0.0000274 10 | 6.6636888 6.3686069 0.0000689 5.8528732 8.3354572 0.0000127 11 | 4.8480885 8.7647990 0.0001984 6.3797712 8.6846034 0.8893381 12 | 6.3794425 8.6845988 -0.8895095 13 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/GLY_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 19 0.0000000E+00 3 | 2.0433671 0.9730282 0.0001173 2.0006835 2.0613755 -0.0003632 4 | 1.4803542 2.4074592 0.8905219 1.4814464 2.4067157 -0.8921702 5 | 3.4097342 2.6063815 0.0002803 4.3663887 1.8432542 0.0014580 6 | 3.5381926 3.9303193 -0.0004490 2.7078955 4.5056957 -0.0014284 7 | 4.8245967 4.6285340 0.0001979 5.3878372 4.3362154 0.8867222 8 | 5.3890399 4.3355905 -0.8853534 4.6625045 6.1512704 -0.0004801 9 | 3.5417014 6.6579787 -0.0020914 5.7906896 6.8725335 0.0007107 10 | 6.6642505 6.3692679 0.0019623 5.8516781 8.3353954 0.0002033 11 | 4.8465352 8.7638609 0.0062122 6.3834563 8.6851250 0.8863864 12 | 6.3727385 8.6848725 -0.8924286 13 | -------------------------------------------------------------------------------- /test/Namelists/coord/ala.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 22 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.8779692 4.5615506 -0.0000043 5.4199376 4.2412526 0.8898151 8 | 5.6696596 4.1364944 -1.2321480 5.1440544 4.4582737 -2.1312016 9 | 6.6579677 4.5954636 -1.2057908 5.7736249 3.0515036 -1.2413850 10 | 4.7980504 6.0814509 0.0000014 3.7078162 6.6487512 0.0000062 11 | 5.9810245 6.7001572 0.0000023 6.8352096 6.1612072 -0.0000007 12 | 6.0894183 8.1450976 0.0000059 5.0920360 8.5847897 0.0000102 13 | 6.6289398 8.4694955 0.8898279 6.6289315 8.4695000 -0.8898191 14 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_C1.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 22 3 | 1.1660000 0.6750000 0.0040000 -0.0530000 1.3530000 -0.1070000 4 | -0.0580000 2.4100000 -0.1870000 -1.2560000 0.6550000 -0.1060000 5 | -2.1740000 1.1790000 -0.1890000 -1.2560000 -0.7320000 0.0070000 6 | -2.1730000 -1.2650000 0.0080000 -0.0510000 -1.4190000 0.1180000 7 | -0.0490000 -2.4760000 0.2030000 1.1520000 -0.7200000 0.1170000 8 | 2.0670000 -1.2470000 0.1950000 4.8510000 2.8130000 -0.0090000 9 | 5.7690000 3.3450000 -0.0120000 3.9310000 3.0040000 -1.0350000 10 | 4.1480000 3.6800000 -1.8220000 2.7280000 2.3060000 -1.0300000 11 | 2.0330000 2.4500000 -1.8170000 2.4290000 1.4090000 0.0010000 12 | 3.3620000 1.2270000 1.0280000 3.1460000 0.5550000 1.8180000 13 | 4.5650000 1.9240000 1.0230000 5.2650000 1.7790000 1.8060000 14 | -------------------------------------------------------------------------------- /src/DataTypes/casting_ops.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_CASTING_OPS_H 3 | #define STORMM_CASTING_OPS_H 4 | 5 | #include 6 | #include "copyright.h" 7 | #include "Topology/atomgraph.h" 8 | 9 | namespace stormm { 10 | namespace data_types { 11 | 12 | using topology::AtomGraph; 13 | 14 | /// \brief Cast all elements of a vector to non-const. Respect the const-ness of the vector 15 | /// itself: this moves the const-ness to a single qualifier on the container rather than 16 | /// individual qualifiers on all elements. 17 | /// 18 | /// Overloaded: 19 | /// - Operate on AtomGraph pointers 20 | /// 21 | /// \param va The vector of const items to consolidate as non-const inside a const container 22 | /// \{ 23 | const std::vector constCastVector(const std::vector &va); 24 | /// \} 25 | 26 | } // namespace data_types 27 | } // namespace stormm 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /apps/Tutorial/hpc_randomwalk.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "../../src/copyright.h" 3 | #include "../../src/Accelerator/gpu_details.h" 4 | #include "randomwalk.h" 5 | 6 | namespace tutorial { 7 | 8 | using stormm::card::GpuDetails; 9 | 10 | //------------------------------------------------------------------------------------------------- 11 | // Launch a kernel to carry out particle movement (coordinate advancement) in the prototypical 12 | // STORMM class. 13 | // 14 | // Arguments: 15 | // step_count: The number of steps to advance 16 | // rww: A writeable abstract for the main simulation class object 17 | // gpu: Details of the GPU that will carry out the simulation 18 | //------------------------------------------------------------------------------------------------- 19 | void launchRandomWalkAdvance(int step_count, RandomWalkWriter *rww, const GpuDetails &gpu); 20 | 21 | } // namespace tutorial 22 | -------------------------------------------------------------------------------- /apps/Gbsa/src/mmgbsa_carveout.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef MMGBSA_CARVEOUT_H 3 | #define MMGBSA_CARVEOUT_H 4 | 5 | #include "../../../src/copyright.h" 6 | #include "../../../src/Synthesis/systemcache.h" 7 | #include "nml_mmgbsa.h" 8 | #include "mmgbsa_problem_set.h" 9 | 10 | namespace mmgbsa { 11 | 12 | using stormm::topology::AtomGraph; 13 | using stormm::trajectory::PhaseSpace; 14 | 15 | // Given a receptor and a set of ligands, compute the "carevout" atoms of the receptor which lie 16 | // near enough to any one of the ligands to qualify as mobile, or of interest to analysis. 17 | // 18 | // Arguments: 19 | // gbsacon: Contains user-provided input on details of MM-GBSA calculations 20 | // sc: A collection of all individual receptor and ligand systems needed for MM-GBSA 21 | std::vector receptorCarveOut(const MMGBSAControls &gbsacon, const SystemCache &sc); 22 | 23 | 24 | } // namespace mmgbsa 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /apps/Gbsa/test/BasicDocking.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > nrg_est.in << EOF 4 | &files 5 | -sys { -p ${STORMM_SOURCE}/test/Topology/symmetry_C1.top 6 | -c symmetry_C1.crd -label ligand } 7 | -sys { -p ${STORMM_SOURCE}/test/Topology/symmetry_C4.top 8 | -c symmetry_C4.crd -label ligand } 9 | -sys { -p ${STORMM_SOURCE}/test/Topology/symmetry_C3.top 10 | -c symmetry_C3.crd -label receptor } 11 | &end 12 | 13 | 14 | &mmgbsa 15 | weights boltzmann, 16 | depth averages, 17 | temperature 100.0, 18 | carveout { cutoff 35.0 }, 19 | &end 20 | 21 | &solvent 22 | igb = 8, 23 | &end 24 | 25 | &minimize 26 | cdcyc = 50, ncyc = 100, maxcyc = 500, 27 | clash_r0 = 1.4, clash_vdw_ratio = 0.8, 28 | ntpr = 10, 29 | &end 30 | 31 | &report 32 | syntax Matlab, 33 | report_width 99, 34 | &end 35 | EOF 36 | 37 | valgrind ${STORMM_BUILD}/apps/Gbsa/mmgbsa.stormm.cuda -O -i nrg_est.in -except WARN 38 | 39 | -------------------------------------------------------------------------------- /apps/Tutorial/hpc_tutorial_i.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HPC_TUTORIAL_I_H 3 | #define STORMM_HPC_TUTORIAL_I_H 4 | 5 | #include "../../src/Accelerator/gpu_details.h" 6 | 7 | using stormm::card::GpuDetails; 8 | 9 | //------------------------------------------------------------------------------------------------- 10 | // Wrapper for summation kernels of various data types 11 | // 12 | // Arguments: 13 | // vdata: The array of data to sum 14 | // n: The trusted length of vdata 15 | // vresult: Separate array to hold the result of the sum 16 | // ct_data: Type ID code to indicat ethe data type, e.g. int, of both vdata and vresult 17 | //------------------------------------------------------------------------------------------------- 18 | void wrapTheSummationLaunch(const void* vdata, const size_t n, void* vresult, const size_t ct_data, 19 | const GpuDetails &gpu); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/Accelerator/hpc_hybrid.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HPC_HYBRID_H 3 | #define STORMM_HPC_HYBRID_H 4 | 5 | #include "copyright.h" 6 | 7 | namespace stormm { 8 | namespace card { 9 | 10 | /// \brief 11 | /// 12 | void launchDeepCopy(void* vdest_host, void* vdest_devc, const void* vorig_host, 13 | const void* vorig_devc, size_t dest_offset, size_t orig_offset, size_t length, 14 | size_t ct, bool do_hdc, bool do_dhc, bool do_ddc, int dest_bits, 15 | int orig_bits); 16 | 17 | void launchDeepCopy(void* vdest_host, void* vdest_devc, const void* vorig_host, 18 | const void* vorig_devc, size_t dest_offset, size_t orig_offset, size_t length, 19 | size_t dest_ct, size_t orig_ct, bool do_hdc, bool do_dhc, bool do_ddc, 20 | int dest_bits, int orig_bits); 21 | 22 | } // namespace card 23 | } // namespace stormm 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /apps/Emul/src/emulate_enumerators.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef EMULATE_ENUMERATORS_H 3 | #define EMULATE_ENUMERATORS_H 4 | 5 | #include 6 | #include "../../../src/copyright.h" 7 | 8 | namespace emulation { 9 | 10 | // Different rows of the fitting matrix may include energy or force contributions. This enumerator 11 | // will list the various options. 12 | enum class FittingContribution { 13 | ENERGY, // The energy or relative energy of a group of atoms is the objective 14 | FORCE // The force (e.g. zero force) exerted on atoms selected by a mask is of interest 15 | }; 16 | 17 | // Return a human-readable string based on an enumerator's value. Various overloads cover each 18 | // enum class in the namespace, as is the policy in the libraries. 19 | // 20 | // Arguments: 21 | // input: The enumerator of interest 22 | std::string getEnumerationName(FittingContribution input); 23 | 24 | } // namespace emulation 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /test/Trajectory/ala_dipeptide.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 22 0.0000000E+00 3 | 1.9815657 1.0960482 0.4189457 1.9935057 2.1413665 0.1130932 4 | 1.3732643 2.7275973 0.7883015 1.6210428 2.2289545 -0.9055415 5 | 3.4132873 2.6528993 0.1712665 4.3157275 1.9186698 0.5513451 6 | 3.6050240 3.9166131 -0.1981899 2.8060602 4.4729905 -0.4652521 7 | 4.8997214 4.5973850 -0.2008953 5.4579290 4.2904897 0.6850202 8 | 5.6823884 4.1670062 -1.4530341 5.1354338 4.4563555 -2.3516226 9 | 6.6646787 4.6392557 -1.4630629 5.8181638 3.0843088 -1.4505234 10 | 4.7157977 6.1268170 -0.1445887 3.6140656 6.6311808 -0.3620097 11 | 5.8009264 6.8596513 0.1384163 6.6659474 6.3683800 0.3008079 12 | 5.8184838 8.3203477 0.2134047 4.8361344 8.6945081 0.5121004 13 | 6.5575078 8.6493284 0.9454911 6.0674074 8.7362868 -0.7641622 14 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_C2.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 25 3 | 1.1450000 0.6600000 -0.0080000 -0.0760000 1.3350000 -0.1270000 4 | -0.0830000 2.3910000 -0.2060000 -1.2760000 0.6320000 -0.1340000 5 | -2.1940000 1.1530000 -0.2230000 -1.2720000 -0.7560000 -0.0230000 6 | -2.1870000 -1.2910000 -0.0290000 -0.0650000 -1.4380000 0.0960000 7 | -0.0600000 -2.4950000 0.1800000 1.1350000 -0.7350000 0.1030000 8 | 2.0520000 -1.2590000 0.1870000 4.8330000 2.8060000 0.0030000 9 | 6.1440000 3.5600000 0.0160000 6.2580000 4.1750000 -0.8760000 10 | 6.9810000 2.8630000 0.0560000 6.1950000 4.2130000 0.8880000 11 | 3.9140000 2.9930000 -1.0270000 4.1290000 3.6680000 -1.8150000 12 | 2.7110000 2.2950000 -1.0300000 2.0210000 2.4380000 -1.8210000 13 | 2.4050000 1.3960000 -0.0030000 3.3330000 1.2160000 1.0290000 14 | 3.1130000 0.5440000 1.8170000 4.5350000 1.9140000 1.0300000 15 | 5.2270000 1.7670000 1.8200000 16 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_C3.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 25 3 | 1.1460000 0.6750000 -0.0280000 -0.0770000 1.3450000 -0.1550000 4 | -0.0870000 2.4010000 -0.2430000 -1.2740000 0.6380000 -0.1580000 5 | -2.1950000 1.1550000 -0.2540000 -1.2660000 -0.7490000 -0.0350000 6 | -2.1780000 -1.2880000 -0.0380000 -0.0570000 -1.4260000 0.0910000 7 | -0.0480000 -2.4820000 0.1830000 1.1410000 -0.7190000 0.0940000 8 | 2.0600000 -1.2380000 0.1850000 4.8250000 2.8190000 -0.0150000 9 | 5.7400000 3.3530000 -0.0190000 3.9200000 2.9960000 -1.0570000 10 | 4.1490000 3.6620000 -1.8490000 2.7170000 2.2990000 -1.0620000 11 | 2.0330000 2.4310000 -1.8600000 2.4050000 1.4150000 -0.0240000 12 | 3.3230000 1.2490000 1.0190000 3.0910000 0.5860000 1.8120000 13 | 4.5290000 1.9440000 1.0280000 5.5030000 1.7430000 2.1670000 14 | 6.3800000 2.3810000 2.0580000 5.8380000 0.7060000 2.1990000 15 | 5.0270000 1.9820000 3.1190000 16 | -------------------------------------------------------------------------------- /test/Trajectory/bromobenzene_vs_iso.inpcrd: -------------------------------------------------------------------------------- 1 | 2 | 25 3 | 78.7320000 43.9090000 82.1640000 78.0500000 43.5870000 81.3820000 4 | 78.8090000 45.2710000 82.5120000 78.2860000 46.0370000 81.9480000 5 | 79.6430000 45.6810000 83.5720000 79.7970000 46.7160000 83.8630000 6 | 80.3430000 44.7090000 84.3320000 80.8140000 45.1010000 85.2290000 7 | 80.2550000 43.3430000 84.0440000 80.5590000 42.6010000 84.7770000 8 | 79.5180000 42.9490000 82.8950000 79.0040000 41.1000000 82.6640000 9 | 78.7912699 40.3347512 82.5683956 79.3075200 45.6539600 83.8464120 10 | 79.9784800 45.7080400 83.2975880 78.4837400 45.2188470 82.7880845 11 | 79.1342600 45.3231530 82.2359155 78.3995745 43.8546897 82.4501130 12 | 79.0644255 43.9633102 81.8778870 79.1702365 42.8579082 83.1493010 13 | 79.8657635 43.0400918 82.6406990 79.8909845 43.3152140 84.2870175 14 | 80.6190155 43.3707860 83.8009825 80.0134760 44.6753200 84.5924340 15 | 80.6725240 44.7426800 84.0715660 16 | -------------------------------------------------------------------------------- /test/Namelists/coord/pro.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 26 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.3971205 4.8552049 -0.0000005 7 | 2.0087653 4.9463088 1.0143863 1.6241543 4.4432647 -0.6487898 8 | 2.9534046 6.1467384 -0.5220049 2.4929865 6.9750855 0.0164701 9 | 2.7385878 6.2418298 -1.5863887 4.4420430 6.0885010 -0.2757041 10 | 4.6879604 6.7095301 0.5856591 4.9662770 6.4633694 -1.1547672 11 | 4.8550530 4.6148143 -0.0000043 5.4319175 4.3481439 -0.8855620 12 | 5.6459380 4.2507769 1.2483795 5.1913701 3.4514045 2.0637396 13 | 6.8343473 4.8407170 1.3962948 7.1675580 5.4917513 0.6997143 14 | 7.6825032 4.5778022 2.5413318 7.1924635 3.8609185 3.2001484 15 | 8.6340655 4.1678886 2.2028047 7.8599052 5.5065422 3.0836145 16 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_gly.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 26 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.2535003 7.9261535 0.0000059 11 | 5.7586182 8.3152725 -0.8898128 5.7586264 8.3152681 0.8898312 12 | 7.7048175 8.3845875 0.0000007 8.6185740 7.5627054 -0.0000057 13 | 7.8327729 9.7134413 0.0000021 7.0119531 10.3019600 0.0000063 14 | 9.1306596 10.3577178 -0.0000006 9.9134177 9.5991729 -0.0000064 15 | 9.2281345 10.9796647 -0.8898215 9.2281422 10.9796556 0.8898255 16 | -------------------------------------------------------------------------------- /src/MolecularMechanics/small_molecule_batch.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_SMALL_MOLECULE_BATCH_H 3 | #define STORMM_SMALL_MOLECULE_BATCH_H 4 | 5 | #include "copyright.h" 6 | 7 | namespace stormm { 8 | namespace mm { 9 | 10 | /// \brief Atom limits for small molecules in various thread block sizes 11 | /// \{ 12 | constexpr int max_smmol_atom_count_tiny_block = 96; 13 | constexpr int max_smmol_atom_count_small_block = 192; 14 | constexpr int max_smmol_atom_count_medium_block = 384; 15 | constexpr int max_smmol_atom_count_large_block = 720; 16 | /// \} 17 | 18 | /// \brief Minimize a batch of small molecules. The CPU templated function mimics the GPU 19 | /// templated kernels to minimize the small molecules, subject to restraints, one at a 20 | /// time whereas the GPU will assign one molecule to a thread block at a time and continue 21 | /// until all thread blocks have finished with the work. 22 | 23 | 24 | } // namespace mm 25 | } // namespace stormm 26 | 27 | #include "small_molecule_batch.tpp" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/Namelists/namelist_inventory.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "namelist_inventory.h" 3 | 4 | namespace stormm { 5 | namespace namelist { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | NamelistToken::NamelistToken(const std::string &title_in, NmlFuncPtr producer_in) : 9 | title{title_in}, producer{producer_in} 10 | {} 11 | 12 | //------------------------------------------------------------------------------------------------- 13 | const std::string& NamelistToken::getTitle() const { 14 | return title; 15 | } 16 | 17 | //------------------------------------------------------------------------------------------------- 18 | NamelistEmulator NamelistToken::invoke(const TextFile &tf, int *start_line, bool *found, 19 | const ExceptionResponse policy, 20 | const WrapTextSearch wrap) const { 21 | return producer(tf, start_line, found, policy, wrap); 22 | } 23 | 24 | } // namespace namelist 25 | } // namespace stormm 26 | -------------------------------------------------------------------------------- /test/Synthesis/assemble_restraints.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_TEST_ASSEMBLE_RESTRAINTS_H 3 | #define STORMM_TEST_ASSEMBLE_RESTRAINTS_H 4 | 5 | #include "../../src/Restraints/restraint_apparatus.h" 6 | #include "../../src/Topology/atomgraph.h" 7 | #include "../../src/Trajectory/phasespace.h" 8 | 9 | using stormm::restraints::RestraintApparatus; 10 | using stormm::topology::AtomGraph; 11 | using stormm::trajectory::PhaseSpace; 12 | 13 | /// \brief Create a collection of positional, distance, angle, and dihedral restraints acting on a 14 | /// system which will exert mild to moderate forces. All of the restraints, together, will 15 | /// be checked for total energy and forces. This feeds into tests that are not designed to 16 | /// weed out individual problems but instead take a "pooled sample" and verify that there 17 | /// are no problems in it. 18 | /// 19 | /// \param ag System topology 20 | /// \param ps System coordinates 21 | RestraintApparatus assembleRestraints(const AtomGraph *ag, const PhaseSpace &ps); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/Synthesis/implicit_solvent_workspace.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace synthesis { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | ISWorkspaceKit::ISWorkspaceKit(const int fp_bits_in, llint* psi_in, int* psi_ovrf_in, 10 | llint* sum_deijda_in, int* sum_deijda_ovrf_in, llint* alt_psi_in, 11 | int* alt_psi_ovrf_in, llint* alt_sum_deijda_in, 12 | int* alt_sum_deijda_ovrf_in) : 13 | fp_bits{fp_bits_in}, fp_scale{static_cast(pow(2.0, fp_bits_in))}, 14 | inv_fp_scale{static_cast(1.0 / fp_scale)}, psi{psi_in}, psi_ovrf{psi_ovrf_in}, 15 | sum_deijda{sum_deijda_in}, sum_deijda_ovrf{sum_deijda_ovrf_in}, alt_psi{alt_psi_in}, 16 | alt_psi_ovrf{alt_psi_ovrf_in}, alt_sum_deijda{alt_sum_deijda_in}, 17 | alt_sum_deijda_ovrf{alt_sum_deijda_ovrf_in} 18 | {} 19 | 20 | } // namespace synthesis 21 | } // namespace stormm 22 | -------------------------------------------------------------------------------- /test/Trajectory/bromobenzene_vs.inpcrd: -------------------------------------------------------------------------------- 1 | 2 | 25 3 | 78.7320000 43.9090000 82.1640000 78.0500000 43.5870000 81.3820000 4 | 78.8090000 45.2710000 82.5120000 78.2860000 46.0370000 81.9480000 5 | 79.6430000 45.6810000 83.5720000 79.7970000 46.7160000 83.8630000 6 | 80.3430000 44.7090000 84.3320000 80.8140000 45.1010000 85.2290000 7 | 80.2550000 43.3430000 84.0440000 80.5590000 42.6010000 84.7770000 8 | 79.5180000 42.9490000 82.8950000 79.0040000 41.1000000 82.6640000 9 | 78.7912699 40.3347512 82.5683956 79.3075200 45.6539600 83.8464120 10 | 79.9784800 45.7080400 83.2975880 78.4837400 45.2188470 82.7880845 11 | 79.1342600 45.3231530 82.2359155 78.3995745 43.8546897 82.4501130 12 | 79.0644255 43.9633102 81.8778870 79.1702365 42.8579082 83.1493010 13 | 79.8657635 43.0400918 82.6406990 79.8909845 43.3152140 84.2870175 14 | 80.6190155 43.3707860 83.8009825 80.0134760 44.6753200 84.5924340 15 | 80.6725240 44.7426800 84.0715660 16 | 50.0000000 50.0000000 50.0000000 90.0000000 90.0000000 90.0000000 17 | -------------------------------------------------------------------------------- /apps/Gbsa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(APP_NAME "mmgbsa.${STORMM_APP_SUFFIX}") 2 | 3 | add_executable(${APP_NAME} 4 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_analysis.cpp 5 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_analysis.h 6 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_carveout.cpp 7 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_carveout.h 8 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_problem_set.cpp 9 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_problem_set.h 10 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_testing.cpp 11 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_testing.h 12 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_enumerators.cpp 13 | ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa_enumerators.h 14 | ${CMAKE_CURRENT_SOURCE_DIR}/src/nml_mmgbsa.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/src/nml_mmgbsa.h) 16 | 17 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/mmgbsa.cpp) 18 | 19 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 20 | 21 | install(TARGETS ${APP_NAME} 22 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 23 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_L1.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 28 3 | 1.2080000 0.6970000 0.0000000 2.1490000 1.2410000 0.0000000 4 | 0.0000000 1.3950000 0.0000000 0.0000000 2.4820000 0.0000000 5 | -1.2080000 0.6980000 0.0000000 -2.1490000 1.2410000 0.0000000 6 | -1.2080000 -0.6980000 0.0000000 0.0000000 -1.3950000 0.0000000 7 | 0.0000000 -2.8230000 0.0000000 1.2080000 -0.6980000 0.0000000 8 | -3.5940000 -4.8980000 -0.0010000 -4.5350000 -5.4410000 -0.0020000 9 | -3.0840000 -4.3850000 -1.1940000 -3.6290000 -4.5290000 -2.1240000 10 | -1.8770000 -3.6880000 -1.1940000 -1.1780000 -3.5030000 0.0000000 11 | -1.6880000 -4.0160000 1.1930000 -2.8960000 -4.7130000 1.1930000 12 | -3.2930000 -5.1120000 2.1220000 3.5940000 -4.8980000 -0.0010000 13 | 4.5350000 -5.4410000 -0.0020000 2.9480000 -4.6220000 -1.2060000 14 | 3.3850000 -4.9510000 -2.1450000 1.7400000 -3.9250000 -1.2060000 15 | 1.1780000 -3.5030000 0.0000000 1.8240000 -3.7790000 1.2040000 16 | 3.0320000 -4.4760000 1.2050000 3.5360000 -4.6910000 2.1430000 17 | -------------------------------------------------------------------------------- /src/Math/sorting_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "sorting_enumerators.h" 3 | 4 | namespace stormm { 5 | namespace stmath { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | std::string getEnumerationName(SortDirection input) { 9 | switch (input) { 10 | case SortDirection::ASCENDING: 11 | return std::string("ASCENDING"); 12 | case SortDirection::DESCENDING: 13 | return std::string("DESCENDING"); 14 | case SortDirection::AUTOMATIC: 15 | return std::string("AUTOMATIC"); 16 | } 17 | __builtin_unreachable(); 18 | }; 19 | 20 | //------------------------------------------------------------------------------------------------- 21 | std::string getEnumerationName(UniqueValueHandling input) { 22 | switch (input) { 23 | case UniqueValueHandling::UNIQUE_VALUES_ONLY: 24 | return std::string("UNIQUE_VALUES_ONLY"); 25 | case UniqueValueHandling::CONFIRM_ALL_COPIES: 26 | return std::string("CONFIRM_ALL_COPIES"); 27 | } 28 | __builtin_unreachable(); 29 | } 30 | 31 | } // namespace stmath 32 | } // namespace stormm 33 | -------------------------------------------------------------------------------- /src/FileManagement/file_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "file_enumerators.h" 3 | 4 | namespace stormm { 5 | namespace diskutil { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | std::string getEnumerationName(const PrintSituation input) { 9 | switch (input) { 10 | case PrintSituation::OPEN_NEW: 11 | return std::string("OPEN_NEW"); 12 | case PrintSituation::APPEND: 13 | return std::string("APPEND"); 14 | case PrintSituation::OVERWRITE: 15 | return std::string("OVERWRITE"); 16 | case PrintSituation::UNKNOWN: 17 | return std::string("UNKNOWN"); 18 | } 19 | __builtin_unreachable(); 20 | } 21 | 22 | //------------------------------------------------------------------------------------------------- 23 | std::string getEnumerationName(const DataFormat input) { 24 | switch (input) { 25 | case DataFormat::ASCII: 26 | return std::string("ASCII"); 27 | case DataFormat::BINARY: 28 | return std::string("BINARY"); 29 | } 30 | __builtin_unreachable(); 31 | } 32 | 33 | } // namespace diskutil 34 | } // namespace stormm 35 | -------------------------------------------------------------------------------- /test/Chemistry/lig2_c8h8.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 29 3 | 1.7670000 0.7630000 -0.1570000 0.7810000 1.7470000 -0.3200000 4 | 1.1620000 2.7290000 -0.4410000 -0.6160000 1.7060000 -0.3530000 5 | -1.0150000 2.6790000 -0.4910000 -1.6410000 0.7610000 -0.2630000 6 | -2.6030000 1.1960000 -0.3510000 -1.6530000 -0.6310000 -0.0810000 7 | -3.0720000 -1.2010000 -0.0590000 -3.0950000 -2.2330000 -0.3790000 8 | -3.6920000 -0.7020000 -0.7920000 -3.7750000 -1.0840000 1.3060000 9 | -3.0630000 -1.7230000 2.3580000 -3.2130000 -3.1330000 2.3760000 10 | -2.6600000 -3.5380000 3.2230000 -2.8210000 -3.5720000 1.4590000 11 | -4.2660000 -3.3950000 2.4840000 -4.7860000 -1.4900000 1.2460000 12 | -3.8630000 -0.0280000 1.5620000 -0.6660000 -1.6100000 0.1090000 13 | -1.0440000 -2.5920000 0.2390000 0.7300000 -1.5660000 0.1670000 14 | 1.1280000 -2.5340000 0.3370000 1.7560000 -0.6230000 0.0610000 15 | 2.7170000 -1.0560000 0.1700000 3.1770000 1.3420000 -0.2040000 16 | 3.9310000 0.6250000 -0.4980000 3.4770000 1.7260000 0.7610000 17 | 3.2710000 2.1620000 -0.9030000 18 | -------------------------------------------------------------------------------- /test/Chemistry/anthracene_like.inpcrd: -------------------------------------------------------------------------------- 1 | MOL 2 | 29 3 | 1.2260000 0.7170000 -0.0020000 0.0050000 1.3990000 -0.0030000 4 | 0.0020000 2.4570000 -0.0030000 -1.2120000 0.7090000 -0.0020000 5 | -1.2040000 -0.7250000 -0.0020000 0.0180000 -1.4020000 -0.0020000 6 | 0.0250000 -2.4610000 -0.0010000 1.2330000 -0.7090000 -0.0020000 7 | 2.4870000 -1.3910000 -0.0010000 2.4940000 -2.4500000 0.0000000 8 | 3.6650000 -0.6940000 -0.0000000 4.5930000 -1.2060000 0.0010000 9 | 3.6590000 0.7250000 -0.0010000 4.5820000 1.2460000 -0.0010000 10 | 2.4740000 1.4110000 -0.0020000 2.4710000 2.4700000 -0.0030000 11 | -2.4510000 -1.4300000 -0.0010000 -2.4510000 -2.4890000 -0.0010000 12 | -3.6230000 -0.7310000 -0.0000000 -3.6310000 0.6840000 -0.0000000 13 | -2.4620000 1.4000000 -0.0010000 -2.4800000 2.4580000 -0.0020000 14 | -5.0030000 1.1250000 0.0010000 -5.3010000 2.1420000 0.0020000 15 | -5.8380000 0.0740000 0.0020000 -6.8960000 0.1370000 0.0030000 16 | -5.0600000 -1.2300000 0.0010000 -5.2720000 -1.8180000 -0.8810000 17 | -5.2710000 -1.8190000 0.8830000 18 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_ala.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 29 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.3690784 7.9157062 0.0000058 11 | 5.9069226 8.3431801 -0.8898128 5.7350057 8.5524127 1.2321507 12 | 6.1938923 8.1410404 2.1312035 5.8915580 9.6307897 1.2057953 13 | 4.6657166 8.3411435 1.2413876 7.8481527 8.2746257 0.0000005 14 | 8.7040459 7.3926465 -0.0000060 8.1019685 9.5852753 0.0000017 15 | 7.3408707 10.2492252 0.0000060 9.4552698 10.1031343 -0.0000012 16 | 10.1623006 9.2735512 -0.0000071 9.6114807 10.7129846 -0.8898221 17 | 9.6114878 10.7129749 0.8898249 18 | -------------------------------------------------------------------------------- /src/UnitTesting/vector_report.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace testing { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | std::string listItemsAsString(const std::vector &list, const size_t maximum_items, 10 | const bool spread) { 11 | std::string result; 12 | const size_t n_display = std::min(maximum_items, list.size()); 13 | if (n_display == maximum_items) { 14 | for (size_t i = 0; i < n_display; i++) { 15 | result += std::to_string(list[i]) + listSeparator(i, n_display); 16 | } 17 | } 18 | else { 19 | if (spread) { 20 | double prog = 0.0; 21 | const double frac = static_cast(list.size()) / static_cast(n_display); 22 | for (int i = 0; i < n_display; i++) { 23 | const size_t idx = static_cast(prog); 24 | result += std::to_string(list[idx]) + listSeparator(i, n_display); 25 | prog += frac; 26 | } 27 | } 28 | } 29 | return result; 30 | } 31 | 32 | } // namespace testing 33 | } // namespace stormm 34 | -------------------------------------------------------------------------------- /apps/Dyna/test/WaterTest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > md.in << EOF 4 | &files 5 | -sys { -p ${STORMM_SOURCE}/test/Topology/tip3p.top 6 | -c ${STORMM_SOURCE}/test/Trajectory/tip3p.inpcrd 7 | -label TIP3P -n 1 } 8 | -sys { -p ${STORMM_SOURCE}/test/Topology/tip4p.top 9 | -c ${STORMM_SOURCE}/test/Trajectory/tip4p.inpcrd 10 | -label TIP3P_II -n 1 } 11 | -sys { -p ${STORMM_SOURCE}/test/Topology/ubiquitin.top 12 | -c ${STORMM_SOURCE}/test/Trajectory/ubiquitin.inpcrd 13 | -label UBI -n 1 } 14 | -o mdn.out 15 | &end 16 | 17 | &dynamics 18 | nstlim = 1000, ntpr = 1, ntwx = 0, dt = 1.0, 19 | ntt = 0, 20 | rigid_geom on, 21 | temperature = { tempi 100.0, temp0 300.0, -label TIP3P }, 22 | temperature = { tempi 100.0, temp0 400.0, -label TIP3P_II }, 23 | temperature = { tempi 300.0, temp0 200.0, -label UBI }, 24 | tevo_start = 250, tevo_end = 750, 25 | tcache_depth 1, 26 | &end 27 | 28 | &precision 29 | nonbonded double, 30 | valence double, 31 | &end 32 | 33 | &report 34 | syntax = Matlab, 35 | energy total, 36 | &end 37 | EOF 38 | 39 | ${STORMM_BUILD}/apps/Dyna/dynamics.stormm -O -i md.in -except warn 40 | -------------------------------------------------------------------------------- /src/Trajectory/barostat.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "barostat.h" 3 | 4 | namespace stormm { 5 | namespace trajectory { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | Barostat::Barostat() : 9 | kind{BarostatKind::NONE} 10 | {} 11 | 12 | //------------------------------------------------------------------------------------------------- 13 | Barostat::Barostat(const BarostatKind kind_in) : 14 | kind{kind_in} 15 | {} 16 | 17 | //------------------------------------------------------------------------------------------------- 18 | BarostatKind Barostat::getKind() const { 19 | return kind; 20 | } 21 | 22 | //------------------------------------------------------------------------------------------------- 23 | std::string getBarostatName(const BarostatKind kind) { 24 | switch (kind) { 25 | case BarostatKind::NONE: 26 | return std::string("NONE"); 27 | case BarostatKind::MONTE_CARLO: 28 | return std::string("MONTE_CARLO"); 29 | case BarostatKind::BERENDSEN: 30 | return std::string("BERENDSEN"); 31 | } 32 | __builtin_unreachable(); 33 | } 34 | 35 | } // namespace trajectory 36 | } // namespace stormm 37 | -------------------------------------------------------------------------------- /src/Synthesis/atomgraph_synthesis.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace synthesis { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | std::vector AtomGraphSynthesis::getPartialCharges(const HybridTargetLevel tier) const { 10 | const int high_pos = atom_offsets.readHost(system_count - 1) + 11 | atom_counts.readHost(system_count - 1); 12 | return getRealParameters(atomic_charges, sp_atomic_charges, tier, 0, high_pos, 13 | "getPartialCharges"); 14 | } 15 | 16 | //------------------------------------------------------------------------------------------------- 17 | template 18 | std::vector AtomGraphSynthesis::getAtomicMasses(const HybridTargetLevel tier) const { 19 | const int high_pos = atom_offsets.readHost(system_count - 1) + 20 | atom_counts.readHost(system_count - 1); 21 | return getRealParameters(atomic_masses, sp_atomic_masses, tier, 0, high_pos, 22 | "getAtomicMasses"); 23 | } 24 | 25 | } // namespace synthesis 26 | } // namespace stormm 27 | -------------------------------------------------------------------------------- /src/Structure/mesh_foundation.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace structure { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | const CoordinateSeries* MeshFoundation::getEnsemblePointer() const { 10 | return reinterpret_cast*>(cf_ensemble); 11 | } 12 | 13 | //------------------------------------------------------------------------------------------------- 14 | template 15 | void MeshFoundation::setEnsemble(const CoordinateSeries *cs_in) { 16 | const CoordinateSeries *cs_voided = reinterpret_cast*>(cs_in); 17 | cf_ensemble = const_cast*>(cs_voided); 18 | ensemble_data_type = std::type_index(typeid(T)).hash_code(); 19 | testReadiness(); 20 | } 21 | 22 | //------------------------------------------------------------------------------------------------- 23 | template 24 | void MeshFoundation::setEnsemble(const CoordinateSeries &cs_in) { 25 | setEnsemble(cs_in.getSelfPointer()); 26 | testReadiness(); 27 | } 28 | 29 | } // namespace structure 30 | } // namespace stormm 31 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/MET_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 29 0.0000000E+00 3 | 1.9553373 1.2429582 0.6425383 2.0019546 2.2109665 0.1455012 4 | 1.2953817 2.8955489 0.6105518 1.7648639 2.0913424 -0.9098395 5 | 3.4005172 2.7645793 0.2833612 4.2580495 2.1302491 0.8832062 6 | 3.6280318 3.9546467 -0.2681534 2.8648303 4.4309114 -0.7263900 7 | 4.9192978 4.6492171 -0.2446836 5.4468053 4.3749002 0.6700835 8 | 5.7630821 4.1842917 -1.4463597 5.8972169 3.1032193 -1.3835948 9 | 5.2279707 4.4091510 -2.3704274 7.1477237 4.8383358 -1.5111068 10 | 7.0299939 5.9120228 -1.6588137 7.6600221 4.6691349 -0.5634999 11 | 8.1911296 4.1986098 -2.8467893 9.6773227 5.2014924 -2.5867265 12 | 10.0770059 5.0138087 -1.5900725 10.4277973 4.9345700 -3.3311616 13 | 9.4298546 6.2582722 -2.6886907 4.7102940 6.1706871 -0.2380657 14 | 3.7839433 6.6686660 -0.8743848 5.5734534 6.9073188 0.4731442 15 | 6.2983955 6.4267984 0.9825988 5.5166884 8.3648885 0.5676766 16 | 4.5451189 8.6706811 0.9617559 6.3037772 8.7339281 1.2266358 17 | 5.6411994 8.8036285 -0.4245036 18 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/MET_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 29 0.0000000E+00 3 | 1.9682259 1.2417328 0.6113980 2.0116619 2.2214756 0.1374192 4 | 1.3083589 2.8946247 0.6236378 1.7672349 2.1269873 -0.9188359 5 | 3.4113932 2.7714658 0.2787214 4.2725317 2.1235605 0.8584728 6 | 3.6354705 3.9745182 -0.2454703 2.8716000 4.4574385 -0.6954558 7 | 4.9331846 4.6571475 -0.2358696 5.4606867 4.3935557 0.6820140 8 | 5.7681479 4.1681813 -1.4340450 5.9034835 3.0885267 -1.3529096 9 | 5.2288594 4.3776649 -2.3593571 7.1513385 4.8236870 -1.5140964 10 | 7.0308104 5.8955787 -1.6726630 7.6691693 4.6662360 -0.5675068 11 | 8.1884481 4.1704170 -2.8480674 9.6723848 5.1822172 -2.6104695 12 | 10.0789387 5.0092427 -1.6139316 10.4192202 4.9083770 -3.3560448 13 | 9.4199114 6.2365515 -2.7247599 4.7348991 6.1791784 -0.2620960 14 | 3.8578708 6.6748766 -0.9661495 5.5459781 6.9171789 0.5063609 15 | 6.2291303 6.4374094 1.0712537 5.4892675 8.3756641 0.5859276 16 | 4.4977405 8.6878515 0.9206203 6.2384140 8.7472969 1.2863941 17 | 5.6726982 8.8061821 -0.4007014 18 | -------------------------------------------------------------------------------- /test/Namelists/coord/phe.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 32 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.8779692 4.5615506 -0.0000043 5.4199376 4.2412526 0.8898151 8 | 5.6696596 4.1364944 -1.2321480 5.7736249 3.0515036 -1.2413850 9 | 5.1440544 4.4582737 -2.1312016 7.0657177 4.7050121 -1.3210917 10 | 7.8846836 4.3828311 -2.4098952 7.5145591 3.7216033 -3.1934037 11 | 9.1790426 4.9099324 -2.4923589 9.8166665 4.6590933 -3.3400713 12 | 9.6544367 5.7592156 -1.4860202 10.6621870 6.1696022 -1.5502240 13 | 8.8354728 6.0813986 -0.3972148 9.2056003 6.7426272 0.3862918 14 | 7.5411129 5.5542993 -0.3147480 6.9034912 5.8051423 0.5329643 15 | 4.7980504 6.0814509 0.0000014 3.7078162 6.6487512 0.0000062 16 | 5.9810245 6.7001572 0.0000023 6.8352096 6.1612072 -0.0000007 17 | 6.0894183 8.1450976 0.0000059 5.0920360 8.5847897 0.0000102 18 | 6.6289398 8.4694955 0.8898279 6.6289315 8.4695000 -0.8898191 19 | -------------------------------------------------------------------------------- /src/Potential/convolution_manager.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace energy { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | ConvolutionKit::ConvolutionKit(const int system_count_in, const T ew_coeff_in, 10 | const int* sys_offsets_in, const T* self_ecorr_in, 11 | const T* bmesh_a_in, const T* bmesh_b_in, const T* bmesh_c_in, 12 | const T* mval_a_in, const T* mval_b_in, const T* mval_c_in, 13 | const T* msval_a_in, const T* msval_b_in, const T* msval_c_in, 14 | const T* cmesh_a_in, const T* cmesh_b_in, const T* cmesh_c_in) : 15 | system_count{system_count_in}, ew_coeff{ew_coeff_in}, sys_offsets{sys_offsets_in}, 16 | self_ecorr{self_ecorr_in}, bmesh_a{bmesh_a_in}, bmesh_b{bmesh_b_in}, bmesh_c{bmesh_c_in}, 17 | mval_a{mval_a_in}, mval_b{mval_b_in}, mval_c{mval_c_in}, msval_a{msval_a_in}, 18 | msval_b{msval_b_in}, msval_c{msval_c_in}, cmesh_a{cmesh_a_in}, cmesh_b{cmesh_b_in}, 19 | cmesh_c{cmesh_c_in} 20 | {} 21 | 22 | } // namespace energy 23 | } // namespace stormm 24 | -------------------------------------------------------------------------------- /apps/Dyna/test/AminoAcidTest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > md.in << EOF 4 | &files 5 | -sys { -p ${STORMM_SOURCE}/test/Namelists/topol/gly_arg.top 6 | -c ${STORMM_SOURCE}/test/Namelists/coord/gly_arg.inpcrd 7 | -label GlyArg -n 16 } 8 | -sys { -p ${STORMM_SOURCE}/test/Namelists/topol/gly_arg.top 9 | -c ${STORMM_SOURCE}/test/Namelists/coord/gly_arg.inpcrd 10 | -label GlyArg_II -n 50 } 11 | -sys { -p ${STORMM_SOURCE}/test/Namelists/topol/gly_arg.top 12 | -c ${STORMM_SOURCE}/test/Namelists/coord/gly_arg.inpcrd 13 | -label GlyArg_III -n 50 } 14 | -o mdn.out 15 | &end 16 | 17 | &minimize 18 | cdcyc 20, ncyc 40, maxcyc 60, 19 | ntpr 1, 20 | &end 21 | 22 | &dynamics 23 | nstlim = 2000, ntpr = 25, ntwx = 0, dt = 1.0, 24 | ntt = 0, 25 | rigid_geom on, 26 | temperature = { tempi 100.0, temp0 300.0, -label GlyArg }, 27 | temperature = { tempi 100.0, temp0 400.0, -label GlyArg_II }, 28 | temperature = { tempi 300.0, temp0 200.0, -label GlyArg_III }, 29 | tevo_start = 250, tevo_end = 750, 30 | tcache_depth 1, 31 | &end 32 | 33 | &solvent 34 | igb = 8, 35 | &end 36 | 37 | &report 38 | syntax = Matlab, 39 | energy total, 40 | &end 41 | EOF 42 | 43 | ${STORMM_BUILD}/apps/Dyna/dynamics.stormm -O -i md.in -except warn 44 | -------------------------------------------------------------------------------- /test/Namelists/coord/tyr.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 33 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.8779692 4.5615506 -0.0000043 5.4199376 4.2412526 0.8898151 8 | 5.6696596 4.1364944 -1.2321480 5.7736249 3.0515036 -1.2413850 9 | 5.1440544 4.4582737 -2.1312016 7.0386024 4.7726645 -1.1949507 10 | 7.9522218 4.5285625 -2.2272851 7.6753635 3.8792886 -3.0578826 11 | 9.2214401 5.1183884 -2.1927958 9.9327579 4.9283381 -2.9965431 12 | 9.5770420 5.9523171 -1.1259740 10.8099970 6.5252916 -1.0924717 13 | 11.3534144 6.2904625 -1.8482181 8.6634246 6.1964219 -0.0936386 14 | 8.9402850 6.8456958 0.7369589 7.3942054 5.6065981 -0.1281229 15 | 6.6828888 5.7966523 0.6756234 4.7980504 6.0814509 0.0000014 16 | 3.7078162 6.6487512 0.0000062 5.9810245 6.7001572 0.0000023 17 | 6.8352096 6.1612072 -0.0000007 6.0894183 8.1450976 0.0000059 18 | 5.0920360 8.5847897 0.0000102 6.6289398 8.4694955 0.8898279 19 | 6.6289315 8.4695000 -0.8898191 20 | -------------------------------------------------------------------------------- /test/Trajectory/biotin.inpcrd: -------------------------------------------------------------------------------- 1 | BTN 2 | 31 3 | 20.1560000 28.4050000 8.9620000 19.9850000 28.2160000 7.7370000 4 | 20.7600000 27.5300000 9.6280000 19.6220000 29.6740000 9.6020000 5 | 19.1230000 29.4580000 11.0360000 17.8900000 28.5630000 11.0560000 6 | 17.4040000 28.3260000 12.4820000 16.1210000 27.4730000 12.4680000 7 | 14.7130000 28.2680000 11.9470000 13.7570000 26.8330000 12.4920000 8 | 14.3220000 26.4520000 13.8460000 13.7620000 27.2580000 14.9080000 9 | 14.6760000 28.0520000 15.4420000 14.4160000 28.8810000 16.5260000 10 | 15.8640000 27.8480000 14.9240000 15.7830000 26.8770000 13.8430000 11 | 20.3210000 30.3470000 9.6060000 18.8960000 30.0220000 9.0610000 12 | 16.5870000 28.2330000 15.1860000 12.9400000 27.2250000 15.1600000 13 | 19.8270000 29.0570000 11.5700000 18.9120000 30.3140000 11.4410000 14 | 17.1820000 28.9720000 10.5340000 18.0970000 27.7130000 10.6370000 15 | 18.0940000 27.8780000 12.9960000 17.2320000 29.1750000 12.9180000 16 | 12.8130000 27.0470000 12.5560000 13.8390000 26.1000000 11.8620000 17 | 14.1480000 25.5080000 13.9860000 16.4180000 26.1570000 13.9820000 18 | 16.3550000 26.7880000 11.8220000 19 | 32.7500000 32.7500000 32.7500000 90.0000000 90.0000000 90.0000000 20 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/GLY_SER_MET_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 30 0.0000000E+00 3 | 2.1238308 0.9272180 -0.2073711 2.0633619 2.0139932 -0.2377259 4 | 1.3999279 2.3653765 0.5499265 1.6897658 2.3322510 -1.2089413 5 | 3.4446972 2.5857142 -0.0206122 4.3987244 1.8404988 0.1573154 6 | 3.5508833 3.9116123 -0.0330679 2.7227688 4.4694096 -0.1855724 7 | 4.8097135 4.6350479 0.1552955 5.2380137 4.3628729 1.1200808 8 | 5.5086934 4.3461118 -0.6300206 4.6199635 6.1533566 0.1103786 9 | 3.5043484 6.6400965 -0.0658773 5.7121196 6.9025190 0.2734666 10 | 6.6065156 6.4414514 0.3838566 5.7577984 8.3714250 0.2029599 11 | 5.2150160 8.6921014 -0.6873265 5.0621630 8.9807128 1.4312732 12 | 4.0615235 8.5579847 1.5286942 5.6326909 8.7408439 2.3301347 13 | 4.9429982 10.3858444 1.3049937 4.3452414 10.7011580 1.9914549 14 | 7.2134411 8.8540860 0.0679547 8.1375069 8.0430230 0.1361801 15 | 7.4235463 10.1588522 -0.1361628 6.6075505 10.7563613 -0.0942632 16 | 8.7372007 10.7767117 -0.3068827 9.3726067 10.1365282 -0.9229904 17 | 8.6346465 11.7494819 -0.7902247 9.2113059 10.9051247 0.6674959 18 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_pro.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 33 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1472065 6.5549868 0.0000025 10 | 7.3785100 5.7741824 -0.0000015 7.5982245 5.4412500 -1.0143889 11 | 7.2591130 4.9064740 0.6487862 8.3981841 6.7425695 0.5220045 12 | 9.3346144 6.5968241 -0.0164707 8.5616613 6.5738554 1.5863880 13 | 7.8290251 8.1193393 0.2757062 8.3267866 8.5647462 -0.5856563 14 | 7.9996031 8.7408286 1.1547703 6.3034111 7.9975541 0.0000062 15 | 5.8537961 8.4466986 0.8855647 5.6884587 8.6138808 -1.2483765 16 | 5.0954594 7.9110451 -2.0637378 5.8312984 9.9329500 -1.3962895 17 | 6.3270453 10.4706384 -0.6997081 5.2914424 10.6379685 -2.5413252 18 | 4.7881082 9.9303568 -3.2001430 4.5779070 11.3892116 -2.2027967 19 | 6.1016321 11.1254344 -3.0836071 20 | -------------------------------------------------------------------------------- /src/Numerics/host_bit_counting.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HOSE_POPC_H 3 | #define STORMM_HOSE_POPC_H 4 | 5 | #include "copyright.h" 6 | #include "DataTypes/common_types.h" 7 | 8 | namespace stormm { 9 | namespace numerics { 10 | 11 | /// \brief Count the number of active bits in a short unsigned integer. 12 | /// 13 | /// \param x The integer to analyze 14 | int hostPopcs(ushort x); 15 | 16 | /// \brief Count the number of active bits in a long unsigned integer. 17 | /// 18 | /// \param x The integer to analyze 19 | int hostPopc(uint x); 20 | 21 | /// \brief Count the number of active bits in a long long unsigned integer. 22 | /// 23 | /// \param x The integer to analyze 24 | int hostPopcll(ullint x); 25 | 26 | /// \brief Find the position of the first bit set to one in a short unsigned integer. 27 | /// 28 | /// \param x The integer to analyze 29 | int hostFfss(ushort x); 30 | 31 | /// \brief Find the position of the first bit set to one in a long unsigned integer. 32 | /// 33 | /// \param x The integer to analyze 34 | int hostFfs(uint x); 35 | 36 | /// \brief Find the position of the first bit set to one in a long long unsigned integer. 37 | /// 38 | /// \param x The integer to analyze 39 | int hostFfsll(ullint x); 40 | 41 | } // namespace numerics 42 | } // namespace stormm 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/Trajectory/barostat.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_BAROSTAT_H 3 | #define STORMM_BAROSTAT_H 4 | 5 | #include 6 | #include "copyright.h" 7 | 8 | namespace stormm { 9 | namespace trajectory { 10 | 11 | /// \brief Enumerate the available barostat types 12 | enum class BarostatKind { 13 | NONE, MONTE_CARLO, BERENDSEN 14 | }; 15 | 16 | /// \brief Store the parameters for a simulation barostat. Includes Monte-Carlo and Berendesen 17 | /// barostats with atomic virials. 18 | class Barostat { 19 | public: 20 | 21 | /// \brief The constructor can be blank (implying a barostat of kind NONE), take a specific 22 | /// barostat kind (implying default settings for that type of piston), or take specific 23 | /// settings for all aspects of the barostat. 24 | /// \{ 25 | Barostat(); 26 | Barostat(BarostatKind kind); 27 | /// \} 28 | 29 | /// \brief Get the kind of barostat 30 | BarostatKind getKind() const; 31 | 32 | private: 33 | BarostatKind kind; ///< The type of barostat 34 | }; 35 | 36 | /// \brief Return the name of the barostat choice (another enumerator string conversion function) 37 | /// 38 | /// \param kind The type of barostat 39 | std::string getBarostatName(BarostatKind kind); 40 | 41 | } // namespace trajectory 42 | } // namespace stormm 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/Trajectory/hpc_coordinate_graft.cu: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | #include "coordinate_graft.h" 4 | #include "hpc_coordinate_graft.cuh" 5 | 6 | namespace stormm { 7 | namespace trajectory { 8 | 9 | //------------------------------------------------------------------------------------------------- 10 | void launchGraftCoordXYZ(TrajectoryKind kind, void* xdest, void* ydest, void *zdest, 11 | const double dest_scale, const void* xorig, const void* yorig, 12 | const void* zorig, const double orig_scale, const int2* atom_list, 13 | const int nxfer, const size_t dest_type_index, 14 | const size_t orig_type_index) { 15 | if (dest_type_index == double_type_index) { 16 | #if 0 17 | double* d_xdest = reinterpret_cast(xdest); 18 | double* d_ydest = reinterpret_cast(ydest); 19 | double* d_zdest = reinterpret_cast(zdest); 20 | #endif 21 | } 22 | else if (dest_type_index == float_type_index) { 23 | 24 | } 25 | else if (dest_type_index == int_type_index) { 26 | 27 | } 28 | else if (dest_type_index == llint_type_index) { 29 | 30 | } 31 | else if (dest_type_index == short_type_index) { 32 | 33 | } 34 | } 35 | 36 | } // namespace trajectory 37 | } // namespace stormm 38 | -------------------------------------------------------------------------------- /src/Structure/rmsd_plan.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace structure { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | RMSDPlanReader::RMSDPlanReader(const int plan_count_in, const RMSDMethod strategy_in, 10 | const double mass_fraction_in, const T* masses_in, 11 | const int* atom_counts_in, const int* atom_starts_in, 12 | const int* alignment_steps_in, const int* core_atoms_in, 13 | const int* core_counts_in, const int* core_starts_in, 14 | const int* symm_atoms_in, const int4* symm_bounds_in, 15 | const int2* symm_ranges_in) : 16 | plan_count{plan_count_in}, strategy{strategy_in}, mass_fraction{mass_fraction_in}, 17 | masses{masses_in}, atom_counts{atom_counts_in}, atom_starts{atom_starts_in}, 18 | alignment_steps{alignment_steps_in}, core_atoms{core_atoms_in}, core_counts{core_counts_in}, 19 | core_starts{core_starts_in}, symm_atoms{symm_atoms_in}, symm_bounds{symm_bounds_in}, 20 | symm_ranges{symm_ranges_in} 21 | {} 22 | 23 | } // namespace structure 24 | } // namespace stormm 25 | -------------------------------------------------------------------------------- /test/Namelists/coord/lys.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 34 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9114589 4.4801775 -0.0000043 5.4329859 4.1275726 0.8898151 8 | 5.6758885 4.0078494 -1.2321480 5.7138030 2.9185485 -1.2413851 9 | 5.1707846 4.3609396 -2.1312016 7.0948795 4.5652339 -1.1945817 10 | 7.0577854 5.6545675 -1.1857917 7.6008058 4.2121752 -0.2959771 11 | 7.8593093 4.0929078 -2.4267263 7.8972228 3.0036071 -2.4359653 12 | 7.3542055 4.4460001 -3.3257789 9.2783012 4.6502913 -2.3891580 13 | 9.2412081 5.7396248 -2.3803669 9.7842262 4.2972297 -1.4905554 14 | 10.0151600 4.1950014 -3.5768655 9.5467607 4.5224153 -4.4096331 15 | 10.9549518 4.5641523 -3.5519843 10.0500155 3.1856360 -3.5849775 16 | 4.9239457 6.0021263 0.0000014 3.8701570 6.6345579 0.0000062 17 | 6.1286966 6.5772787 0.0000024 6.9626583 6.0075357 -0.0000006 18 | 6.2897143 8.0173049 0.0000060 5.3090307 8.4930783 0.0000103 19 | 6.8407074 8.3218110 0.8898280 6.8406994 8.3218159 -0.8898190 20 | -------------------------------------------------------------------------------- /src/Accelerator/hpc_hybrid_util.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HPC_HYBRID_UTIL_H 3 | #define STORMM_HPC_HYBRID_UTIL_H 4 | 5 | #include "copyright.h" 6 | #include "gpu_details.h" 7 | #include "hybrid.h" 8 | 9 | namespace stormm { 10 | namespace card { 11 | 12 | /// \brief Launch one of the overloaded, templated kernels to perform deep copies and possibly 13 | /// type conversions. 14 | /// 15 | /// \{ 16 | void launchDeepCopy(void* vdest_host, void* vdest_devc, const void* vorig_host, 17 | const void* vorig_devc, const size_t dest_offset, const size_t orig_offset, 18 | const size_t length, const size_t ct, const bool do_hdc, const bool do_dhc, 19 | const bool do_ddc, const GpuDetails &gpu, const int dest_bits, 20 | const int orig_bits); 21 | 22 | void launchDeepCopy(void* vdest_host, void* vdest_devc, const void* vorig_host, 23 | const void* vorig_devc, const size_t dest_offset, const size_t orig_offset, 24 | const size_t length, const size_t dest_ct, const size_t orig_ct, 25 | const bool do_hdc, const bool do_dhc, const bool do_ddc, const GpuDetails &gpu, 26 | const int dest_bits, const int orig_bits); 27 | /// \} 28 | 29 | } // namespace card 30 | } // namespace stormm 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Chemistry/residue_dictionary.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include 3 | #include 4 | #include "copyright.h" 5 | #include "DataTypes/stormm_vector_types.h" 6 | 7 | namespace stormm { 8 | namespace chemistry { 9 | 10 | /// \brief Determine whether a residue conforms to known amino acid names. 11 | /// 12 | /// Overloaded: 13 | /// - Provide a four-character tuple, which will be parsed in various ways to find a valid match 14 | /// - Provide three individual characters, which must be capitalized to be recognized as a match 15 | /// 16 | /// \param rx The first letter of the amino acid's three-letter code 17 | /// \param ry The seoncd letter of the amino acid's three-letter code 18 | /// \param rz The third letter of the amino acid's three-letter code 19 | /// \param residue_name Four-letter coded name of the residue of interest 20 | /// \{ 21 | bool isAminoAcid(char rx, char ry, char rz); 22 | bool isAminoAcid(const char4 residue_name); 23 | /// \} 24 | 25 | /// \brief Determine whether a residue conforms to known nucleic acid names. Overloading and 26 | /// descriptions of input parameters follow from isAminoAcid(), above. 27 | /// \{ 28 | bool isNucleicAcid(char rx, char ry, char rz); 29 | bool isNucleicAcid(char4 residue_name); 30 | /// \} 31 | 32 | } // namespace chemistry 33 | } // namespace stormm 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------------------- 2 | // Copyright (c) 2024, Psivant Therapeutics 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | // and associated documentation files (the "Software"), to deal in the Software without 6 | // restriction, including without limitation the rights to use, copy, modify, merge, publish, 7 | // distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all copies or 11 | // substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 14 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 16 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | //------------------------------------------------------------------------------------------------- 19 | 20 | -------------------------------------------------------------------------------- /src/copyright.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------------------- 2 | // Copyright (c) 2024, Psivant Therapeutics 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | // and associated documentation files (the "Software"), to deal in the Software without 6 | // restriction, including without limitation the rights to use, copy, modify, merge, publish, 7 | // distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all copies or 11 | // substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 14 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 16 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | //------------------------------------------------------------------------------------------------- 19 | 20 | -------------------------------------------------------------------------------- /src/Trajectory/write_annotated_frame.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace trajectory { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | void writeFrame(std::ofstream *foutp, const TextFile &tf, const CoordinateSeries &cs, 10 | const CoordinateSwapPlan &excision) { 11 | const int nframe = cs.getFrameCount(); 12 | CoordinateFrame stage(cs.getAtomCount()); 13 | CoordinateFrameWriter stagew = stage.data(); 14 | for (int i = 0; i < nframe; i++) { 15 | cs.extractFrame(&stage, i); 16 | writeFrame(foutp, tf, stagew.xcrd, stagew.ycrd, stagew.zcrd, excision); 17 | } 18 | } 19 | 20 | //------------------------------------------------------------------------------------------------- 21 | template 22 | void writeFrame(const std::string &filename, PrintSituation expectation, const TextFile &tf, 23 | const CoordinateSeries &cs, const CoordinateSwapPlan &excision) { 24 | std::ofstream foutp = openOutputFile(filename, expectation, "Open an archive for writing all " 25 | "frames of a CoordinateSeries in an annotated format."); 26 | writeFrame(&foutp, tf, cs, excision); 27 | foutp.close(); 28 | } 29 | 30 | } // namespace trajectory 31 | } // namespace stormm 32 | -------------------------------------------------------------------------------- /src/Potential/cacheresource.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace energy { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | CacheResourceKit::CacheResourceKit(const int max_blocks_in, const int max_atoms_in, 10 | llint* xcrd_in, llint* ycrd_in, llint* zcrd_in, 11 | llint* xvel_in, llint* yvel_in, llint* zvel_in, 12 | int* xcrd_ovrf_in, int* ycrd_ovrf_in, int* zcrd_ovrf_in, 13 | int* xvel_ovrf_in, int* yvel_ovrf_in, int* zvel_ovrf_in, 14 | int* xfrc_ovrf_in, int* yfrc_ovrf_in, int* zfrc_ovrf_in, 15 | T* charges_in, int* lj_idx_in) : 16 | max_blocks{max_blocks_in}, max_atoms{max_atoms_in}, xcrd{xcrd_in}, ycrd{ycrd_in}, 17 | zcrd{zcrd_in}, xvel{xvel_in}, yvel{yvel_in}, zvel{zvel_in}, xcrd_ovrf{xcrd_ovrf_in}, 18 | ycrd_ovrf{ycrd_ovrf_in}, zcrd_ovrf{zcrd_ovrf_in}, xvel_ovrf{xvel_ovrf_in}, 19 | yvel_ovrf{yvel_ovrf_in}, zvel_ovrf{zvel_ovrf_in}, xfrc_ovrf{xfrc_ovrf_in}, 20 | yfrc_ovrf{yfrc_ovrf_in}, zfrc_ovrf{zfrc_ovrf_in}, charges{charges_in}, lj_idx{lj_idx_in} 21 | {} 22 | 23 | } // namespace energy 24 | } // namespace stormm 25 | -------------------------------------------------------------------------------- /apps/Ffrn/test/SulfonamideTest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > ffld.in << EOF 4 | &files 5 | -sys { -p ${STORMM_SOURCE}/test/Topology/sulfonamide.top 6 | -c ${STORMM_SOURCE}/test/MoleculeFormat/sulfonamide_rots.sdf 7 | -label sulfonamide frame_end -1 -r sulfonamide_min.sdf r_kind SDF } 8 | 9 | -sys { -p ligand_11_5707.parm7 10 | -c ligand_11_5707.sdf frame_end -1 11 | -label ligand11 -r ligand11_min.sdf r_kind SDF } 12 | 13 | &end 14 | 15 | &ffrefine 16 | 17 | &end 18 | 19 | &minimize 20 | ncyc 50, maxcyc 500, 21 | &end 22 | 23 | &restraint 24 | system sulfonamide, 25 | ensemble heavy_dihedrals, 26 | mask '@O1,S1,C2,C3', 27 | penalty 50.0, fbhw 0.0, 28 | &end 29 | 30 | &restraint 31 | system sulfonamide 32 | ensemble heavy_dihedrals 33 | penalty 20.0, fbhw 0.1, 34 | &end 35 | 36 | &restraint 37 | system sulfonamide 38 | ensemble prevent_hbonds 39 | penalty 16.0, proximity 3.2, 40 | &end 41 | 42 | &report 43 | sdf_item { -title etot -label ALL -energy TOTAL_ENERGY } 44 | sdf_item { -title eptot -label ALL -energy POTENTIAL_ENERGY } 45 | sdf_item { -title edihe -label ALL -energy PROPER_DIHEDRAL } 46 | sdf_item { -title note -label ALL -message "Hello world" } 47 | sdf_item { -title "S_N_bond" -parameter BOND -label ALL -typeI ab -typeJ ad } 48 | &end 49 | EOF 50 | 51 | ${STORMM_HOME}/apps/bin/ffrefine.stormm -O -i ffld.in -warn 52 | -------------------------------------------------------------------------------- /src/Random/random_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "random_enumerators.h" 3 | 4 | namespace stormm { 5 | namespace random { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | std::string getEnumerationName(const RandomNumberKind input) { 9 | switch (input) { 10 | case RandomNumberKind::UNIFORM: 11 | return std::string("UNIFORM"); 12 | case RandomNumberKind::GAUSSIAN: 13 | return std::string("GAUSSIAN"); 14 | } 15 | __builtin_unreachable(); 16 | } 17 | 18 | //------------------------------------------------------------------------------------------------- 19 | std::string getEnumerationName(const RandomAlgorithm input) { 20 | switch (input) { 21 | case RandomAlgorithm::XOROSHIRO_128P: 22 | return std::string("XOROSHIRO_128P"); 23 | case RandomAlgorithm::XOSHIRO_256PP: 24 | return std::string("XOSHIRO_256PP"); 25 | } 26 | __builtin_unreachable(); 27 | } 28 | 29 | //------------------------------------------------------------------------------------------------- 30 | std::string getEnumerationName(const RngFillMode input) { 31 | switch (input) { 32 | case RngFillMode::COLUMNS: 33 | return std::string("COLUMNS"); 34 | case RngFillMode::ROWS: 35 | return std::string("ROWS"); 36 | } 37 | __builtin_unreachable(); 38 | } 39 | 40 | } // namespace random 41 | } // namespace stormm 42 | -------------------------------------------------------------------------------- /test/Namelists/coord/arg.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 36 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9114589 4.4801775 -0.0000043 5.4329859 4.1275726 0.8898151 8 | 5.6758885 4.0078494 -1.2321480 5.7138030 2.9185485 -1.2413851 9 | 5.1707846 4.3609396 -2.1312016 7.0948795 4.5652339 -1.1945817 10 | 7.0577854 5.6545675 -1.1857917 7.6008058 4.2121752 -0.2959771 11 | 7.8593093 4.0929078 -2.4267263 7.8972228 3.0036071 -2.4359653 12 | 7.3542055 4.4460001 -3.3257789 9.2439488 4.6155640 -2.4244880 13 | 9.5370152 5.2005483 -1.6550695 10.1199654 4.3501123 -3.3893874 14 | 9.8084154 3.5883177 -4.4341391 8.8818336 3.1933952 -4.5088543 15 | 10.4998384 3.4082337 -5.1480043 11.3389261 4.8721772 -3.2869961 16 | 11.5722637 5.4502474 -2.4923336 12.0256634 4.6881653 -4.0043734 17 | 4.9239457 6.0021263 0.0000014 3.8701570 6.6345579 0.0000062 18 | 6.1286966 6.5772787 0.0000024 6.9626583 6.0075357 -0.0000006 19 | 6.2897143 8.0173049 0.0000060 5.3090307 8.4930783 0.0000103 20 | 6.8407074 8.3218110 0.8898280 6.8406994 8.3218159 -0.8898190 21 | -------------------------------------------------------------------------------- /test/Namelists/coord/trp.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 36 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.8779692 4.5615506 -0.0000043 5.4199376 4.2412526 0.8898151 8 | 5.6696596 4.1364944 -1.2321480 5.7736249 3.0515036 -1.2413850 9 | 5.1440544 4.4582737 -2.1312016 7.0657177 4.7050121 -1.3210917 10 | 7.9629277 4.4916313 -2.2932451 7.7113323 3.8465583 -3.1350767 11 | 9.1359932 5.2338397 -1.9498126 9.9866067 5.2708585 -2.4931228 12 | 8.9292740 5.8580014 -0.8167680 9.8103462 6.6932754 -0.1196084 13 | 10.8065074 6.8876949 -0.5170534 9.3293622 7.2298523 1.0690202 14 | 9.9610562 7.8891197 1.6643597 8.0832122 6.9479892 1.5050982 15 | 7.7226257 7.3777410 2.4396517 7.2130072 6.1034695 0.7856326 16 | 6.2132109 5.8979344 1.1680766 7.6974477 5.5630304 -0.4115490 17 | 4.7980504 6.0814509 0.0000014 3.7078162 6.6487512 0.0000062 18 | 5.9810245 6.7001572 0.0000023 6.8352096 6.1612072 -0.0000007 19 | 6.0894183 8.1450976 0.0000059 5.0920360 8.5847897 0.0000102 20 | 6.6289398 8.4694955 0.8898279 6.6289315 8.4695000 -0.8898191 21 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/SER_ALA_HID_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 33 0.0000000E+00 3 | 1.8808727 1.1391368 0.1894094 1.9257568 2.2037717 -0.0364083 4 | 1.3351212 2.7563267 0.6917046 1.5420129 2.3819726 -1.0388328 5 | 3.3638646 2.6602550 0.0382733 4.2479921 1.8621663 0.3173267 6 | 3.5928631 3.9468624 -0.2159018 2.8051403 4.5457952 -0.4197679 7 | 4.9037776 4.6094833 -0.1481792 5.3892300 4.3238563 0.7855089 8 | 5.7919967 4.1382649 -1.3094608 5.8668437 3.0502969 -1.2911524 9 | 5.3466050 4.4447182 -2.2572829 7.0923832 4.6825309 -1.1993499 10 | 7.6785158 4.2083814 -1.7972689 4.7310004 6.1378800 -0.1463973 11 | 3.6361527 6.6346636 -0.4171276 5.7919253 6.8863717 0.1624913 12 | 6.6829310 6.4152120 0.2712292 5.8021690 8.3465168 0.2633322 13 | 5.2277481 8.7566206 -0.5686457 5.1297186 8.7633847 1.5815023 14 | 5.6811107 8.3473979 2.4261786 5.1152350 9.8501603 1.6656793 15 | 4.1022609 8.3982238 1.6094085 7.2374108 8.9013213 0.1762194 16 | 8.2048412 8.1834505 0.4243123 7.3700676 10.1895015 -0.1662757 17 | 6.5309020 10.7172938 -0.3473417 8.6550904 10.8774056 -0.2813696 18 | 9.3458924 10.2732290 -0.8738791 8.5241895 11.8473008 -0.7631460 19 | 9.0855328 11.0216370 0.7115309 20 | -------------------------------------------------------------------------------- /src/Topology/atomgraph_constants.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_ATOMGRAPH_CONSTANTS_H 3 | #define STORMM_ATOMGRAPH_CONSTANTS_H 4 | 5 | #include "copyright.h" 6 | 7 | namespace stormm { 8 | namespace topology { 9 | 10 | /// \brief Use a rounding tolerance to decide whether to smear a uniform charge over all particles 11 | /// in the system in order to achieve an integer charge on the system as a whole. 12 | constexpr double default_charge_rounding_tol = 0.001; 13 | 14 | /// \brief Use the lowest bit of a 32-bit float representing the range [1.0, 2.0) as the default 15 | /// input for the smoothCharges function, ensuring that all charges in the range (-2e, +2e) 16 | /// will be expressed in increments that a floating point number can represent exactly. 17 | /// The hexfloat would read 0x1p-23. 18 | constexpr double default_charge_precision_inc = 1.1920928955078125E-7; 19 | 20 | /// \brief Default 1:4 non-bonded screening factors are taken from various major codes. 21 | /// \{ 22 | constexpr double amber_default_elec14_screen = 1.2; 23 | constexpr double amber_default_vdw14_screen = 2.0; 24 | constexpr double charmm_default_elec14_screen = 1.0; 25 | constexpr double charmm_default_vdw14_screen = 1.0; 26 | constexpr double glycam_default_elec14_screen = 1.0; 27 | constexpr double glycam_default_vdw14_screen = 1.0; 28 | /// \} 29 | 30 | } // namespace topology 31 | } // namespace stormm 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/Numerics/split_fixed_precision.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace numerics { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template void hostSplitFPSum(T *a_x, int* a_y, const int95_t b) { 9 | const int95_t result = hostInt95Sum(*a_x, *a_y, b.x, b.y); 10 | *a_x = result.x; 11 | *a_y = result.y; 12 | } 13 | 14 | //------------------------------------------------------------------------------------------------- 15 | template void hostSplitFPSum(T *a_x, int* a_y, const int2 b) { 16 | const int2 result = hostInt63Sum(*a_x, *a_y, b.x, b.y); 17 | *a_x = result.x; 18 | *a_y = result.y; 19 | } 20 | 21 | //------------------------------------------------------------------------------------------------- 22 | template void hostSplitFPSubtract(T *a_x, int* a_y, const int95_t b) { 23 | const int95_t result = hostInt95Subtract(*a_x, *a_y, b.x, b.y); 24 | *a_x = result.x; 25 | *a_y = result.y; 26 | } 27 | 28 | //------------------------------------------------------------------------------------------------- 29 | template void hostSplitFPSubtract(T *a_x, int* a_y, const int2 b) { 30 | const int2 result = hostInt63Subtract(*a_x, *a_y, b.x, b.y); 31 | *a_x = result.x; 32 | *a_y = result.y; 33 | } 34 | 35 | 36 | } // namespace numerics 37 | } // namespace stormm 38 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/LYS_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 34 0.0000000E+00 3 | 2.1406421 1.2055852 0.5875863 2.1188499 2.2107266 0.1674808 4 | 1.4310576 2.8280717 0.7425719 1.7958189 2.1636116 -0.8707170 5 | 3.5073005 2.8026951 0.2390731 4.4309259 2.1571488 0.7196460 6 | 3.6645490 4.0374264 -0.2452452 2.8552110 4.5028444 -0.6335029 7 | 4.9385627 4.7738823 -0.2401386 5.4847529 4.5082553 0.6664241 8 | 5.7637562 4.3333048 -1.4641461 5.8451742 3.2445388 -1.4549781 9 | 5.2378441 4.6265517 -2.3751842 7.1818167 4.9233135 -1.4842783 10 | 7.1262110 6.0104239 -1.5566245 7.6965871 4.6533496 -0.5607972 11 | 7.9705250 4.3782013 -2.6832808 8.0216360 3.2897150 -2.6099317 12 | 7.4499453 4.6490860 -3.6042859 9.3888343 4.9608916 -2.7000301 13 | 9.3164837 6.0520424 -2.7558739 9.8807758 4.7057671 -1.7556676 14 | 10.1793052 4.4404919 -3.8447199 9.7345977 4.6818586 -4.7217687 15 | 11.1126809 4.8338038 -3.8408958 10.2576129 3.4322507 -3.7920253 16 | 4.6852618 6.2834058 -0.2368324 3.9407371 6.7744096 -1.0779127 17 | 5.3298539 7.0093967 0.6819069 5.8965901 6.5195672 1.3549826 18 | 5.1965522 8.4598929 0.8217883 4.1610524 8.7144196 1.0595675 19 | 5.8442622 8.8268765 1.6197311 5.4652815 8.9521999 -0.1151808 20 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/LYS_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 34 0.0000000E+00 3 | 2.1720803 1.1841477 0.3994409 2.1460502 2.2312410 0.0990444 4 | 1.4878730 2.7825961 0.7681113 1.7830535 2.3064415 -0.9242649 5 | 3.5431291 2.8009100 0.1834277 4.4751289 2.0971626 0.5532138 6 | 3.6925581 4.0846200 -0.1565103 2.8710628 4.5848489 -0.4672259 7 | 4.9798887 4.7997205 -0.1887627 5.5310994 4.5581526 0.7210408 8 | 5.7930504 4.3093674 -1.4050911 5.8906288 3.2238263 -1.3536129 9 | 5.2515727 4.5555252 -2.3209000 7.2037010 4.9136446 -1.4733605 10 | 7.1353844 5.9969854 -1.5823389 7.7395822 4.6810680 -0.5517091 11 | 7.9732595 4.3357597 -2.6692090 8.0417046 3.2514447 -2.5580136 12 | 7.4283780 4.5661379 -3.5871944 9.3817222 4.9374558 -2.7392522 13 | 9.2914388 6.0251053 -2.8276453 9.9002769 4.7195784 -1.7998340 14 | 10.1507204 4.3922113 -3.8867794 9.6802770 4.5999566 -4.7590151 15 | 11.0780948 4.7980554 -3.9189259 10.2441624 3.3872727 -3.8046891 16 | 4.7484619 6.3121447 -0.2485823 4.1398614 6.7979160 -1.1953383 17 | 5.2517340 7.0447852 0.7494820 5.7097184 6.5594807 1.5039888 18 | 5.1138227 8.4980665 0.8520561 4.0615542 8.7615068 0.9810161 19 | 5.6812811 8.8747951 1.7047500 5.4787360 8.9740757 -0.0605758 20 | -------------------------------------------------------------------------------- /docker/STORMM-CPU-ONLY-CONFIG/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use the official Debian base image 2 | FROM debian:latest 3 | 4 | # Set non-interactive mode for apt-get to avoid prompts 5 | ENV DEBIAN_FRONTEND=noninteractive 6 | 7 | # Install necessary packages 8 | RUN apt-get update && \ 9 | apt-get install -y \ 10 | cmake \ 11 | gcc \ 12 | g++ \ 13 | make \ 14 | git \ 15 | wget \ 16 | curl \ 17 | vim \ 18 | emacs \ 19 | neovim \ 20 | ca-certificates \ 21 | gnupg2 \ 22 | lsb-release \ 23 | software-properties-common \ 24 | && apt-get clean && \ 25 | rm -rf /var/lib/apt/lists/* 26 | 27 | # Add contrib repository and update package list 28 | RUN add-apt-repository contrib && \ 29 | apt-get update 30 | 31 | # Install CUDA Toolkit 32 | RUN apt-get -y install cuda-toolkit-12-6 33 | 34 | # Set up environment variables for CUDA 35 | ENV PATH=/usr/local/cuda-12.6/bin:${PATH} 36 | ENV LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:${LD_LIBRARY_PATH} 37 | 38 | # Create a directory for the repository 39 | WORKDIR /app 40 | 41 | # Clone the Git repository 42 | RUN git clone https://github.com/psivant/stormm.git 43 | 44 | # Build STORMM using CMake with CUDA enabled 45 | RUN cmake -S stormm -B stormmbuild -DSTORMM_ENABLE_CUDA=OFF -DSTORMM_ENABLE_RDKIT=OFF 46 | RUN export STORMM_HOME=/app/stormm 47 | WORKDIR /app/stormmbuild 48 | RUN make 49 | 50 | # Set the default command to run bash 51 | CMD ["/bin/bash"] 52 | -------------------------------------------------------------------------------- /src/Potential/energy_abstracts.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace energy { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | ImplicitSolventRecipe::ImplicitSolventRecipe(const ImplicitSolventKit &isk, 10 | const NeckGeneralizedBornKit &ngbk) : 11 | natom{isk.natom}, 12 | igb{isk.igb}, 13 | table_size{ngbk.table_size}, 14 | dielectric{isk.dielectric}, 15 | kappa{(isk.saltcon > static_cast(constants::tiny)) ? 16 | static_cast(sqrt(default_salt_kappa_dependence * isk.saltcon)) : static_cast(0.0)}, 17 | gb_offset{(igb == ImplicitSolventModel::NECK_GB_II) ? 18 | static_cast(default_neck_ii_gb_radii_offset) : 19 | static_cast(default_gb_radii_offset)}, 20 | gb_neckscale{(igb == ImplicitSolventModel::NECK_GB_II) ? 21 | static_cast(default_gb_neck_ii_scale) : static_cast(default_gb_neck_scale)}, 22 | gb_neckcut{ngbk.neck_cut}, 23 | neck_gb_idx{isk.neck_gb_idx}, 24 | pb_radii{isk.pb_radii}, 25 | gb_screen{isk.gb_screen}, 26 | gb_alpha{isk.gb_alpha}, 27 | gb_beta{isk.gb_beta}, 28 | gb_gamma{isk.gb_gamma}, 29 | neck_max_sep{ngbk.max_separation}, 30 | neck_max_val{ngbk.max_value} 31 | {} 32 | 33 | } // namespace energy 34 | } // namespace stormm 35 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_L1_vs.inpcrd: -------------------------------------------------------------------------------- 1 | 2 | 37 3 | 1.2080000 0.6970000 0.0000000 2.1490000 1.2410000 0.0000000 4 | 0.0000000 1.3950000 0.0000000 0.0000000 2.4820000 0.0000000 5 | -1.2080000 0.6980000 0.0000000 -2.1490000 1.2410000 0.0000000 6 | -1.2080000 -0.6980000 0.0000000 0.0000000 -1.3950000 0.0000000 7 | 0.0000000 -2.8230000 0.0000000 1.2080000 -0.6980000 0.0000000 8 | -3.5940000 -4.8980000 -0.0010000 -4.5350000 -5.4410000 -0.0020000 9 | -3.0840000 -4.3850000 -1.1940000 -3.6290000 -4.5290000 -2.1240000 10 | -1.8770000 -3.6880000 -1.1940000 -1.1780000 -3.5030000 0.0000000 11 | -1.6880000 -4.0160000 1.1930000 -2.8960000 -4.7130000 1.1930000 12 | -3.2930000 -5.1120000 2.1220000 3.5940000 -4.8980000 -0.0010000 13 | 4.5350000 -5.4410000 -0.0020000 2.9480000 -4.6220000 -1.2060000 14 | 3.3850000 -4.9510000 -2.1450000 1.7400000 -3.9250000 -1.2060000 15 | 1.1780000 -3.5030000 0.0000000 1.8240000 -3.7790000 1.2040000 16 | 3.0320000 -4.4760000 1.2050000 3.5360000 -4.6910000 2.1430000 17 | -1.6409445 -0.9481181 0.0000000 1.6409445 -0.9481181 0.0000000 18 | -1.6943470 -3.5043034 -1.6216605 -1.4377225 -3.9499125 1.6207775 19 | 1.5082843 -3.8261909 -1.6379081 1.6226903 -3.6280197 1.6360641 20 | -0.3798865 -2.5817817 0.0000000 0.0000000 -3.2730000 0.0000000 21 | 0.3798865 -2.5817817 0.0000000 22 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tripeptides/VAL_GLY_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 35 0.0000000E+00 3 | 1.9002508 1.1395229 0.3304309 1.9371171 2.2132148 0.1512439 4 | 1.3848721 2.7335207 0.9312242 1.5064398 2.4366213 -0.8227367 5 | 3.3785899 2.6636574 0.1747537 4.2710932 1.8539589 0.3855254 6 | 3.5973416 3.9625742 -0.0258296 2.7983422 4.5644260 -0.1693849 7 | 4.9174353 4.6129448 -0.1225000 5.5047256 4.3147608 0.7459535 8 | 5.6642839 4.1401052 -1.3989414 5.6659138 3.0513633 -1.4126511 9 | 4.9993206 4.6131717 -2.6997251 5.0258385 5.7003271 -2.7742179 10 | 5.5239155 4.1862382 -3.5547151 3.9629914 4.2776422 -2.7292543 11 | 7.1373499 4.5688923 -1.4295176 7.6211043 4.3006918 -0.4899767 12 | 7.6461520 4.0433126 -2.2381721 7.2350003 5.6396178 -1.6047985 13 | 4.7387165 6.1386135 -0.0857390 3.6432484 6.6438088 -0.3293824 14 | 5.8010524 6.8836175 0.2215946 6.6859034 6.4266043 0.3975321 15 | 5.8063848 8.3470453 0.2538912 5.2735200 8.7286346 -0.6176900 16 | 5.2961633 8.6871084 1.1548896 7.2284999 8.9138680 0.2500263 17 | 8.1915332 8.1743424 0.4445569 7.3546609 10.2273878 0.0287018 18 | 6.5149479 10.7640883 -0.1234337 8.6348467 10.9335045 -0.0037226 19 | 9.3763794 10.3355201 -0.5384058 8.5237445 11.8947074 -0.5075193 20 | 8.9911875 11.0985012 1.0146616 21 | -------------------------------------------------------------------------------- /src/Potential/hpc_map_density.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HPC_MAP_DENSITY_H 3 | #define STORMM_HPC_MAP_DENSITY_H 4 | 5 | #ifdef STORMM_USE_CUDA 6 | # include 7 | #endif 8 | #include "copyright.h" 9 | #include "Constants/behavior.h" 10 | 11 | namespace stormm { 12 | namespace energy { 13 | 14 | using constants::PrecisionModel; 15 | 16 | /// \brief Get the kernel attributes for one of the __shared__ accumulation density mapping 17 | /// kernels, to fill out tables in the core kernel manager. 18 | /// 19 | /// \param calc_prec Indicate whether to carry out calculations in single- or double-precision 20 | /// \param acc_prec Indicate whether to carry out accumulation in 63- or 95-bit precision 21 | cudaFuncAttributes queryShrAccQMapKernelRequirements(PrecisionModel calc_prec, 22 | PrecisionModel acc_prec, bool overflow_needed, 23 | size_t cg_tmat, int order); 24 | 25 | /// \brief Get the kernel attributes for one of the general-purpose density mapping kernels, to 26 | /// fill out tables in the core kernel manager. Descriptions of input parameters follow 27 | /// from queryRegAccQMapKernelRequirements(), above. 28 | cudaFuncAttributes queryGeneralQMapKernelRequirements(PrecisionModel prec, size_t cg_tmat, 29 | int order); 30 | 31 | } // namespace energy 32 | } // namespace stormm 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/Potential/scorecard.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace energy { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template T ScoreCard::getEnergyScalingFactor() const { 9 | const size_t ct = std::type_index(typeid(T)).hash_code(); 10 | T result; 11 | if (ct == float_type_index) { 12 | result = nrg_scale_f; 13 | } 14 | else if (ct == double_type_index) { 15 | result = nrg_scale_lf; 16 | } 17 | else { 18 | rtErr("No scaling factor is defined for data in format " + 19 | std::string(std::type_index(typeid(T)).name()) + ".", "ScoreCard", 20 | "getEnergyScalingFactor"); 21 | } 22 | return result; 23 | } 24 | 25 | //------------------------------------------------------------------------------------------------- 26 | template T ScoreCard::getInverseEnergyScalingFactor() const { 27 | const size_t ct = std::type_index(typeid(T)).hash_code(); 28 | T result; 29 | if (ct == float_type_index) { 30 | result = inverse_nrg_scale_f; 31 | } 32 | else if (ct == double_type_index) { 33 | result = inverse_nrg_scale_lf; 34 | } 35 | else { 36 | rtErr("No scaling factor is defined for data in format " + 37 | std::string(std::type_index(typeid(T)).name()) + ".", "ScoreCard", 38 | "getInverseEnergyScalingFactor"); 39 | } 40 | return result; 41 | } 42 | 43 | } // namespace energy 44 | } // namespace stormm 45 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/TRP_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 36 0.0000000E+00 3 | 1.9643148 1.3311814 1.0223395 2.0200457 2.1385096 0.2935029 4 | 1.1763620 2.8125249 0.4276189 2.0081512 1.7247469 -0.7128116 5 | 3.3062860 2.9019066 0.5044792 4.0745706 2.5822372 1.4022695 6 | 3.5358421 3.9171984 -0.3245475 2.8391680 4.1448526 -1.0188334 7 | 4.7158250 4.7857860 -0.2725585 5.0237336 4.8937743 0.7676326 8 | 5.8698920 4.1285798 -1.0473364 6.1320949 3.1894737 -0.5572280 9 | 5.5205977 3.8889982 -2.0531004 7.1140795 4.9563808 -1.1612121 10 | 7.6291581 5.4461502 -2.3112650 7.2076762 5.2798459 -3.2960164 11 | 8.7519211 6.2010449 -2.0330228 9.3007830 6.6645762 -2.7426673 12 | 9.0089290 6.2484418 -0.6798452 9.9898550 6.8947773 0.0860543 13 | 10.7474501 7.4972969 -0.3915878 9.9716703 6.7462686 1.4832375 14 | 10.7205960 7.2359041 2.0908879 8.9812235 5.9532949 2.0912816 15 | 8.9762964 5.8351147 3.1668329 8.0019341 5.3064559 1.3114428 16 | 7.2545669 4.6899433 1.7912323 7.9883515 5.4403128 -0.0943198 17 | 4.3920904 6.1904854 -0.8059138 3.4691020 6.3535395 -1.6037649 18 | 5.1495865 7.2014755 -0.3619100 5.9174663 6.9738027 0.2531822 19 | 4.9847729 8.5962912 -0.7626756 3.9424588 8.8966600 -0.6377051 20 | 5.6200137 9.2389220 -0.1513950 5.2592519 8.7111959 -1.8126644 21 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Dipeptides/TRP_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 36 0.0000000E+00 3 | 2.0046481 1.3118061 0.9964609 2.0394607 2.1380909 0.2876487 4 | 1.1907415 2.7990531 0.4531238 2.0150046 1.7491610 -0.7286051 5 | 3.3218589 2.9080669 0.4976094 4.1061764 2.5718157 1.3750247 6 | 3.5292177 3.9486751 -0.3054214 2.8253522 4.1833979 -0.9899665 7 | 4.7221240 4.8002154 -0.2741194 5.0283725 4.9298719 0.7643108 8 | 5.8722630 4.1166396 -1.0305024 6.1318339 3.1889520 -0.5182154 9 | 5.5267907 3.8566042 -2.0327478 7.1153090 4.9447361 -1.1524847 10 | 7.6182865 5.4430185 -2.3041419 7.1861890 5.2829477 -3.2851898 11 | 8.7423213 6.1983159 -2.0317053 9.2836751 6.6675139 -2.7433058 12 | 9.0101257 6.2406662 -0.6804241 9.9957032 6.8860451 0.0802399 13 | 10.7471897 7.4932710 -0.4010279 9.9903229 6.7297677 1.4768707 14 | 10.7443601 7.2168120 2.0806007 9.0059777 5.9326552 2.0895993 15 | 9.0107912 5.8088754 3.1643608 8.0204222 5.2889247 1.3149163 16 | 7.2771242 4.6698136 1.7973115 7.9956736 5.4281929 -0.0901693 17 | 4.4206043 6.1918769 -0.8501620 3.5754876 6.3267968 -1.7346047 18 | 5.0970675 7.2254105 -0.3329564 5.8031688 7.0231062 0.3597584 19 | 4.9357529 8.6118268 -0.7633058 3.8836204 8.8968325 -0.7029267 20 | 5.5259108 9.2738379 -0.1282201 5.2671889 8.7143567 -1.7980200 21 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tripeptides/PRO_ALA_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 36 0.0000000E+00 3 | 2.4717394 0.8710083 0.0626160 2.2591382 1.9343773 -0.0392752 4 | 1.6175680 2.2531185 0.7802021 1.7713880 2.1173230 -0.9938720 5 | 3.5674527 2.7026259 0.0177797 4.6189408 2.0704792 0.0283195 6 | 3.5340179 4.0476358 0.0428756 2.3630017 4.8914279 -0.1301661 7 | 1.8832343 5.0454612 0.8372586 1.6542253 4.4688081 -0.8430590 8 | 2.9077870 6.2163157 -0.6586412 2.2497767 7.0513868 -0.4148007 9 | 3.0623235 6.1467594 -1.7368184 4.2568277 6.3286705 0.0513032 10 | 4.1010494 6.7438389 1.0484967 4.9577967 6.9461739 -0.5106230 11 | 4.7361984 4.8740469 0.1513612 5.3817923 4.6509056 -0.6988417 12 | 5.5086197 4.6279068 1.4565115 4.9160023 4.5344274 2.5307434 13 | 6.8391821 4.5882569 1.3703236 7.2729246 4.7063684 0.4673194 14 | 7.7401926 4.3658113 2.5003813 7.2754718 4.7554779 3.4073649 15 | 7.9449644 2.8537483 2.6721722 8.4125693 2.4391402 1.7776021 16 | 8.5825739 2.6583556 3.5344425 6.9815951 2.3648224 2.8285271 17 | 9.0771162 5.1041139 2.3011729 9.4326845 5.4653691 1.1794601 18 | 9.8199163 5.3195778 3.3944164 9.4652453 4.9860167 4.2771111 19 | 11.1118014 6.0036768 3.3851064 11.0190778 6.9590345 2.8642342 20 | 11.4531193 6.1832634 4.4058312 11.8480576 5.3923626 2.8597937 21 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_phe.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 39 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.3690784 7.9157062 0.0000058 11 | 5.9069226 8.3431801 -0.8898128 5.7350057 8.5524127 1.2321507 12 | 4.6657166 8.3411435 1.2413876 6.1938923 8.1410404 2.1312035 13 | 5.8796834 10.0528321 1.3210970 5.3363575 10.7451471 2.4099017 14 | 4.8089025 10.2010819 3.1934094 5.4704945 12.1362645 2.4923678 15 | 5.0474781 12.6752820 3.3400812 6.1479582 12.8350683 1.4860302 16 | 6.2523942 13.9181522 1.5502358 6.6912854 12.1427559 0.3972234 17 | 7.2187403 12.6868242 -0.3862823 6.5571505 10.7516382 0.3147543 18 | 6.9801701 10.2126239 -0.5329590 7.8481527 8.2746257 0.0000005 19 | 8.7040459 7.3926465 -0.0000060 8.1019685 9.5852753 0.0000017 20 | 7.3408707 10.2492252 0.0000060 9.4552698 10.1031343 -0.0000012 21 | 10.1623006 9.2735512 -0.0000071 9.6114807 10.7129846 -0.8898221 22 | 9.6114878 10.7129749 0.8898249 23 | -------------------------------------------------------------------------------- /src/Potential/eval_synthesis.cpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | #include "eval_synthesis.h" 4 | 5 | namespace stormm { 6 | namespace energy { 7 | 8 | //------------------------------------------------------------------------------------------------- 9 | void evalSyNonbondedEnergy(const AtomGraphSynthesis &poly_ag, 10 | const StaticExclusionMaskSynthesis &poly_se, 11 | PhaseSpaceSynthesis *poly_ps, ScoreCard *ecard, 12 | const NonbondedTask task, const PrecisionModel prec, 13 | const EvaluateForce eval_elec_force, const EvaluateForce eval_vdw_force, 14 | const double clash_minimum_distance, const double clash_ratio) { 15 | PsSynthesisWriter psyw = poly_ps->data(); 16 | switch (prec) { 17 | case PrecisionModel::DOUBLE: 18 | evalSyNonbondedTileGroups(poly_ag.getDoublePrecisionNonbondedKit(), poly_se.data(), 19 | &psyw, ecard, task, eval_elec_force, eval_vdw_force, 20 | clash_minimum_distance, clash_ratio); 21 | break; 22 | case PrecisionModel::SINGLE: 23 | evalSyNonbondedTileGroups(poly_ag.getSinglePrecisionNonbondedKit(), poly_se.data(), 24 | &psyw, ecard, task, eval_elec_force, eval_vdw_force, 25 | clash_minimum_distance, clash_ratio); 26 | break; 27 | } 28 | } 29 | 30 | } // namespace energy 31 | } // namespace stormm 32 | -------------------------------------------------------------------------------- /test/MoleculeFormat/sulfonamide.mol: -------------------------------------------------------------------------------- 1 | 2 | RDKit 3D 3 | 4 | 16 15 0 0 0 0 0 0 0 0999 V2000 5 | 2.2474 -1.0845 -0.3966 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | 1.4664 0.1506 -0.4103 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | -0.0223 0.2311 0.3544 S 0 0 0 0 0 6 0 0 0 0 0 0 8 | -0.4785 1.6123 0.1818 O 0 0 0 0 0 0 0 0 0 0 0 0 9 | 0.1469 -0.3787 1.6757 O 0 0 0 0 0 0 0 0 0 0 0 0 10 | -1.1538 -0.8405 -0.5911 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | -2.2385 -0.0173 -1.2846 C 0 0 0 0 0 0 0 0 0 0 0 0 12 | 1.8903 -1.8467 -1.1055 H 0 0 0 0 0 0 0 0 0 0 0 0 13 | 3.2858 -0.8392 -0.6386 H 0 0 0 0 0 0 0 0 0 0 0 0 14 | 2.2200 -1.4937 0.6154 H 0 0 0 0 0 0 0 0 0 0 0 0 15 | 1.4761 0.6911 -1.2697 H 0 0 0 0 0 0 0 0 0 0 0 0 16 | -1.5812 -1.5531 0.1216 H 0 0 0 0 0 0 0 0 0 0 0 0 17 | -0.5328 -1.3843 -1.3100 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | -2.8353 0.5307 -0.5506 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | -2.9015 -0.6815 -1.8486 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | -1.7938 0.7010 -1.9790 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | 1 2 1 0 22 | 2 3 1 0 23 | 3 4 2 0 24 | 3 5 2 0 25 | 3 6 1 0 26 | 6 7 1 0 27 | 1 8 1 0 28 | 1 9 1 0 29 | 1 10 1 0 30 | 2 11 1 0 31 | 6 12 1 0 32 | 6 13 1 0 33 | 7 14 1 0 34 | 7 15 1 0 35 | 7 16 1 0 36 | M END 37 | -------------------------------------------------------------------------------- /test/Parsing/formatted_numbers.txt: -------------------------------------------------------------------------------- 1 | Here are some integers: 2 | 1 3 2 7 3 | 8 90 51 6 4 | 78 99 27 0 5 | -1 36 6 | ... 7 | This is a comment line, perhaps? 8 | And here are some standard format real numbers: 9 | 34.61166248 -40.69924392 40.93611479 28.40581480 -36.53360247 10 | 28.30870439 47.60386870 -27.36343601 -47.91499670 44.14195868 11 | 18.44820137 -3.75931680 40.92478738 -44.62319430 18.25944938 12 | 46.07300536 20.29945545 -3.10307601 -43.83521930 -21.23935720 13 | -17.84246415 29.92060842 26.09051544 14 | With a new way to terminate the series... 15 | Here are some scientific format numbers. 16 | -2.1307E+01 -9.1787E+00 2.5001E+01 -4.9123E+01 -2.4365E+01 17 | -3.4127E+01 -2.0796E+01 -3.4007E+01 -4.9554E+01 -4.8733E+01 18 | -2.3715E+01 4.8354E+01 3.5807E+01 4.5947E+01 -2.6555E+01 19 | -4.8825E+01 -1.4587E+01 20 | Yucatan! That's where the asteroid that killed the dinosaurs landed, if you discount volcanism 21 | in present-day India (and it is probably correct to do so). 22 | 23 | Finally, these are some char4 formatted-'numbers': 24 | C2 H1 H2 H3 C1 C3 H4 H5 H6 C4 H7 H8 H9 O1 C5 O2 N H CA CB1 25 | HB11HB12HB13CB2 HB21HB22HB23C O N H CA HA CB HB1 HB2 HB3 C O N 26 | H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N 27 | H CA CB1 HB11HB12HB13CB2 HB21HB22HB23C O N H CA HA CB HB2 HB3 CG 28 | CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA HA CB HB1 29 | -------------------------------------------------------------------------------- /src/ForceField/forcefield_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "copyright.h" 3 | #include "forcefield_enumerators.h" 4 | 5 | namespace stormm { 6 | namespace modeling { 7 | 8 | //------------------------------------------------------------------------------------------------- 9 | std::string getEnumerationName(const ParameterKind kind) { 10 | switch (kind) { 11 | case ParameterKind::BOND: 12 | return std::string("harmonic bond"); 13 | case ParameterKind::ANGLE: 14 | return std::string("harmonic angle"); 15 | case ParameterKind::DIHEDRAL: 16 | return std::string("cosine-based dihedral"); 17 | case ParameterKind::UREY_BRADLEY: 18 | return std::string("Urey-Bradley stretching angle"); 19 | case ParameterKind::CHARMM_IMPROPER: 20 | return std::string("CHARMM improper dihedral"); 21 | case ParameterKind::CMAP: 22 | return std::string("CMAP 2D bicubic spline surface"); 23 | case ParameterKind::ATTN_14_SCALE: 24 | return std::string("attenuated 1:4 interaction"); 25 | case ParameterKind::CHARGE: 26 | return std::string("atomic partial charge"); 27 | case ParameterKind::LENNARD_JONES: 28 | return std::string("Lennard-Jones potential"); 29 | case ParameterKind::BUCKINGHAM: 30 | return std::string("Buckingham potential"); 31 | case ParameterKind::VIRTUAL_SITE_FRAME: 32 | return std::string("virtual site frame"); 33 | case ParameterKind::NONE: 34 | return std::string("no parameter"); 35 | } 36 | __builtin_unreachable(); 37 | } 38 | 39 | } // namespace modeling 40 | } // namespace stormm 41 | -------------------------------------------------------------------------------- /test/Chemistry/morphine_like.inpcrd: -------------------------------------------------------------------------------- 1 | MOL 2 | 40 3 | -0.5040000 -3.1160000 0.4860000 -0.6000000 -3.7980000 1.3210000 4 | -0.4680000 -3.7180000 -0.4120000 -1.3980000 -2.5070000 0.4470000 5 | 0.7090000 -2.2930000 0.6170000 0.7210000 -1.5910000 1.9190000 6 | -0.2440000 -1.1310000 2.0930000 0.8430000 -2.3180000 2.7130000 7 | 1.8230000 -0.5220000 2.0250000 1.6430000 0.0560000 2.9290000 8 | 2.7750000 -1.0400000 2.1550000 1.9130000 0.4170000 0.7920000 9 | 3.1950000 0.1400000 0.0770000 3.4360000 -0.8900000 -0.8220000 10 | 4.7210000 -1.0230000 -1.3640000 4.9300000 -1.8130000 -2.0380000 11 | 5.7290000 -0.1060000 -1.0340000 6.7040000 -0.2060000 -1.4350000 12 | 5.4350000 0.9620000 -0.1880000 6.3820000 1.8900000 0.1210000 13 | 5.9600000 2.5220000 0.7380000 4.1530000 1.0880000 0.3370000 14 | 3.6550000 2.1330000 1.0730000 2.1560000 1.9130000 1.1390000 15 | 1.8490000 2.1280000 2.1620000 1.3930000 2.9020000 0.2100000 16 | 0.4350000 3.1170000 0.6650000 2.0890000 4.1500000 0.1080000 17 | 3.0230000 3.9570000 -0.0890000 1.1170000 2.3650000 -1.1800000 18 | 1.1390000 3.0690000 -1.9730000 0.8230000 1.0730000 -1.3850000 19 | 0.6050000 0.6930000 -2.3520000 0.7840000 0.1070000 -0.2140000 20 | -0.1720000 0.2570000 0.2660000 0.9080000 -1.4030000 -0.5790000 21 | 0.1340000 -1.6270000 -1.3020000 2.2680000 -1.7660000 -1.2460000 22 | 2.5050000 -2.8110000 -1.0430000 2.1510000 -1.6480000 -2.3220000 23 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_tyr.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 40 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.3690784 7.9157062 0.0000058 11 | 5.9069226 8.3431801 -0.8898128 5.7350057 8.5524127 1.2321507 12 | 4.6657166 8.3411435 1.2413876 6.1938923 8.1410404 2.1312035 13 | 5.9522685 10.0462379 1.1949559 5.4566276 10.8516094 2.2272917 14 | 4.9139023 10.4003251 3.0578886 5.6580627 12.2366126 2.1928048 15 | 5.2721714 12.8636517 2.9965532 6.3551389 12.8162473 1.1259839 16 | 6.5508195 14.1616792 1.0924839 6.1701342 14.6150274 1.8482310 17 | 6.8507820 12.0108787 0.0936470 7.3935067 12.4621649 -0.7369498 18 | 6.6493491 10.6258752 0.1281290 7.0352439 9.9988383 -0.6756184 19 | 7.8481527 8.2746257 0.0000005 8.7040459 7.3926465 -0.0000060 20 | 8.1019685 9.5852753 0.0000017 7.3408707 10.2492252 0.0000060 21 | 9.4552698 10.1031343 -0.0000012 10.1623006 9.2735512 -0.0000071 22 | 9.6114807 10.7129846 -0.8898221 9.6114878 10.7129749 0.8898249 23 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/CYS_ASN_GLY_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 37 0.0000000E+00 3 | 1.9297170 1.2785618 0.5930672 1.9808306 2.2798806 0.1673071 4 | 1.3636501 2.9579623 0.7534237 1.6326206 2.2568654 -0.8634084 5 | 3.4149860 2.7531210 0.2008640 4.2910375 2.0316472 0.6570547 6 | 3.6531402 3.9684013 -0.2854755 2.8759512 4.5177487 -0.6227314 7 | 4.9649095 4.6196817 -0.3024606 5.5125763 4.3383598 0.5990651 8 | 5.7443042 4.1076445 -1.5248898 5.7699488 3.0162051 -1.4953842 9 | 5.2397391 4.4258553 -2.4389209 7.4495929 4.7318580 -1.5171367 10 | 7.8869795 4.0481062 -2.5810821 4.7954348 6.1516940 -0.3015510 11 | 3.7561353 6.6557665 -0.7284019 5.7953073 6.8914915 0.1843181 12 | 6.6543342 6.4248514 0.4478642 5.8244335 8.3565441 0.2107849 13 | 5.3570990 8.7311653 -0.7028659 5.0098652 8.8492502 1.4257989 14 | 4.0381587 8.3564842 1.4350969 5.5395087 8.5835281 2.3403661 15 | 4.7512839 10.3468624 1.4168327 4.8974126 11.0348456 0.4213798 16 | 4.3695613 10.9118394 2.5368542 4.2002183 11.9010489 2.4969036 17 | 4.2386147 10.3658257 3.3672205 7.2831566 8.8606581 0.2407224 18 | 8.1788742 8.1283842 0.6596322 7.5183140 10.1074228 -0.1819280 19 | 6.7112408 10.6716615 -0.4282589 8.8394055 10.7295527 -0.2279194 20 | 9.5114980 10.1220084 -0.8372492 8.7682393 11.7296974 -0.6575601 21 | 9.2493006 10.7982899 0.7813922 22 | -------------------------------------------------------------------------------- /src/Parsing/parse.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace parse { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | int findAlignmentWidth(const T* numbers, const size_t count, int decimal_places, size_t advance) { 10 | int result = 0; 11 | if (isFloatingPointScalarType() || isSignedIntegralScalarType()) { 12 | for (size_t i = 0; i < count; i += advance) { 13 | if (fabs(numbers[i]) < 1.0) { 14 | result = std::max(result, 1 + (numbers[i] < 0.0)); 15 | } 16 | else { 17 | result = std::max(result, static_cast(ceil(log10(fabs(numbers[i]))) + 18 | (numbers[i] < 0.0))); 19 | } 20 | } 21 | } 22 | else if (isUnsignedIntegralScalarType()) { 23 | for (size_t i = 0; i < count; i += advance) { 24 | result = std::max(result, static_cast(ceil(log10(numbers[i])))); 25 | } 26 | } 27 | else { 28 | rtErr("A recognized scalar data type is required.", "findAlignmentWidth"); 29 | } 30 | return result + decimal_places + (decimal_places > 0); 31 | } 32 | 33 | //------------------------------------------------------------------------------------------------- 34 | template 35 | int findAlignmentWidth(const std::vector &numbers, int decimal_places, size_t advance) { 36 | return findAlignmentWidth(numbers.data(), numbers.size(), decimal_places, advance); 37 | } 38 | 39 | } // namespace parse 40 | } // namespace stormm 41 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tripeptides/ASP_PRO_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 38 0.0000000E+00 3 | 1.8653325 1.6954411 1.2265430 1.9241780 2.6496956 0.7048262 4 | 1.4633265 3.4313064 1.3050526 1.4229013 2.5774588 -0.2589561 5 | 3.3755847 2.9900951 0.4763310 4.2488337 2.2010597 0.8094575 6 | 3.6091191 4.1721217 -0.0780258 2.8278610 4.7803481 -0.2710459 7 | 4.9181633 4.7151693 -0.4567127 5.6866171 4.2497886 0.1615460 8 | 5.1747937 4.3523370 -1.9278461 5.1311639 3.2680082 -2.0440111 9 | 4.3840376 4.7926797 -2.5379723 6.5255563 4.8596485 -2.4193522 10 | 7.5419636 4.2119532 -2.0908727 6.5302815 5.9396793 -3.0480037 11 | 4.9217731 6.2490539 -0.2302904 3.8319513 6.8371779 -0.2232161 12 | 6.0676772 6.9338584 -0.0147816 7.4003696 6.3692600 0.1806835 13 | 7.9451272 6.3827916 -0.7652974 7.3809569 5.3566680 0.5839676 14 | 8.0921582 7.3040422 1.1643381 9.1770431 7.2475684 1.0816071 15 | 7.7606929 7.0836340 2.1800635 7.5551356 8.6593176 0.7177693 16 | 8.1010509 8.9900619 -0.1675578 7.6217873 9.4048580 1.5093174 17 | 6.0985735 8.3594528 0.3499217 5.4825795 8.4739331 1.2426309 18 | 5.5834671 9.3690870 -0.6917748 5.5803698 10.5691668 -0.4039212 19 | 5.1606980 8.9280713 -1.8828772 5.2254404 7.9330309 -2.0621614 20 | 4.5457294 9.7693084 -2.9024387 4.0642774 9.1451374 -3.6572695 21 | 3.7949133 10.4114772 -2.4436897 5.3137350 10.3936078 -3.3640976 22 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tripeptides/GLY_ILE_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 38 0.0000000E+00 3 | 2.0469014 0.9902133 -0.2217038 2.0315966 2.0735653 -0.3333445 4 | 1.3528894 2.5067853 0.3987093 1.7092406 2.3333057 -1.3396661 5 | 3.4251124 2.6087408 -0.1005958 4.3424561 1.8441944 0.1653454 6 | 3.5815250 3.9261450 -0.1970760 2.7814896 4.5003358 -0.4205487 7 | 4.8546708 4.6189606 0.0073550 5.2628514 4.3408154 0.9795205 8 | 5.5632963 4.3103436 -0.7614920 4.7034467 6.1410802 -0.0459540 9 | 3.6413207 6.6544169 -0.3957200 5.7658021 6.8656200 0.3107010 10 | 6.6194287 6.3889054 0.5685656 5.8113536 8.3349710 0.3385737 11 | 5.2234983 8.7017628 -0.5038755 5.1605606 8.8660920 1.6426249 12 | 4.1650054 8.4231923 1.7090101 5.9434055 8.4468904 2.9025549 13 | 6.9239946 8.9241302 2.9216740 5.3937874 8.7284474 3.7998378 14 | 6.0785052 7.3656458 2.9208374 4.9774364 10.3994764 1.5914940 15 | 5.9399528 10.8941315 1.7267797 4.5863913 10.6731359 0.6106296 16 | 3.9965994 10.9381749 2.6412308 4.3874641 10.7814396 3.6461907 17 | 3.8563605 12.0083464 2.4864906 3.0324313 10.4381201 2.5426156 18 | 7.2566310 8.8226434 0.1435996 8.1988446 8.1229815 0.5112491 19 | 7.4334260 10.0130836 -0.4424428 6.6136036 10.5259148 -0.7259193 20 | 8.7416186 10.6179261 -0.6868731 9.3704142 9.9236132 -1.2484216 21 | 8.6318773 11.5426620 -1.2550265 9.2304244 10.8353655 0.2648846 22 | -------------------------------------------------------------------------------- /src/Trajectory/coordinate_swap_plan.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "coordinate_swap_plan.h" 3 | 4 | namespace stormm { 5 | namespace trajectory { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | CoordinateSwapPlan::CoordinateSwapPlan(const CoordinateLineFormat layout_in, 9 | const int atom_count_in, const int total_width_in, 10 | const int fraction_in, const int x_start_in, 11 | const int y_start_in, const int z_start_in, 12 | const std::vector &coordinate_lines_in, 13 | const std::vector &x_widths_in, 14 | const std::vector &y_widths_in, 15 | const std::vector &z_widths_in, 16 | const std::vector &x_starts_in, 17 | const std::vector &y_starts_in, 18 | const std::vector &z_starts_in) : 19 | layout{layout_in}, atom_count{atom_count_in}, total_width{total_width_in}, 20 | fraction{fraction_in}, x_start{x_start_in}, y_start{y_start_in}, z_start{z_start_in}, 21 | coordinate_lines{coordinate_lines_in}, x_widths{x_widths_in}, y_widths{y_widths_in}, 22 | z_widths{z_widths_in}, x_starts{x_starts_in}, y_starts{y_starts_in}, z_starts{z_starts_in} 23 | {} 24 | 25 | } // namespace trajectory 26 | } // namespace stormm 27 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_lys.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 41 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.2815215 7.9244765 0.0000059 11 | 5.7942702 8.3231093 -0.8898128 5.6099696 8.5215206 1.2321507 12 | 4.5554763 8.2457349 1.2413875 6.0929803 8.1387613 2.1312036 13 | 5.7374102 10.0407218 1.1945870 6.7916997 10.3173028 1.1857972 14 | 5.2541941 10.4242780 0.2959831 5.0658602 10.6377666 2.4267327 15 | 4.0113672 10.3619801 2.4359714 5.5488727 10.2550081 3.3257845 16 | 5.1932994 12.1569684 2.3891669 6.2475886 12.4335504 2.3803762 17 | 4.7100809 12.5405225 1.4905651 4.5459711 12.7324796 3.5768756 18 | 4.9938652 12.3775292 4.4096425 4.6303720 13.7386394 3.5519961 19 | 3.5689383 12.4766666 3.5849873 7.7360820 8.3725142 0.0000007 20 | 8.6439331 7.5441142 -0.0000057 7.9419304 9.6915484 0.0000019 21 | 7.1571251 10.3272999 0.0000060 9.2754454 10.2584168 -0.0000010 22 | 10.0122603 9.4551706 -0.0000068 9.4093117 10.8735583 -0.8898220 23 | 9.4093190 10.8735490 0.8898250 24 | -------------------------------------------------------------------------------- /src/Reporting/display.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_DISPLAY_H 3 | #define STORMM_DISPLAY_H 4 | 5 | #include 6 | #include 7 | #include 8 | #include "copyright.h" 9 | 10 | namespace stormm { 11 | namespace display { 12 | 13 | /// \brief Produce a horizontal bar of repeating charaters using end points of the developer's 14 | /// choice. 15 | /// 16 | /// \param left_corner The left border of the rule bar 17 | /// \param right_corner The right border of the fule bar 18 | /// \param width Total width of the rule bar, including the left and right end points 19 | std::string horizontalRule(const std::string &left_corner = std::string("+"), 20 | const std::string &right_corner = std::string("+"), int width = 79, 21 | const char middle = '-'); 22 | 23 | /// \brief Print a horizontal bar of --- to a file (or the terminal screen), using end points of 24 | /// the developer's choice (default '+') 25 | /// 26 | /// \param left_corner The left border of the rule bar 27 | /// \param right_corner The right border of the fule bar 28 | /// \param width Total width of the rule bar, including the left and right end points 29 | /// \param foutp The file stream (defaults to the terminal) 30 | void terminalHorizontalRule(const std::string &left_corner = std::string("+"), 31 | const std::string &right_corner = std::string("+"), int width = 0, 32 | const char middle = '-', std::ostream *foutp = &std::cout); 33 | 34 | } // namespace display 35 | } // namespace stormm 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /test/Chemistry/pyrene_like.inpcrd: -------------------------------------------------------------------------------- 1 | MOL 2 | 42 3 | 1.2120000 0.7200000 0.0010000 1.2150000 -0.7190000 0.0000000 4 | 2.4310000 -1.4420000 0.0000000 3.7030000 -0.7260000 0.0000000 5 | 3.6910000 0.6960000 0.0010000 2.4530000 1.4150000 0.0010000 6 | 2.4690000 2.8260000 0.0020000 3.7150000 3.5230000 0.0030000 7 | 3.7090000 4.5820000 0.0040000 1.2550000 3.5280000 0.0020000 8 | 1.2680000 4.5880000 0.0030000 0.0530000 2.8580000 0.0010000 9 | -0.8310000 3.4330000 0.0020000 -0.0050000 1.4440000 0.0010000 10 | -1.2770000 0.7260000 -0.0000000 2.3730000 -2.8570000 0.0000000 11 | 3.2570000 -3.4320000 0.0010000 1.1710000 -3.5270000 0.0000000 12 | 1.1580000 -4.5870000 0.0000000 -0.0430000 -2.8250000 -0.0000000 13 | -1.2890000 -3.5220000 -0.0000000 -1.2820000 -4.5820000 -0.0000000 14 | -0.0260000 -1.4140000 -0.0000000 -1.2650000 -0.6950000 -0.0000000 15 | -2.4880000 -1.4130000 -0.0000000 -2.4680000 -2.8420000 -0.0000000 16 | -3.3890000 -3.3660000 -0.0000000 -3.7040000 -0.7170000 -0.0010000 17 | -4.6170000 -1.2540000 -0.0010000 -3.7160000 0.6640000 -0.0010000 18 | -4.6400000 1.1850000 -0.0010000 -2.5210000 1.3790000 -0.0010000 19 | -2.5830000 2.4320000 -0.0010000 4.9150000 1.4140000 0.0020000 20 | 4.8950000 2.8420000 0.0030000 5.8150000 3.3670000 0.0040000 21 | 6.1300000 0.7170000 0.0010000 7.0440000 1.2540000 0.0010000 22 | 6.1420000 -0.6640000 -0.0000000 7.0660000 -1.1850000 -0.0010000 23 | 4.9460000 -1.3780000 -0.0010000 5.0090000 -2.4320000 -0.0020000 24 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/GLU_ASP_LEU_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 39 0.0000000E+00 3 | 1.9066913 1.6275145 1.0721563 2.0091957 2.5222586 0.4614957 4 | 1.3973263 3.3245681 0.8684078 1.7126527 2.3093551 -0.5633426 5 | 3.4553567 2.9558666 0.4699609 4.2811524 2.3155809 1.1071616 6 | 3.7349034 4.0494609 -0.2287394 2.9832617 4.5447399 -0.6832732 7 | 5.0601975 4.6582019 -0.3901866 5.6755561 4.4146306 0.4764870 8 | 5.7328168 4.0653635 -1.6441588 5.7484584 2.9793297 -1.5360169 9 | 5.1320603 4.3121814 -2.5213192 7.1759079 4.5427794 -1.8689950 10 | 7.1646377 5.5948003 -2.1622312 7.7168349 4.4612618 -0.9225624 11 | 7.9020620 3.7166046 -2.9482718 7.2531365 3.3494368 -3.9560631 12 | 9.1130347 3.4558011 -2.7613023 4.9052263 6.1903381 -0.4574244 13 | 3.9065599 6.6810655 -0.9872519 5.8519085 6.9399891 0.1145700 14 | 6.6865653 6.4932505 0.4664509 5.8233011 8.4075901 0.2319423 15 | 5.3809331 8.8235302 -0.6749001 4.9418895 8.8195518 1.4332704 16 | 3.9947911 8.2803269 1.3762596 5.4406849 8.5157254 2.3557917 17 | 4.6142018 10.3216429 1.5069653 4.8293573 11.0385751 0.4999849 18 | 4.1545720 10.7533361 2.5873192 7.2580147 8.9656450 0.3667556 19 | 8.1928195 8.2309584 0.6986844 7.4421746 10.2650286 0.1146343 20 | 6.5922424 10.8130804 -0.0291297 8.7241991 10.9572174 0.1822688 21 | 9.4392722 10.4640078 -0.4779450 8.5969720 11.9961645 -0.1218583 22 | 9.1005042 10.9187747 1.2053766 23 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_C4.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 42 3 | 1.2230000 0.7320000 -0.0010000 0.0070000 1.4210000 -0.0070000 4 | 0.0090000 2.4800000 -0.0120000 -1.2100000 0.7350000 -0.0060000 5 | -1.1980000 -0.6620000 -0.0020000 -2.1160000 -1.1900000 -0.0030000 6 | 0.0040000 -1.3740000 0.0020000 1.2080000 -0.6650000 0.0040000 7 | 2.1250000 -1.1950000 0.0090000 4.9160000 2.8570000 0.0070000 8 | 5.8350000 3.3860000 0.0090000 3.9550000 3.1330000 -0.9610000 9 | 4.1430000 3.8730000 -1.6970000 2.7500000 2.4400000 -0.9640000 10 | 2.0230000 2.6500000 -1.7060000 2.4890000 1.4600000 0.0010000 11 | 3.4630000 1.1920000 0.9700000 3.2770000 0.4570000 1.7100000 12 | 4.6690000 1.8860000 0.9720000 5.3990000 1.6760000 1.7110000 13 | -4.9000000 2.8670000 -0.0090000 -5.8190000 3.3970000 -0.0080000 14 | -3.9210000 3.1710000 0.9320000 -4.0930000 3.9320000 1.6490000 15 | -2.7160000 2.4750000 0.9320000 -1.9760000 2.7050000 1.6540000 16 | -2.4740000 1.4670000 -0.0090000 -3.4680000 1.1730000 -0.9500000 17 | -3.2970000 0.4170000 -1.6720000 -4.6730000 1.8680000 -0.9490000 18 | -5.4180000 1.6370000 -1.6670000 -0.0070000 -5.6360000 0.0010000 19 | -0.0110000 -6.6960000 -0.0010000 0.7540000 -4.9410000 -0.9340000 20 | 1.3300000 -5.4710000 -1.6480000 0.7580000 -3.5500000 -0.9320000 21 | 1.3340000 -3.0250000 -1.6500000 0.0020000 -2.8350000 0.0040000 22 | -0.7580000 -3.5470000 0.9400000 -1.3300000 -3.0200000 1.6590000 23 | -0.7620000 -4.9380000 0.9380000 -1.3410000 -5.4670000 1.6510000 24 | -------------------------------------------------------------------------------- /src/Math/log_scale_spline.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "log_scale_spline.h" 3 | 4 | namespace stormm { 5 | namespace stmath { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | ullint doublePrecisionSplineDetailMask(const int mantissa_bits) { 9 | ullint result = 0LLU; 10 | for (int i = 0; i < 52 - mantissa_bits; i++) { 11 | result |= (0x1LLU << i); 12 | } 13 | return result; 14 | } 15 | 16 | //------------------------------------------------------------------------------------------------- 17 | uint singlePrecisionSplineDetailMask(const int mantissa_bits) { 18 | uint result = 0U; 19 | for (int i = 0; i < 23 - mantissa_bits; i++) { 20 | result |= (0x1U << i); 21 | } 22 | return result; 23 | } 24 | 25 | //------------------------------------------------------------------------------------------------- 26 | double doublePrecisionSplineArgument(const double arg, const int mantissa_bits, 27 | const ullint detail_mask) { 28 | Ecumenical8 xfrm = { .d = arg }; 29 | xfrm.ulli = (((xfrm.ulli & detail_mask) << mantissa_bits) | 0x3ff0000000000000ULL); 30 | return xfrm.d; 31 | } 32 | 33 | //------------------------------------------------------------------------------------------------- 34 | float singlePrecisionSplineArgument(const float arg, const int mantissa_bits, 35 | const uint detail_mask) { 36 | Ecumenical4 xfrm = { .f = arg }; 37 | xfrm.ui = (((xfrm.ui & detail_mask) << mantissa_bits) | 0x3f800000U); 38 | return xfrm.f; 39 | } 40 | 41 | } // namespace stmath 42 | } // namespace stormm 43 | -------------------------------------------------------------------------------- /src/Analysis/comparison_guide.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace analysis { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | ComparisonGuide::ComparisonGuide(const CoordinateSeries *cs_in, const AtomGraph *ag_in, 10 | const GpuDetails &gpu) : 11 | ComparisonGuide() 12 | { 13 | cs_ptr = reinterpret_cast*>(const_cast*>(cs_in)); 14 | basis = StructureSource::SERIES; 15 | csptr_data_type = std::type_index(typeid(T)).hash_code(); 16 | ag_pointers.resize(1); 17 | ag_pointers[0] = const_cast(ag_in); 18 | allocateSystemIndexing(); 19 | setSystemIndexing(); 20 | setWorkUnits(gpu); 21 | } 22 | 23 | //------------------------------------------------------------------------------------------------- 24 | template 25 | ComparisonGuide::ComparisonGuide(const CoordinateSeries &cs_in, const AtomGraph &ag_in, 26 | const GpuDetails &gpu) : 27 | ComparisonGuide(cs_in.getSelfPointer(), ag_in.getSelfPointer(), gpu) 28 | {} 29 | 30 | //------------------------------------------------------------------------------------------------- 31 | template 32 | const CoordinateSeries* ComparisonGuide::getSeriesPointer() const { 33 | if (cs_ptr == nullptr) { 34 | rtErr("No CoordinateSeries is referenced.", "ComparsionGuide", "getSeriesPointer"); 35 | } 36 | return reinterpret_cast*>(cs_ptr); 37 | } 38 | 39 | } // namespace analysis 40 | } // namespace stormm 41 | -------------------------------------------------------------------------------- /src/Math/sorting_enumerators.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_SORTING_ENUMERATORS_H 3 | #define STORMM_SORTING_ENUMERATORS_H 4 | 5 | #include 6 | #include "copyright.h" 7 | #include "DataTypes/stormm_vector_types.h" 8 | 9 | namespace stormm { 10 | namespace stmath { 11 | 12 | /// \brief Enumerate the directions that a sort can go. 13 | enum class SortDirection { 14 | ASCENDING, ///< Values will be ordered in ascending order 15 | DESCENDING, ///< Values will be ordered in descending order 16 | AUTOMATIC ///< Triggers locally defined "default" behavior on a case-by-case basis 17 | }; 18 | 19 | /// \brief Enumerate the ways to handle multiple copies of a single value occurring in an array 20 | enum class UniqueValueHandling { 21 | UNIQUE_VALUES_ONLY, ///< Unique values will register once, regardless of the number of copies 22 | CONFIRM_ALL_COPIES ///< Each copy of any given value will be confirmed, i.e. if two vectors 23 | ///< contain four entries of 5.5 and one contains two entries of 2.7 24 | ///< while the other contains three entries of 2.7, they differ by a 25 | ///< single entry of 2.7. 26 | }; 27 | 28 | /// \brief Produce a human-readable string corresponding to each enumeration. Overloads of this 29 | /// function here and in other libraries provide handling for each enum class object. 30 | /// 31 | /// \param input The enumeration to translate 32 | /// \{ 33 | std::string getEnumerationName(SortDirection input); 34 | std::string getEnumerationName(UniqueValueHandling input); 35 | /// \} 36 | 37 | } // namespace stmath 38 | } // namespace stormm 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/Random/random_enumerators.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_RANDOM_ENUMERATORS_H 3 | #define STORMM_RANDOM_ENUMERATORS_H 4 | 5 | #include 6 | #include "copyright.h" 7 | 8 | namespace stormm { 9 | namespace random { 10 | 11 | /// \brief Enumerate the types of random numbers that can be generated. 12 | enum class RandomNumberKind { 13 | UNIFORM, ///< Uniform random number distribution 14 | GAUSSIAN ///< Normal distribution of random numbers 15 | }; 16 | 17 | /// \brief List the random number generator types that can power a RandomNumberMill object. 18 | enum class RandomAlgorithm { 19 | XOROSHIRO_128P, ///< Xoroshiro128+ generator (see random.h, fails BigCrush and not advised for 20 | ///< powering mills with > 1024 generator streams) 21 | XOSHIRO_256PP ///< Xoshiro256++ generator (see random.h--high quality generator) 22 | }; 23 | 24 | /// \brief Define the order in which various random number generators will fill a matrix. 25 | enum class RngFillMode { 26 | COLUMNS, ///< Fill the column-major matrix one column at a time 27 | ROWS ///< Fill the column-major matrix in row-major order, one row at a time 28 | }; 29 | 30 | 31 | /// \brief Produce human-readable strings for each enumeration. Overloads of this function here 32 | /// and in other libraries server different enum classes. 33 | /// 34 | /// \param input The enumerated value to translate 35 | /// \{ 36 | std::string getEnumerationName(RandomNumberKind input); 37 | std::string getEnumerationName(RandomAlgorithm input); 38 | std::string getEnumerationName(RngFillMode input); 39 | /// \} 40 | 41 | } // namespace random 42 | } // namespace stormm 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/HID_CYS_PRO_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 40 0.0000000E+00 3 | 1.8877586 1.3925315 0.9178323 1.9646267 2.3233730 0.3573304 4 | 1.3091004 3.0712937 0.7991923 1.6860156 2.1495991 -0.6801884 5 | 3.3920400 2.8146383 0.4125306 4.2430161 2.1751575 1.0156680 6 | 3.6470414 3.9586856 -0.2180885 2.8857179 4.4417613 -0.6685903 7 | 4.9582077 4.6102544 -0.2685863 5.4904246 4.3974609 0.6595512 8 | 5.7716008 4.0186780 -1.4331205 5.7630300 2.9300154 -1.3517699 9 | 5.2953769 4.2843981 -2.3774287 7.2099368 4.4692302 -1.4670461 10 | 7.6896116 5.6576015 -1.9723834 7.1545744 6.3685354 -2.4438093 11 | 9.0051068 5.7220490 -1.7056005 9.6537826 6.5511855 -1.9606554 12 | 9.4068603 4.6128631 -1.0675918 8.2720471 3.8151351 -0.9032717 13 | 8.2325161 2.8630913 -0.3904104 4.7950402 6.1359762 -0.3820993 14 | 3.8055879 6.6128331 -0.9358916 5.7589626 6.9071756 0.1288399 15 | 6.5937534 6.4651050 0.4977902 5.7702433 8.3730736 0.0971862 16 | 5.2912249 8.7088894 -0.8250222 4.9356229 8.8812149 1.2873917 17 | 3.9812950 8.3511923 1.2973322 5.4558086 8.6789311 2.2253936 18 | 4.6029061 10.6622195 1.1454284 3.7983413 10.7702561 2.2108207 19 | 7.2212754 8.9051729 0.0934291 8.1555437 8.1464423 0.3494645 20 | 7.4171482 10.1932641 -0.2158890 6.5973325 10.7649945 -0.3638244 21 | 8.7244488 10.8504416 -0.2555669 9.4436323 10.2304773 -0.7944457 22 | 8.6448075 11.8173785 -0.7540379 9.0923702 11.0049749 0.7601105 23 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/SER_HIE_ILE_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 40 0.0000000E+00 3 | 1.6090722 1.6095997 0.2008031 1.7609422 2.6476850 -0.0924177 4 | 1.2099822 3.3015076 0.5807419 1.4194391 2.7928442 -1.1151566 5 | 3.2342627 2.9694432 -0.0059717 4.0312897 2.1107571 0.3451870 6 | 3.5933302 4.2079443 -0.3350190 2.8747673 4.8677291 -0.5958584 7 | 4.9605847 4.7387019 -0.2447903 5.4223156 4.3719173 0.6729519 8 | 5.7934710 4.2329752 -1.4290808 5.7600842 3.1427444 -1.4533382 9 | 5.3801879 4.6226808 -2.3609181 7.1380962 4.6462884 -1.2964629 10 | 7.6716396 4.2027550 -1.9626493 4.9423146 6.2745654 -0.1888461 11 | 3.9281307 6.8936291 -0.5198895 6.0415606 6.8974364 0.2445421 12 | 6.8750770 6.3370569 0.3850052 6.2079812 8.3553278 0.3269829 13 | 5.7382624 8.8018050 -0.5508079 5.4917920 8.8901161 1.5828653 14 | 4.6536808 8.2387615 1.8342264 6.1779630 8.8834688 2.4311527 15 | 4.9375001 10.2807780 1.3949517 5.6715263 11.4678498 1.4249403 16 | 4.7972165 12.4513556 1.1686739 5.0520314 13.5029235 1.1299409 17 | 3.5698078 11.9448680 0.9603668 2.7432695 12.4822247 0.7409317 18 | 3.6408082 10.5757126 1.0925057 2.8404414 9.8585286 0.9667073 19 | 7.6981552 8.7452187 0.2977223 8.5674024 7.8745851 0.3036818 20 | 7.9984968 10.0472052 0.2590779 7.2315040 10.7027760 0.3645605 21 | 9.3577768 10.5813930 0.2174941 9.9414509 10.0502933 -0.5373395 22 | 9.3349246 11.6442046 -0.0258830 9.8341722 10.4441460 1.1897895 23 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_arg.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 43 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.2815215 7.9244765 0.0000059 11 | 5.7942702 8.3231093 -0.8898128 5.6099696 8.5215206 1.2321507 12 | 4.5554763 8.2457349 1.2413875 6.0929803 8.1387613 2.1312036 13 | 5.7374102 10.0407218 1.1945870 6.7916997 10.3173028 1.1857972 14 | 5.2541941 10.4242780 0.2959831 5.0658602 10.6377666 2.4267327 15 | 4.0113672 10.3619801 2.4359714 5.5488727 10.2550081 3.3257845 16 | 5.1698710 12.1141060 2.4244969 5.6463581 12.5624982 1.6550791 17 | 4.6645494 12.8773341 3.3893977 4.0239611 12.3605724 4.4341486 18 | 3.9110842 11.3596845 4.5088621 3.6533185 12.9714067 5.1480149 19 | 4.8154646 14.1947718 3.2870086 5.3024412 14.5839584 2.4923466 20 | 4.4424014 14.7999914 4.0043869 7.7360820 8.3725142 0.0000007 21 | 8.6439331 7.5441142 -0.0000057 7.9419304 9.6915484 0.0000019 22 | 7.1571251 10.3272999 0.0000060 9.2754454 10.2584168 -0.0000010 23 | 10.0122603 9.4551706 -0.0000068 9.4093117 10.8735583 -0.8898220 24 | 9.4093190 10.8735490 0.8898250 25 | -------------------------------------------------------------------------------- /test/Namelists/coord/gly_trp.inpcrd: -------------------------------------------------------------------------------- 1 | ACE 2 | 43 3 | 2.0000010 1.0000000 -0.0000013 2.0000010 2.0900000 0.0000001 4 | 1.4862640 2.4538490 0.8898240 1.4862590 2.4538520 -0.8898200 5 | 3.4274200 2.6407950 -0.0000030 4.3905800 1.8774060 -0.0000066 6 | 3.5553754 3.9696488 -0.0000031 2.7345556 4.5581675 -0.0000013 7 | 4.9210944 4.4538117 -0.0000043 5.4356928 4.0911700 0.8898151 8 | 5.4356892 4.0911771 -0.8898289 4.9444709 5.9756319 0.0000014 9 | 3.8952348 6.6155888 0.0000062 6.1809478 6.4789706 0.0000022 10 | 6.9799761 5.8611899 -0.0000008 6.3690784 7.9157062 0.0000058 11 | 5.9069226 8.3431801 -0.8898128 5.7350057 8.5524127 1.2321507 12 | 4.6657166 8.3411435 1.2413876 6.1938923 8.1410404 2.1312035 13 | 5.8796834 10.0528321 1.3210970 5.4181773 10.8512846 2.2932518 14 | 4.8722383 10.4254077 3.1350827 5.7931561 12.1878281 1.9498215 15 | 5.5849019 13.0133839 2.4931331 6.4503784 12.1686150 0.8167767 16 | 6.9981838 13.2520737 0.1196189 6.8990281 14.2621741 0.5170656 17 | 7.6500768 12.9449998 -1.0690103 8.1007078 13.7391057 -1.6643486 18 | 7.7370828 11.6703372 -1.5050905 8.2521329 11.4480047 -2.4396445 19 | 7.1773057 10.5946411 -0.7856266 7.2668533 9.5778731 -1.1680724 20 | 6.5207220 10.9039198 0.4115556 7.8481527 8.2746257 0.0000005 21 | 8.7040459 7.3926465 -0.0000060 8.1019685 9.5852753 0.0000017 22 | 7.3408707 10.2492252 0.0000060 9.4552698 10.1031343 -0.0000012 23 | 10.1623006 9.2735512 -0.0000071 9.6114807 10.7129846 -0.8898221 24 | 9.6114878 10.7129749 0.8898249 25 | -------------------------------------------------------------------------------- /src/Reporting/display.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "copyright.h" 4 | #include "display.h" 5 | 6 | namespace stormm { 7 | namespace display { 8 | 9 | //------------------------------------------------------------------------------------------------- 10 | std::string horizontalRule(const std::string &left_corner, const std::string &right_corner, 11 | const int width, const char middle) { 12 | const int n_left = left_corner.size(); 13 | const int n_right = right_corner.size(); 14 | const int actual_width = std::max(width, n_left + n_right); 15 | const int n_middle = actual_width - left_corner.size() - right_corner.size(); 16 | std::string result(actual_width + 1, middle); 17 | for (int i = 0; i < n_left; i++) { 18 | result[i] = left_corner[i]; 19 | } 20 | for (int i = 0; i < n_right; i++) { 21 | result[n_left + n_middle + i] = right_corner[i]; 22 | } 23 | result[actual_width] = '\n'; 24 | return result; 25 | } 26 | 27 | //------------------------------------------------------------------------------------------------- 28 | void terminalHorizontalRule(const std::string &left_corner, const std::string &right_corner, 29 | const int width, const char middle, std::ostream *foutp) { 30 | 31 | // Obtain the console size 32 | struct winsize console_dims; 33 | ioctl(STDOUT_FILENO, TIOCGWINSZ, &console_dims); 34 | int actual_width = (width == 0) ? console_dims.ws_col - 1 : width; 35 | const std::string hrule = horizontalRule(left_corner, right_corner, actual_width, middle); 36 | foutp->write(hrule.c_str(), hrule.size()); 37 | } 38 | 39 | } // namespace display 40 | } // namespace stormm 41 | -------------------------------------------------------------------------------- /test/Trajectory/med_1.inpcrd: -------------------------------------------------------------------------------- 1 | L1 2 | 44 3 | -4.2450000 -2.2730000 0.0160000 -4.2070000 -3.3120000 0.3120000 4 | -4.7940000 -2.2170000 -0.9130000 -4.8070000 -1.7380000 0.7680000 5 | -2.8820000 -1.7480000 -0.1640000 -2.4800000 -2.3710000 -0.8510000 6 | -2.1340000 -1.6950000 1.1050000 -2.3010000 -2.5820000 1.7000000 7 | -2.6510000 -0.4420000 1.8350000 -1.8650000 0.0730000 2.3880000 8 | -3.4520000 -0.7190000 2.5210000 -3.2070000 0.4370000 0.7240000 9 | -2.8090000 1.4480000 0.7660000 -4.2910000 0.4990000 0.8280000 10 | -2.8730000 -0.3340000 -0.5720000 -3.6270000 -0.1470000 -1.3260000 11 | -1.4600000 -0.0260000 -1.1750000 -1.5550000 -0.2950000 -2.2290000 12 | -0.3430000 -0.9680000 -0.6290000 -0.3080000 -1.8140000 -1.3160000 13 | -0.6270000 -1.5640000 0.7690000 -0.1860000 -2.5600000 0.8000000 14 | -0.1220000 -0.9660000 1.5270000 0.9790000 -0.3510000 -0.6750000 15 | 2.1500000 -1.0300000 -0.6420000 2.1240000 -2.2450000 -0.7520000 16 | 3.3760000 -0.2600000 -0.4530000 4.5980000 -0.9230000 -0.2730000 17 | 4.6370000 -1.9810000 -0.2870000 5.7690000 -0.2060000 -0.0660000 18 | 6.6850000 -0.7180000 0.0730000 5.7400000 1.1840000 -0.0410000 19 | 6.6350000 1.7300000 0.1180000 4.5370000 1.8570000 -0.2230000 20 | 4.5150000 2.9160000 -0.2060000 3.3620000 1.1430000 -0.4290000 21 | 2.4560000 1.6730000 -0.5670000 -1.0780000 1.4640000 -1.1690000 22 | -1.2650000 2.1540000 -2.1710000 -0.5060000 1.9880000 -0.0680000 23 | -0.0780000 3.3680000 0.0040000 0.8390000 3.5060000 -0.5700000 24 | 0.1160000 3.6320000 1.0450000 -0.8450000 4.0400000 -0.3840000 25 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/LYS_GLY_ASN_ff14SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 41 0.0000000E+00 3 | 1.8705684 1.2286454 0.4257641 1.9142463 2.2525480 0.0561782 4 | 1.2596141 2.8824799 0.6556784 1.6017425 2.2769944 -0.9859246 5 | 3.3344143 2.7550725 0.1679770 4.2125554 2.0317830 0.6227548 6 | 3.5675748 4.0016986 -0.2496770 2.7897726 4.5359859 -0.6124169 7 | 4.8801857 4.6630882 -0.1934446 5.3961948 4.3160207 0.7035769 8 | 5.7072518 4.2385516 -1.4248289 5.8686387 3.1597230 -1.3844127 9 | 5.1501060 4.4710653 -2.3348636 7.0681190 4.9454873 -1.4775212 10 | 6.8985167 6.0037675 -1.6703206 7.5693942 4.8299236 -0.5148798 11 | 7.9820021 4.4139922 -2.5833907 8.2001207 3.3596016 -2.4019118 12 | 7.4810233 4.5244089 -3.5470239 9.2761714 5.2374907 -2.5604735 13 | 9.0163750 6.2962624 -2.6728500 9.7440643 5.1209856 -1.5773842 14 | 10.2145823 4.8204063 -3.6312338 9.7883619 4.9451010 -4.5406639 15 | 11.0595533 5.3768754 -3.5938140 10.4656688 3.8461019 -3.5214379 16 | 4.7359028 6.1856555 -0.0950019 3.9119079 6.7718440 -0.7882512 17 | 5.5808449 6.8119945 0.7266876 6.2291947 6.2421529 1.2435454 18 | 5.7803160 8.2658829 0.7818942 4.9680059 8.7768270 0.2628795 19 | 5.7613573 8.5864013 1.8234599 7.1107245 8.7198297 0.1602623 20 | 7.9081815 7.9025983 -0.3069043 7.3550153 10.0349882 0.1770756 21 | 6.6508284 10.6400006 0.5726253 8.5796789 10.6589799 -0.3231650 22 | 9.4523535 10.1066243 0.0311834 8.5790349 10.6577881 -1.4143339 23 | 8.6481724 11.6893261 0.0313272 24 | -------------------------------------------------------------------------------- /docker/STORMM-CONFIG/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use NVIDIA CUDA base image 2 | FROM nvidia/cuda:12.8.1-devel-ubuntu22.04 3 | 4 | # Set non-interactive mode for apt-get to avoid prompts 5 | ENV DEBIAN_FRONTEND=noninteractive 6 | ENV TZ=UTC 7 | 8 | # Install necessary packages 9 | RUN apt-get update && \ 10 | apt-get clean && \ 11 | apt-get install -y \ 12 | wget \ 13 | python3-pip \ 14 | tzdata \ 15 | gcovr \ 16 | git \ 17 | libeigen3-dev \ 18 | libboost-all-dev \ 19 | gcc \ 20 | g++ \ 21 | cmake \ 22 | && apt-get clean && \ 23 | rm -rf /var/lib/apt/lists/* 24 | 25 | # Install CUDA 12.x 26 | RUN echo "Checking and installing CUDA 12.x..." && \ 27 | wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \ 28 | dpkg -i cuda-keyring_1.1-1_all.deb && \ 29 | apt-get update -y && \ 30 | apt-get -y install cuda-toolkit-12-8 && \ 31 | export PATH=/usr/local/cuda/bin:$PATH && \ 32 | export CUDADIR=/usr/local/cuda && \ 33 | export CXXFLAGS="-I/usr/local/cuda/include $CXXFLAGS" && \ 34 | export LDFLAGS="-L/usr/local/cuda/lib64 $LDFLAGS" 35 | 36 | # Set the working directory 37 | WORKDIR /app 38 | 39 | # Copy the code from the CI/CD pipeline context into the Docker image 40 | RUN git clone https://github.com/psivant/stormm.git 41 | 42 | # Build STORMM using CMake with CUDA enabled 43 | RUN cmake -S stormm -B stormmbuild \ 44 | -DCMAKE_BUILD_TYPE=RELEASE \ 45 | -DSTORMM_ENABLE_CUDA=YES \ 46 | -DSTORMM_ENABLE_RDKIT=NO \ 47 | -DCUSTOM_NVCC_THREADS=8 48 | 49 | RUN export STORMM_HOME=/app/stormm 50 | WORKDIR /app/stormmbuild 51 | RUN make -j 52 | 53 | # Set the default command to run bash 54 | CMD ["/bin/bash"] -------------------------------------------------------------------------------- /src/Numerics/numeric_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "Parsing/parse.h" 3 | #include "Parsing/parsing_enumerators.h" 4 | #include "numeric_enumerators.h" 5 | 6 | namespace stormm { 7 | namespace numerics { 8 | 9 | using parse::CaseSensitivity; 10 | using parse::strcmpCased; 11 | 12 | //------------------------------------------------------------------------------------------------- 13 | std::string getEnumerationName(const AccumulationMethod input) { 14 | switch (input) { 15 | case AccumulationMethod::SPLIT: 16 | return std::string("SPLIT"); 17 | case AccumulationMethod::WHOLE: 18 | return std::string("WHOLE"); 19 | case AccumulationMethod::AUTOMATIC: 20 | return std::string("AUTOMATIC"); 21 | } 22 | __builtin_unreachable(); 23 | } 24 | 25 | //------------------------------------------------------------------------------------------------- 26 | AccumulationMethod translateAccumulationMethod(const std::string &input) { 27 | if (strcmpCased(input, "SPLIT", CaseSensitivity::NO)) { 28 | return AccumulationMethod::SPLIT; 29 | } 30 | else if (strcmpCased(input, "WHOLE", CaseSensitivity::NO) || 31 | strcmpCased(input, "FUSED", CaseSensitivity::NO)) { 32 | return AccumulationMethod::WHOLE; 33 | } 34 | else if (strcmpCased(input, "AUTO", CaseSensitivity::NO) || 35 | strcmpCased(input, "AUTOMATIC", CaseSensitivity::NO)) { 36 | return AccumulationMethod::AUTOMATIC; 37 | } 38 | else { 39 | rtErr("Invalid specifier \"" + input + "\". Valid inputs include \"SPLIT\", \"WHOLE\", and " 40 | "\"AUTO\".", "translateAccumulationMethod"); 41 | } 42 | __builtin_unreachable(); 43 | } 44 | 45 | } // namespace numerics 46 | } // namespace stormm 47 | -------------------------------------------------------------------------------- /test/Parsing/simpsons.txt: -------------------------------------------------------------------------------- 1 | &monteburns 2 | xdim = 9.5, 3 | ydim = 10.5; 4 | zdim = 18.8 5 | 6 | /* This is a multiline 7 | comment, but it does end properly. */ 8 | 9 | nbox 57 10 | boxcolor "this is a value in quotes", boxmodel "this value, containing commas and multiple 11 | lines, /* and even a comment inside of it */, should all be one string" 12 | 13 | boxcolor "A second value for the \"box color\"" boxcolor "And a 'third' value" 14 | &end 15 | 16 | &wiggums 17 | 18 | // Finally try a struct value assignment 19 | broadcast = [ seasons 25 network = "You're watching CNN", neilsen = 2.1]// More comments 20 | / 21 | 22 | // This namelist should be problematic: it contains an unknown keyword 23 | &lisa 24 | NelsonMuntz = boyfriend, 25 | Age = 7, 26 | &end 27 | 28 | ! This namelist contains a real value where there should be an integer 29 | &lisa 30 | Grade = 3.5, 31 | Age = 8, 32 | &end 33 | 34 | # This namelist should finally work 35 | &lisa 36 | Grade = 3, 37 | Age = 8, 38 | FoodPrefs = "enough gazpacho for all" 39 | Instrument = "piano" 40 | GenesisTub = { Source = "lock of hair", Product = "Lilliputians", Height = 3.8 }, 41 | GenesisTub = { Source "old cracker" Product "reptiles" Population = 782 }, 42 | GenesisTub = { Source = "starfish", Product = "cool hippie people", Population = 5, 43 | 44 | // This comment is placed here to ensure that multi-line STRUCTs work 45 | Height = 4.20 }, 46 | &end 47 | 48 | /* This namelist should not work because of a repeated sub-key within a STRUCT */ 49 | &lisa 50 | Grade = 3, 51 | Age = 8, 52 | GenesisTub = { Source = "lock of hair", Product = "Lilliputians", Height = 3.8, Height = 2.1 }, 53 | &end 54 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/VAL_ASN_SER_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 42 0.0000000E+00 3 | 1.9423416 1.1802825 0.3914100 1.9696107 2.2458784 0.1677601 4 | 1.3921289 2.7911903 0.9115382 1.5595243 2.4220182 -0.8247236 5 | 3.4040108 2.7172432 0.2051405 4.3025047 1.9300697 0.4690933 6 | 3.6094036 4.0099802 -0.0429097 2.8057389 4.5932699 -0.2302384 7 | 4.9227730 4.6725070 -0.1469697 5.5028577 4.4120932 0.7383285 8 | 5.6898988 4.1621674 -1.3965744 5.6999571 3.0736410 -1.3719954 9 | 5.0381053 4.5841420 -2.7211638 5.0563027 5.6683156 -2.8330369 10 | 5.5779321 4.1328616 -3.5538430 4.0050735 4.2387760 -2.7531114 11 | 7.1599777 4.6011153 -1.4241070 7.6328156 4.3749078 -0.4681210 12 | 7.6836779 4.0474033 -2.2039543 7.2522049 5.6644415 -1.6418362 13 | 4.7269403 6.1963986 -0.1655369 3.6257339 6.6766714 -0.4315436 14 | 5.7851790 6.9594864 0.1155707 6.6669131 6.5026381 0.3079663 15 | 5.8094964 8.4245334 0.1815191 5.3461797 8.8208351 -0.7247314 16 | 5.0030720 8.8984333 1.4127102 4.0338597 8.4026949 1.4352640 17 | 5.5444034 8.6293136 2.3192871 4.7306674 10.3934969 1.4225616 18 | 4.9220363 11.1049694 0.4514543 4.2845314 10.9290723 2.5330314 19 | 4.1040990 11.9167927 2.5057200 4.1076483 10.3615088 3.3402569 20 | 7.2751470 8.9088722 0.2357139 8.1626184 8.1368864 0.5995628 21 | 7.5308191 10.1674420 -0.1364964 6.7322703 10.7562908 -0.3526613 22 | 8.8619957 10.7694578 -0.1649199 9.5423711 10.1364783 -0.7380922 23 | 8.8163855 11.7571982 -0.6257961 9.2456975 10.8637426 0.8524555 24 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_C5.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 45 3 | 1.2020000 0.6820000 -0.0240000 -0.0070000 1.3820000 -0.0170000 4 | -0.0000000 2.4410000 -0.0190000 -1.2310000 0.7080000 -0.0080000 5 | -1.2340000 -0.6890000 -0.0050000 -2.1570000 -1.2080000 0.0020000 6 | -0.0380000 -1.4120000 -0.0100000 1.1730000 -0.7160000 -0.0210000 7 | 2.0820000 -1.2600000 -0.0260000 4.9010000 2.7780000 -0.0410000 8 | 6.2290000 3.5260000 -0.0470000 6.5510000 3.7730000 0.9360000 9 | 6.1760000 4.4380000 -0.5900000 7.0050000 2.9470000 -0.4890000 10 | 3.9350000 3.0790000 -0.9940000 4.1070000 3.8240000 -1.7280000 11 | 2.7250000 2.3910000 -0.9890000 1.9850000 2.6120000 -1.7170000 12 | 2.4740000 1.3990000 -0.0330000 3.4620000 1.1060000 0.9160000 13 | 3.2780000 0.3570000 1.6450000 4.6730000 1.7920000 0.9120000 14 | 5.4080000 1.5560000 1.6370000 -4.8920000 2.8880000 0.0040000 15 | -5.8020000 3.4320000 0.0060000 -3.9210000 3.1500000 0.9670000 16 | -4.0940000 3.8920000 1.7040000 -2.7280000 2.4370000 0.9640000 17 | -1.9950000 2.6350000 1.7040000 -2.4870000 1.4540000 -0.0020000 18 | -3.4710000 1.1990000 -0.9640000 -3.3010000 0.4600000 -1.7040000 19 | -4.6650000 1.9120000 -0.9610000 -5.4040000 1.7120000 -1.6950000 20 | -0.0810000 -5.6720000 0.0130000 -0.0910000 -6.7320000 0.0190000 21 | 0.6490000 -4.9880000 -0.9540000 1.1940000 -5.5270000 -1.6860000 22 | 0.6620000 -3.5970000 -0.9620000 1.2130000 -3.0810000 -1.7050000 23 | -0.0540000 -2.8720000 -0.0030000 -0.7850000 -3.5720000 0.9640000 24 | -1.3280000 -3.0370000 1.6990000 -0.7980000 -4.9630000 0.9710000 25 | -1.3550000 -5.4840000 1.7080000 26 | -------------------------------------------------------------------------------- /test/Trajectory/symmetry_C6.inpcrd: -------------------------------------------------------------------------------- 1 | LIG 2 | 45 3 | 1.1910000 0.7460000 -0.0070000 -0.0240000 1.4340000 0.0040000 4 | -0.0260000 2.4950000 0.0170000 -1.2400000 0.7420000 -0.0110000 5 | -1.2280000 -0.6570000 -0.0320000 -2.1480000 -1.1880000 -0.0320000 6 | -0.0230000 -1.3630000 -0.0460000 1.1770000 -0.6500000 -0.0390000 7 | 2.5120000 -1.4170000 -0.0830000 2.4390000 -2.3570000 0.4140000 8 | 3.3000000 -0.8530000 0.3630000 2.8130000 -1.6240000 -1.0810000 9 | 4.9410000 2.7410000 0.0600000 5.8840000 3.2280000 0.0750000 10 | 4.2930000 2.5210000 -1.1510000 4.7420000 2.8440000 -2.0570000 11 | 3.0540000 1.8890000 -1.1730000 2.5600000 1.7370000 -2.1000000 12 | 2.4570000 1.4640000 0.0170000 3.1080000 1.7070000 1.2320000 13 | 2.6530000 1.4200000 2.1460000 4.3460000 2.3390000 1.2510000 14 | 4.8350000 2.5250000 2.1740000 -4.9320000 2.8660000 0.0100000 15 | -5.8510000 3.3940000 0.0150000 -3.9660000 3.1390000 0.9740000 16 | -4.1510000 3.8750000 1.7140000 -2.7610000 2.4460000 0.9680000 17 | -2.0330000 2.6560000 1.7090000 -2.5050000 1.4700000 -0.0030000 18 | -3.4850000 1.2050000 -0.9670000 -3.3070000 0.4740000 -1.7130000 19 | -4.6900000 1.8990000 -0.9600000 -5.4250000 1.6920000 -1.6950000 20 | 0.1320000 -5.6080000 -0.0910000 0.1850000 -6.6680000 -0.1020000 21 | 0.0350000 -4.9040000 -1.2870000 0.0090000 -5.4300000 -2.2080000 22 | -0.0400000 -3.5150000 -1.2730000 -0.1280000 -2.9870000 -2.1880000 23 | -0.0090000 -2.8180000 -0.0610000 0.0690000 -3.5360000 1.1370000 24 | 0.0590000 -3.0240000 2.0660000 0.1440000 -4.9240000 1.1210000 25 | 0.2000000 -5.4660000 2.0320000 26 | -------------------------------------------------------------------------------- /src/Math/statistical_enumerators.cpp: -------------------------------------------------------------------------------- 1 | #include "statistical_enumerators.h" 2 | 3 | namespace stormm { 4 | namespace stmath { 5 | 6 | //------------------------------------------------------------------------------------------------- 7 | std::string getEnumerationName(const VarianceMethod input) { 8 | switch (input) { 9 | case VarianceMethod::VARIANCE: 10 | return std::string("VARIANCE"); 11 | case VarianceMethod::STANDARD_DEVIATION: 12 | return std::string("STANDARD_DEVIATION"); 13 | case VarianceMethod::ROOT_MEAN_SQUARED_DEVIATION: 14 | return std::string("ROOT_MEAN_SQUARED_DEVIATION"); 15 | case VarianceMethod::COEFFICIENT_OF_VARIATION: 16 | return std::string("COEFFICIENT_OF_VARIATION"); 17 | case VarianceMethod::NORMALIZED_RMSD: 18 | return std::string("NORMALIZED_RMSD"); 19 | } 20 | __builtin_unreachable(); 21 | } 22 | 23 | //------------------------------------------------------------------------------------------------- 24 | std::string getEnumerationName(const DataOrder input) { 25 | switch (input) { 26 | case DataOrder::ASCENDING: 27 | return std::string("ASCENDING"); 28 | case DataOrder::DESCENDING: 29 | return std::string("DESCENDING"); 30 | case DataOrder::NONE: 31 | return std::string("NONE"); 32 | } 33 | __builtin_unreachable(); 34 | } 35 | 36 | //------------------------------------------------------------------------------------------------- 37 | std::string getEnumerationName(const ResamplingMethod input) { 38 | switch (input) { 39 | case ResamplingMethod::JACKKNIFE: 40 | return std::string("JACKKNIFE"); 41 | case ResamplingMethod::BOOTSTRAP: 42 | return std::string("BOOTSTRAP"); 43 | } 44 | __builtin_unreachable(); 45 | } 46 | 47 | } // namespace stmath 48 | } // namespace stormm 49 | -------------------------------------------------------------------------------- /src/Topology/atomgraph_abstracts.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "DataTypes/stormm_vector_types.h" 3 | #include "atomgraph_abstracts.h" 4 | 5 | namespace stormm { 6 | namespace topology { 7 | 8 | //------------------------------------------------------------------------------------------------- 9 | ChemicalDetailsKit::ChemicalDetailsKit(const int natom_in, const int nres_in, const int nmol_in, 10 | const int free_dof_in, const int cnst_dof_in, 11 | const char4* atom_names_in, const char4* res_names_in, 12 | const char4* atom_types_in, const int* z_numbers_in, 13 | const int* res_limits_in, const int* atom_numbers_in, 14 | const int* res_numbers_in, const int* mol_home_in, 15 | const int* mol_contents_in, const int* mol_limits_in, 16 | const double* masses_in, const float* sp_masses_in, 17 | const double* inv_masses_in, 18 | const float* sp_inv_masses_in) : 19 | natom{natom_in}, nres{nres_in}, nmol{nmol_in}, free_dof{free_dof_in}, cnst_dof{cnst_dof_in}, 20 | atom_names{atom_names_in}, res_names{res_names_in}, atom_types{atom_types_in}, 21 | z_numbers{z_numbers_in}, res_limits{res_limits_in}, atom_numbers{atom_numbers_in}, 22 | res_numbers{res_numbers_in}, mol_home{mol_home_in}, mol_contents{mol_contents_in}, 23 | mol_limits{mol_limits_in}, masses{masses_in}, sp_masses{sp_masses_in}, 24 | inv_masses{inv_masses_in}, sp_inv_masses{sp_inv_masses_in} 25 | {} 26 | 27 | } // namespace topology 28 | } // namespace stormm 29 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/GLN_PRO_HIE_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 43 0.0000000E+00 3 | 2.2623105 1.3514319 1.2754199 2.2492088 2.2716657 0.6925389 4 | 1.6147545 3.0068529 1.1832532 1.8742683 2.0633568 -0.3075490 5 | 3.6570089 2.8114662 0.5938398 4.5792619 2.2303392 1.1495729 6 | 3.8149904 3.9340898 -0.1040191 3.0006299 4.3669851 -0.5123126 7 | 5.1043464 4.5815198 -0.3631606 5.8128360 4.2579650 0.3966529 8 | 5.6295095 4.1013115 -1.7302723 5.7616912 3.0186026 -1.6919131 9 | 4.8888299 4.3313774 -2.4984946 6.9652540 4.7523690 -2.1278609 10 | 6.8366254 5.8310548 -2.1745560 7.7188146 4.5265931 -1.3735984 11 | 7.4915078 4.2900241 -3.4834122 7.2425241 3.1962937 -3.9564526 12 | 8.2613758 5.1108684 -4.1618993 8.5923114 4.7693542 -5.0454533 13 | 8.4397714 6.0383950 -3.8204211 4.9517607 6.1171155 -0.3168546 14 | 3.9669498 6.6303370 -0.8525257 5.8884206 6.8725256 0.2957423 15 | 6.9743861 6.4083145 1.1463087 7.8179272 6.1049245 0.5253565 16 | 6.6635353 5.5904687 1.7969443 7.3636751 7.6149289 1.9956172 17 | 8.4042657 7.5637127 2.3188157 6.6949492 7.6918675 2.8545609 18 | 7.1184446 8.7834018 1.0430520 7.9900062 8.9021752 0.3962166 19 | 6.9211034 9.7091173 1.5846435 5.9002501 8.3354007 0.2224424 20 | 4.9926672 8.7117038 0.6961222 5.9787000 8.8534392 -1.2243773 21 | 6.8129425 8.3982063 -2.0073017 5.1386835 9.8399853 -1.5584029 22 | 4.4662821 10.1350092 -0.8686048 5.0726419 10.4514212 -2.8842882 23 | 4.7539958 9.7064358 -3.6159246 4.3616469 11.2786502 -2.8820067 24 | 6.0581012 10.8234814 -3.1715850 25 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/HIE_THR_THR_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 43 0.0000000E+00 3 | 1.9567305 1.2097692 0.5440980 2.0090344 2.1923981 0.0773989 4 | 1.3179465 2.8710155 0.5733765 1.7568062 2.1102626 -0.9780270 5 | 3.4161431 2.7244989 0.2133113 4.2746989 2.0595915 0.7786264 6 | 3.6492312 3.9306631 -0.2998234 2.8883127 4.4289838 -0.7379967 7 | 4.9516983 4.6058903 -0.2867158 5.4487225 4.3835080 0.6584769 8 | 5.8281225 4.0633562 -1.4290306 5.9542628 2.9864938 -1.3115787 9 | 5.3306646 4.2476967 -2.3823496 7.1895699 4.7044972 -1.4675899 10 | 7.5194852 5.8435077 -2.2013853 8.7554255 6.1853712 -1.8131559 11 | 9.2895919 7.0567453 -2.1679747 9.2069569 5.3330116 -0.8775097 12 | 10.0759646 5.4351079 -0.3737979 8.2291047 4.3926665 -0.6412249 13 | 8.2424198 3.6022479 0.0966162 4.7816398 6.1296449 -0.3756769 14 | 3.8186164 6.6119829 -0.9726256 5.6872729 6.8847102 0.2515217 15 | 6.4843405 6.4336588 0.6773248 5.7295242 8.3550083 0.2177119 16 | 5.2214057 8.6943879 -0.6843970 5.0166986 8.9794972 1.4335251 17 | 5.0901862 10.0644981 1.3521488 3.5351064 8.6206114 1.5373488 18 | 3.4173729 7.5570555 1.7468278 3.0699040 9.1972042 2.3362124 19 | 3.0357806 8.8542530 0.5967411 5.6236603 8.5845650 2.6395221 20 | 5.0880259 8.9124272 3.3644535 7.1762486 8.8625772 0.1483858 21 | 8.1213304 8.1621132 0.5137918 7.3577562 10.0991229 -0.3352940 22 | 6.5468184 10.6130604 -0.6398116 8.6641954 10.7422912 -0.4614968 23 | 9.3050553 10.1479930 -1.1155727 8.5549534 11.7444025 -0.8781775 24 | 9.1368204 10.8093020 0.5206355 25 | -------------------------------------------------------------------------------- /src/MoleculeFormat/tripos_format.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_TRIPOS_FORMAT_H 3 | #define STORMM_TRIPOS_FORMAT_H 4 | 5 | #include 6 | #include "copyright.h" 7 | #include "Topology/atomgraph.h" 8 | 9 | namespace stormm { 10 | namespace structure { 11 | 12 | /// \brief The Tripos mol2 format, as annotated in the mol2 .pdf document found within this 13 | /// source directory. 14 | struct TriposMol { 15 | 16 | /// \brief Constructors include a blank constructor, constructors from file names as strings or 17 | /// character arrays, and a constructor based on existing topologies. 18 | /// \{ 19 | TriposMol(); 20 | TriposMol(const std::string &filename); 21 | TriposMol(const char* filename); 22 | TriposMol(const AtomGraph &mol_in); 23 | /// \} 24 | 25 | // Getter functions for each member variable 26 | void getFileName(); 27 | void getTitle(); 28 | int getAtomCount(); 29 | int getBondCount(); 30 | int getSubstructureCount(); 31 | int getFeatureCount(); 32 | int getSetCount(); 33 | TriposMoleculeKind getMoleculeKind(); 34 | TriposChargeKind getChargeKind(); 35 | 36 | private: 37 | int atom_count; ///< Number of atoms in the structure 38 | int bond_count; ///< Number of bonds in the structure 39 | int substructure_count; ///< Number of substructures defined for this system 40 | int feature_count; ///< Number of features defined for this system 41 | int set_count; ///< Number of sets in the molecule or system 42 | TriposMoleculeKind mol_kind; ///< Classification of molecule (i.e. protein, DNA) 43 | TriposChargeKind charge_kind; ///< Charge style used to develop the MM properties 44 | }; 45 | 46 | } // namespace structure 47 | } // namespace stormm 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/Math/fft.h_wip: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_FFT_H 3 | #define STORMM_FFT_H 4 | 5 | #include "copyright.h" 6 | #include "Accelerator/hybrid.h" 7 | 8 | namespace stormm { 9 | namespace math { 10 | 11 | /// \brief Object for managing an FFT, equivalent in some sense to FFTW-wisdom. 12 | template class FFTConfig { 13 | public: 14 | 15 | /// \brief The constructor needs a dimension. 16 | FFTConfig(const int length); 17 | 18 | private: 19 | bool do_inverse; ///< Flag to have the inverse FFT computed 20 | int3 length; ///< Length of the FFT along the X, Y, and Z dimensions 21 | ullint3 factors; ///< Bit-packed unsigned long long integer storing up to sixteen FFT factors 22 | ///< along the X, Y, and Z dimensions 23 | int3 factor_counts; ///< Numbers of factors along the X, Y, and Z dimensions 24 | T twiddles; 25 | }; 26 | 27 | /// \brief Perform a discrete transform of complex floating-point data with a dimension containing 28 | /// a factor of 2. The data type must be either float2 or double2. 29 | /// 30 | /// \param data 31 | template void fftButterfly2(T* data, int fstride, const FFTConfig &state, int m); 32 | 33 | /// \brief Function to loop over all factors and manage an FFT over one dimension of the data 34 | 35 | /// \brief Perform a real-to-complex FFT on a data set of a dimension containing at least one 36 | /// factor of 2, and other factors of 2, 3, 5, or 7. 37 | /// 38 | /// \param data The data to transform 39 | /// \param buffer Buffer for the out-of-place transpose 40 | /// \param length The length of the data 41 | template void r2c_dft(T* data, T* buffer, int length); 42 | 43 | } // namespace math 44 | } // namespace stormm 45 | 46 | #include "fft.tpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/Math/matrix_formulas.cui: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | /// \brief Calculate the inverse of a rank 3 matrix using the adjoint and determinant. 5 | /// 6 | /// \param m Elements of the original matrix, which will be left unchanged 7 | /// \param cof Pre-allocated space for elements of the cofactor matrix 8 | /// \param inv Pre-allocated space to hold in the inverse of the matrix 9 | __device__ __forceinline__ void invertRankThreeMatrix(const double* m, double* cof, double* inv) { 10 | const int lane_idx = (threadIdx.x & warp_bits_mask_int); 11 | const int my_col = lane_idx / 3; 12 | const int my_row = lane_idx - (3 * my_col); 13 | if (lane_idx < 9) { 14 | int pcol_a, pcol_b, prow_a, prow_b; 15 | if (my_col == 0) { 16 | pcol_a = 1; 17 | pcol_b = 2; 18 | } 19 | else if (my_col == 1) { 20 | pcol_a = 0; 21 | pcol_b = 2; 22 | } 23 | else if (my_col == 2) { 24 | pcol_a = 0; 25 | pcol_b = 1; 26 | } 27 | if (my_row == 0) { 28 | prow_a = 1; 29 | prow_b = 2; 30 | } 31 | else if (my_row == 1) { 32 | prow_a = 0; 33 | prow_b = 2; 34 | } 35 | else if (my_row == 2) { 36 | prow_a = 0; 37 | prow_b = 1; 38 | } 39 | const double p_aa = m[(3 * pcol_a) + prow_a]; 40 | const double p_ab = m[(3 * pcol_b) + prow_a]; 41 | const double p_ba = m[(3 * pcol_a) + prow_b]; 42 | const double p_bb = m[(3 * pcol_b) + prow_b]; 43 | cof[lane_idx] = (p_aa * p_bb) - (p_ba * p_ab); 44 | if (lane_idx & 0x1) { 45 | cof[lane_idx] = -cof[lane_idx]; 46 | } 47 | } 48 | SYNCWARP; 49 | if (lane_idx < 9) { 50 | const double detr = (cof[0] * m[0]) + (cof[1] * m[1]) + (cof[2] * m[2]); 51 | inv[(3 * my_row) + my_col] = cof[lane_idx] / detr; 52 | } 53 | SYNCWARP; 54 | } 55 | -------------------------------------------------------------------------------- /src/Topology/atomgraph_intake.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_ATOMGRAPH_INTAKE_H 3 | #define STORMM_ATOMGRAPH_INTAKE_H 4 | 5 | #include 6 | #include 7 | #include "copyright.h" 8 | #include "Constants/behavior.h" 9 | #include "FileManagement/file_listing.h" 10 | #include "atomgraph_enumerators.h" 11 | #include "atomgraph.h" 12 | 13 | namespace stormm { 14 | namespace topology { 15 | 16 | /// \brief Read and return one or more AtomGraph objects based on a list of file names. If any of 17 | /// the files are not found, indicate the problem. 18 | /// 19 | /// Overloaded: 20 | /// - Try to read in a single file and return the resulting AtomGraph object 21 | /// - Try to read in multiple files and return a list of the resulting AtomGraph objects 22 | /// 23 | /// \param file_name Name of the file to read as the topology 24 | /// \param file_names List of names to read as topologies 25 | /// \param priority Indicate the action to take if files are not found 26 | /// \param files_found Indicator of whether the files were found (modified and returned if not 27 | /// the null pointer) 28 | /// \{ 29 | AtomGraph loadTopology(const std::string &file_name, bool *files_found = nullptr, 30 | ExceptionResponse priority = ExceptionResponse::WARN, 31 | TopologyKind engine_format = TopologyKind::AMBER); 32 | 33 | std::vector loadTopology(const std::vector &file_names, 34 | bool *files_found = nullptr, 35 | ExceptionResponse priority = ExceptionResponse::WARN, 36 | TopologyKind engine_format = TopologyKind::AMBER); 37 | /// \} 38 | 39 | } // namespace topology 40 | } // namespace stormm 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/Trajectory/coordinate_intake.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_COORDINATE_INTAKE_H 3 | #define STORMM_COORDINATE_INTAKE_H 4 | 5 | #include 6 | #include 7 | #include "copyright.h" 8 | #include "Constants/behavior.h" 9 | #include "FileManagement/file_listing.h" 10 | #include "coordinateframe.h" 11 | #include "phasespace.h" 12 | #include "trajectory_enumerators.h" 13 | 14 | namespace stormm { 15 | namespace trajectory { 16 | 17 | /// \brief Read and return one or more PhaseSpace objects based on a list of file names. If any of 18 | /// the files are not found, indicate the problem. 19 | /// 20 | /// Overloaded: 21 | /// - Try to read in a single file and return the resulting PhaseSpace 22 | /// - Try to read in multiple files and return a list of the resulting PhaseSpace objects 23 | /// 24 | /// \param file_name Name of the file to read as the coordinates 25 | /// \param file_names List of names to read as coordinates 26 | /// \param priority Indicate the action to take if files are not found 27 | /// \param files_found Indicator of whether the files were found (modified and returned if not 28 | /// the null pointer) 29 | /// \{ 30 | PhaseSpace loadPhaseSpace(const std::string &file_name, bool *files_found = nullptr, 31 | ExceptionResponse priority = ExceptionResponse::WARN, 32 | CoordinateFileKind crd_format = CoordinateFileKind::UNKNOWN); 33 | 34 | std::vector 35 | loadPhaseSpace(const std::vector &file_names, bool *files_found = nullptr, 36 | ExceptionResponse priority = ExceptionResponse::WARN, 37 | CoordinateFileKind crd_format = CoordinateFileKind::UNKNOWN); 38 | /// \} 39 | 40 | } // namespace trajectory 41 | } // namespace stormm 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tripeptides/GLN_GLU_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 44 0.0000000E+00 3 | 1.9024432 1.1812855 0.3075444 1.9598957 2.1972019 -0.0788097 4 | 1.2704236 2.8387733 0.4669476 1.7139980 2.2032023 -1.1387261 5 | 3.3679220 2.7132051 0.1061094 4.2191684 2.0017517 0.6237255 6 | 3.5994647 3.9547301 -0.3128052 2.8339841 4.4841135 -0.7030509 7 | 4.8848462 4.6517353 -0.2223233 5.3518874 4.3970952 0.7302382 8 | 5.8155897 4.1791062 -1.3631909 6.0072319 3.1126052 -1.2349024 9 | 5.3169167 4.3266726 -2.3226774 7.1638511 4.9235387 -1.3856268 10 | 6.9988822 5.9586846 -1.6821088 7.5891755 4.9163421 -0.3817054 11 | 8.2057851 4.3424830 -2.3351339 8.0017361 3.3869795 -3.0633478 12 | 9.3840525 4.9240206 -2.3667946 10.0555034 4.5331395 -3.0010774 13 | 9.5634779 5.7241329 -1.7839115 4.6651114 6.1741602 -0.2481701 14 | 3.7099476 6.6571299 -0.8518818 5.5853538 6.9190382 0.3649879 15 | 6.3590232 6.4533532 0.8125938 5.6634013 8.3825969 0.3482370 16 | 5.0187825 8.7673842 -0.4432731 5.1425397 8.9250715 1.6941852 17 | 4.1230378 8.5591236 1.8274260 5.7581503 8.5346714 2.5067207 18 | 5.1226964 10.4607776 1.7645486 6.1434063 10.8247872 1.8963770 19 | 4.7492423 10.8433782 0.8105596 4.2491563 11.0078991 2.9025215 20 | 4.1765895 10.3454733 3.9625530 3.6819744 12.1032044 2.6977382 21 | 7.1122247 8.8192882 0.0338745 8.0454564 8.0141704 0.1189425 22 | 7.3010958 10.0711423 -0.4021803 6.4983715 10.6844177 -0.4143411 23 | 8.6026034 10.6404959 -0.7427893 9.0784148 10.0363128 -1.5167998 24 | 8.4815965 11.6629809 -1.1024631 9.2400933 10.6458164 0.1433407 25 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/ASP_PHE_GLN_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 44 0.0000000E+00 3 | 2.1320675 1.3446248 -0.0095679 2.1950963 2.3670257 -0.3780004 4 | 1.4472712 2.9847861 0.1142051 2.0440446 2.3814978 -1.4551254 5 | 3.5679719 2.9126850 -0.0659703 4.3822527 2.2111293 0.5185067 6 | 3.8005154 4.1629421 -0.4526970 3.0561308 4.6847890 -0.8882687 7 | 5.0504899 4.9043368 -0.2449853 5.5307843 4.5496198 0.6678923 8 | 6.0053557 4.6442991 -1.4290594 6.2073533 3.5739941 -1.4995591 9 | 5.5170868 4.9618257 -2.3537908 7.3392307 5.3855684 -1.2753168 10 | 7.8332497 5.4685938 -0.1275173 7.8005025 5.9892358 -2.2639216 11 | 4.7698708 6.4156617 -0.0809858 3.7020508 6.9031665 -0.4629530 12 | 5.7381397 7.1557767 0.4657428 6.6036766 6.6596879 0.6779966 13 | 5.7885590 8.6223338 0.4797462 5.3375273 8.9801019 -0.4462485 14 | 4.9338315 9.1436724 1.6532724 3.9816313 8.6119296 1.6623923 15 | 5.4425851 8.9075958 2.5884304 4.6124590 10.6289303 1.6054795 16 | 5.1429203 11.5069532 2.5698133 5.8021373 11.1260762 3.3357685 17 | 4.8429899 12.8803557 2.5198659 5.2615063 13.5485726 3.2581940 18 | 4.0175980 13.3830718 1.4984326 3.7999780 14.4402414 1.4503237 19 | 3.4854206 12.5103075 0.5330676 2.8590768 12.8950355 -0.2579665 20 | 3.7759847 11.1348376 0.5917250 3.3654539 10.4628009 -0.1490216 21 | 7.2469698 9.1478930 0.4832282 7.5396606 10.2020110 1.0489624 22 | 8.1759785 8.4167126 -0.1520299 7.8955705 7.5310022 -0.5727946 23 | 9.5942101 8.7458694 -0.2578150 10.1771873 7.9307131 0.1728611 24 | 9.8576676 8.8507404 -1.3107626 9.8221640 9.6734770 0.2691085 25 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Use NVIDIA CUDA base image 2 | FROM nvidia/cuda:12.4.1-devel-ubuntu22.04 3 | 4 | # Set non-interactive mode for apt-get to avoid prompts 5 | ENV DEBIAN_FRONTEND=noninteractive 6 | ENV TZ=UTC 7 | 8 | # Install necessary packages 9 | RUN apt-get update && \ 10 | apt-get clean && \ 11 | apt-get install -y \ 12 | wget \ 13 | python3-pip \ 14 | git \ 15 | libeigen3-dev \ 16 | libboost-all-dev \ 17 | gcc \ 18 | g++ \ 19 | cmake 20 | 21 | # Install CUDA 12.x 22 | RUN echo "Checking and installing CUDA 12.x..." 23 | RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb 24 | RUN dpkg -i cuda-keyring_1.1-1_all.deb 25 | RUN apt-get update -y 26 | RUN apt-get -y install cuda-toolkit-12-4 27 | ENV PATH=/usr/local/cuda/bin:$PATH 28 | ENV CUDADIR=/usr/local/cuda 29 | ENV CXXFLAGS="-I/usr/local/cuda/include $CXXFLAGS" 30 | ENV LDFLAGS="-L/usr/local/cuda/lib64 $LDFLAGS" 31 | 32 | # Set the working directory 33 | WORKDIR /app 34 | 35 | # Copy the repository from the build context to the container 36 | RUN mkdir -p /app/stormm 37 | COPY . /app/stormm 38 | 39 | # Build STORMM using CMake with CUDA enabled 40 | RUN cmake -S stormm -B stormmbuild \ 41 | -DSTORMM_ENABLE_CUDA=YES \ 42 | -DSTORMM_ENABLE_RDKIT=NO \ 43 | -DCUSTOM_GPU_ARCH=89 44 | 45 | ENV STORMM_HOME=/app/stormm 46 | ENV STORMM_SOURCE=/app/stormm 47 | ENV STORMM_BUILD=/app/stormmbuild 48 | WORKDIR /app/stormmbuild 49 | RUN make -j 50 | 51 | # After building all apps 52 | COPY entrypoint /usr/local/bin/entrypoint 53 | RUN chmod +x /usr/local/bin/entrypoint 54 | 55 | # Set the default command to run bash 56 | RUN echo "To run this container with GPU support, use the --gpus flag with docker run (e.g. docker run --gpus all stormm-config)" 57 | ENTRYPOINT ["/usr/local/bin/entrypoint"] 58 | -------------------------------------------------------------------------------- /apps/Tutorial/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(APP_NAME "tutorial_i.${STORMM_APP_SUFFIX}") 2 | add_executable(${APP_NAME} 3 | ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_i.cpp 4 | ${CMAKE_CURRENT_SOURCE_DIR}/hpc_tutorial_i.cu 5 | ${CMAKE_CURRENT_SOURCE_DIR}/hpc_tutorial_i.h) 6 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_i.cpp) 7 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 8 | install(TARGETS ${APP_NAME} 9 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 10 | 11 | set(APP_NAME "tutorial_ii.${STORMM_APP_SUFFIX}") 12 | add_executable(${APP_NAME} 13 | ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_ii.cpp 14 | ${CMAKE_CURRENT_SOURCE_DIR}/randomwalk.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/randomwalk.h 16 | ${CMAKE_CURRENT_SOURCE_DIR}/hpc_randomwalk.cu 17 | ${CMAKE_CURRENT_SOURCE_DIR}/hpc_randomwalk.h) 18 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_ii.cpp) 19 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 20 | install(TARGETS ${APP_NAME} 21 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 22 | 23 | set(APP_NAME "tutorial_iii.${STORMM_APP_SUFFIX}") 24 | add_executable(${APP_NAME} 25 | ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_iii.cpp) 26 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_iii.cpp) 27 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 28 | install(TARGETS ${APP_NAME} 29 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 30 | 31 | set(APP_NAME "tutorial_iv.${STORMM_APP_SUFFIX}") 32 | add_executable(${APP_NAME} 33 | ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_iv.cpp) 34 | target_sources(${APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_iv.cpp) 35 | target_link_libraries(${APP_NAME} ${PROJECT_NAME}) 36 | install(TARGETS ${APP_NAME} 37 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 38 | -------------------------------------------------------------------------------- /src/Potential/nbemulator.cpp: -------------------------------------------------------------------------------- 1 | #include "copyright.h" 2 | #include "Topology/atomgraph_abstracts.h" 3 | #include "nbemulator.h" 4 | 5 | namespace stormm { 6 | namespace energy { 7 | 8 | using chemistry::ChemicalFeatures; 9 | using chemistry::ChemicalFeaturesReader; 10 | using stmath::foundIn; 11 | using stmath::locateValue; 12 | using stmath::reduceUniqueValues; 13 | using synthesis::SynthesisMapReader; 14 | using topology::NonbondedKit; 15 | 16 | //------------------------------------------------------------------------------------------------- 17 | NBEmulator::NBEmulator(const std::string &file_name) : 18 | stiffness_matrix{0, "nbemulator_amat"}, 19 | row_descriptors{}, 20 | column_descriptors{}, 21 | target_nrg{} 22 | {} 23 | 24 | //------------------------------------------------------------------------------------------------- 25 | NBEmulator::NBEmulator(const PhaseSpaceSynthesis &poly_ps, const AtomGraphSynthesis &poly_ag, 26 | const SystemCache &sysc, const SynthesisCacheMap &scmap, 27 | const EmulatorControls &emulcon) : 28 | stiffness_matrix{0, "nbemulator_amat"}, 29 | row_descriptors{}, 30 | column_descriptors{}, 31 | target_nrg{} 32 | { 33 | // Break down the structures according to atomic sources. 34 | const SynthesisMapReader scmapr = scmap.data(); 35 | const int source_count = emulcon.getSourceCount(); 36 | std::vector> source_index_map(poly_ps.getSystemCount()); 37 | for (int i = 0; i < poly_ps.getSystemCount(); i++) { 38 | source_index_map[i].resize(poly_ps.getAtomCount(i)); 39 | const int cache_idx = scmapr.cache_origins[i]; 40 | const ChemicalFeatures* ichemfe = sysc.getFeaturesPointer(cache_idx); 41 | const ChemicalFeaturesReader ichemfer = ichemfe->data(); 42 | 43 | } 44 | } 45 | 46 | } // namespace energy 47 | } // namespace stormm 48 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tripeptides/SER_LYS_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 45 0.0000000E+00 3 | 1.9358429 1.3381247 0.2657346 1.9935510 2.3647475 -0.0940610 4 | 1.3103088 2.9894976 0.4773140 1.7331397 2.3956206 -1.1501404 5 | 3.4045258 2.8677620 0.0925477 4.2533529 2.1503780 0.6028396 6 | 3.6595031 4.1070744 -0.3213637 2.9071653 4.6519961 -0.7179740 7 | 4.9564027 4.7797540 -0.1661326 5.3486624 4.5424707 0.8239856 8 | 5.9475858 4.2376309 -1.2049861 6.0227492 3.1546292 -1.0952374 9 | 5.5853934 4.4644362 -2.2086717 7.2310026 4.8055443 -1.0238049 10 | 7.8727913 4.2365874 -1.4641531 4.8035147 6.3049047 -0.2551110 11 | 3.7541453 6.8064929 -0.6639032 5.8367695 7.0549465 0.1477690 12 | 6.6819630 6.5551273 0.4024153 5.8547290 8.5258811 0.1897554 13 | 5.3584275 8.9047774 -0.7048129 5.0539958 8.9970625 1.4207657 14 | 4.0444469 8.5861874 1.3647880 5.5272353 8.6096372 2.3252973 15 | 4.9485608 10.5265205 1.5199459 5.9463322 10.9616715 1.5890590 16 | 4.4542993 10.9129740 0.6269840 4.1470350 10.9284254 2.7646199 17 | 3.1337262 10.5294818 2.6831045 4.6285248 10.5042685 3.6484485 18 | 4.1007498 12.4560390 2.8839938 5.1287694 12.8317411 2.9188397 19 | 3.6272788 12.8608102 1.9836984 3.3587691 12.8876206 4.0953602 20 | 3.8020968 12.5212097 4.9289302 3.3423187 13.8981249 4.1599297 21 | 2.4041723 12.5517915 4.0646538 7.2957983 9.0486655 0.2031773 22 | 7.9404076 9.0499106 1.2466132 7.7793035 9.5187486 -0.9504288 23 | 7.1941402 9.4499093 -1.7678267 9.1252214 10.0698602 -1.1126393 24 | 9.8584425 9.2603501 -1.1119975 9.1986282 10.6192310 -2.0528153 25 | 9.3558224 10.7454059 -0.2855185 26 | -------------------------------------------------------------------------------- /benchmark/Coordinates/Tetrapeptides/MET_VAL_CYS_ff19SB.inpcrd: -------------------------------------------------------------------------------- 1 | Cpptraj Generated Restart 2 | 45 0.0000000E+00 3 | 2.0259094 1.2910955 0.6081586 2.0584582 2.2892951 0.1735871 4 | 1.4027314 2.9535606 0.7328424 1.7442992 2.2445565 -0.8673157 5 | 3.4755252 2.8072509 0.2455623 4.3567581 2.1222461 0.7465458 6 | 3.6911973 4.0236026 -0.2505095 2.9097753 4.5361275 -0.6322358 7 | 4.9992331 4.6852161 -0.2982392 5.5586048 4.4113943 0.5979251 8 | 5.7821784 4.1886307 -1.5287230 5.8803701 3.1034221 -1.4724962 9 | 5.2277717 4.4365677 -2.4352845 7.1875912 4.7942192 -1.6270281 10 | 7.1067839 5.8737344 -1.7532933 7.7200470 4.5922655 -0.6969111 11 | 8.1747494 4.1473479 -3.0005416 9.7167302 5.0541233 -2.7104298 12 | 10.1106010 4.8017591 -1.7256377 10.4472235 4.7791690 -3.4713769 13 | 9.5278765 6.1265047 -2.7623643 4.8269535 6.2102553 -0.3102495 14 | 3.8781269 6.7254108 -0.8985886 5.7418293 6.9347814 0.3384950 15 | 6.5071819 6.4573238 0.7948687 5.7631266 8.4043126 0.4020874 16 | 5.2884949 8.7872770 -0.5017281 4.9394093 8.9086943 1.6084880 17 | 3.9374937 8.4851186 1.5286493 5.5158042 8.4902514 2.9679324 18 | 6.5028339 8.9285506 3.1179888 4.8537012 8.8266729 3.7658392 19 | 5.5963716 7.4048997 3.0228982 4.7881130 10.4347450 1.5959014 20 | 4.3765358 10.7567509 0.6394743 4.0996349 10.7370217 2.3857105 21 | 5.7486937 10.9207706 1.7673006 7.2118061 8.9041033 0.4119954 22 | 8.0852092 8.2546649 0.9836729 7.4773555 10.0296448 -0.2614984 23 | 6.7114620 10.4976867 -0.7200124 8.8081957 10.6247900 -0.3662076 24 | 9.5092155 9.8920548 -0.7715198 8.7827522 11.4972603 -1.0205375 25 | 9.1556411 10.9264685 0.6239643 26 | -------------------------------------------------------------------------------- /src/Accelerator/card_utilities.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_CARD_UTILITIES_H 3 | #define STORMM_CARD_UTILITIES_H 4 | 5 | #include "copyright.h" 6 | #include "gpu_enumerators.h" 7 | 8 | namespace stormm { 9 | namespace card { 10 | 11 | /// \brief Synchronize the CPU host and GPU device at the start of a function that will launch a 12 | /// kernel. 13 | /// 14 | /// Overloaded: 15 | /// - Provide a synchronization order which will be obeyed with no other considerations (the 16 | /// MEMORY_AUTO enumeration will error out in this case) 17 | /// - Provide indicators of the intended memory origin and destination to put the synchronization 18 | /// order in context 19 | /// 20 | /// \param sync The synchronization order 21 | /// \param memory_dest Destination tier for memory that will be handled by the kernel to be 22 | /// launched 23 | /// \param memory_orig The origin tier of memory that will be handled by the kernel to be launched 24 | /// \{ 25 | void launchPreparation(HpcKernelSync sync); 26 | 27 | void launchPreparation(HpcKernelSync sync, HybridTargetLevel memory_dest, 28 | HybridTargetLevel memory_orig); 29 | /// \} 30 | 31 | /// \brief Synchronize the CPU host and GPU device at the end of a function that has launched a 32 | /// kernel. Overloads and descriptions of parameters follow from launchPreparation() above. 33 | /// \{ 34 | void launchResolution(HpcKernelSync sync); 35 | 36 | void launchResolution(HpcKernelSync sync, HybridTargetLevel memory_dest, 37 | HybridTargetLevel memory_orig); 38 | /// \} 39 | 40 | } // namespace card 41 | } // namespace stormm 42 | 43 | // Include the launch guards in any other STORMM libraries 44 | namespace stormm { 45 | using card::launchPreparation; 46 | using card::launchResolution; 47 | } // namespace stormm 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /ChangeAllSuchWords.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! ${1} ] || [ ! ${2} ] ; then 4 | echo "Usage: ./ChangeAllSuchWords " 5 | echo 6 | echo " If the authorization is not set to 'GO' then the script will merely display a" 7 | echo " list of all grep results for the original term in all code files. Look " 8 | echo " before you leap!" 9 | exit 10 | fi 11 | 12 | if [ ! ${3} ] ; then 13 | N=0 14 | elif [ ${3} == "GO" ] ; then 15 | echo "#!/bin/bash" > meaninglessChangeScript.sh 16 | fi 17 | ALL_EXT="cpp h tpp cu cuh cui" 18 | for EXT in ${ALL_EXT} ; do 19 | for LEVEL in 0 1 2 3 ; do 20 | KK="NOT_A_FILE " 21 | if [ ${LEVEL} -eq 0 ] ; then 22 | KK="${KK} `ls *.${EXT}`" 23 | elif [ ${LEVEL} -eq 1 ] ; then 24 | KK="${KK} `ls */*.${EXT}`" 25 | elif [ ${LEVEL} -eq 2 ] ; then 26 | KK="${KK} `ls */*/*.${EXT}`" 27 | elif [ ${LEVEL} -eq 3 ] ; then 28 | KK="${KK} `ls */*/*/*.${EXT}`" 29 | fi 30 | if [ "${KK}" == "NOT_A_FILE " ] ; then 31 | echo "No ${BASE}... ls ${BASE}.${EXT}" 32 | else 33 | for FI in ${KK} ; do 34 | if [ ! -e ${FI} ] ; then 35 | continue 36 | fi 37 | TT="NOT_A_RESULT " 38 | TT="${TT} `grep ${1} ${FI}`" 39 | if [ ${#TT} -le 15 ] ; then 40 | N=0 41 | else 42 | if [ ! ${3} ] ; then 43 | echo "Instances in ${FI}:" 44 | grep "${1}" ${FI} 45 | echo 46 | elif [ ${3} == "GO" ] ; then 47 | echo "sed -i 's/${1}/${2}/g' ${FI}" >> meaninglessChangeScript.sh 48 | fi 49 | fi 50 | done 51 | fi 52 | done 53 | done 54 | if [ ! ${3} ] ; then 55 | N=0 56 | elif [ ${3} == "GO" ] ; then 57 | chmod +x meaninglessChangeScript.sh 58 | ./meaninglessChangeScript.sh 59 | rm meaninglessChangeScript.sh 60 | fi 61 | -------------------------------------------------------------------------------- /src/Restraints/restraint_enumerators.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include 3 | #include "copyright.h" 4 | 5 | namespace stormm { 6 | namespace restraints { 7 | 8 | /// \brief An enumerator for the various restraint assortments that one can apply to a system. 9 | enum class RestraintEnsemble { 10 | SPECIFIC_ATOMS, ///< The restraint applies only to specific atoms in the system and 11 | ///< guides their arrangement towards an explicit target 12 | PREVENT_HBONDS, ///< Penalize hydrogen bonds that may form between identified donor 13 | ///< and acceptor pairs. 14 | PRESERVE_HEAVY_DIHEDRALS, ///< Apply dihedral restraints to dihedrals involving purely heavy 15 | ///< atoms. 16 | PRESERVE_POSITIONS, ///< Preserve the positions of masked atoms in the molecule. 17 | PRESERVE_DISTANCES ///< Select heavy atoms throughout the molecule and apply distance 18 | ///< restraints to maintain the relative displacements. This is 19 | ///< a distinct method of preserving molecular geometry, but works 20 | ///< towards the same goal as PRESERVE_HEAVY_DIHEDRALS 21 | }; 22 | 23 | /// \brief Produce a human-readable string based on an enumerated value. Various overloads of this 24 | /// function are found in other libraries and namespaces. 25 | std::string getEnumerationName(RestraintEnsemble input); 26 | 27 | /// \brief Translate a user input value or other string code into the appropriate RestraintEnsemble 28 | /// enumeration. 29 | /// 30 | /// \param rst_group Human-parseable name for the restraint ensemble enumeration 31 | RestraintEnsemble translateRestraintEnsemble(const std::string &rst_group); 32 | 33 | } // namespace restraints 34 | } // namespace stormm 35 | -------------------------------------------------------------------------------- /src/MolecularMechanics/hpc_kinetic.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_HPC_KINETIC_H 3 | #define STORMM_HPC_KINETIC_H 4 | 5 | #include "copyright.h" 6 | #include "Accelerator/gpu_details.h" 7 | #include "Potential/scorecard.h" 8 | #include "Trajectory/thermostat.h" 9 | #include "Synthesis/atomgraph_synthesis.h" 10 | 11 | namespace stormm { 12 | namespace mm { 13 | 14 | using card::GpuDetails; 15 | using energy::ScoreCardWriter; 16 | using synthesis::AtomGraphSynthesis; 17 | 18 | /// \brief Evaluate the temperautre for a synthesis of systems. It is expected that kinetic 19 | /// energies for all systems have already been computed. 20 | /// 21 | /// \param poly_ag The synthesis of topologies. No abstract will be taken from this, 22 | /// rather a sole pointer to the appropriate array of degrees of freedom 23 | /// will be extracted. One check to ensure that the system counts are 24 | /// consistent between the synthesis and the energy tracking object will 25 | /// be performed. 26 | /// \param scw Writeable abstract of the energy tracking object, taken with pointers 27 | /// set to memory on the GPU device 28 | /// \param use_constraints Indicate whether constraints are in effect, which has bearing on the 29 | /// number of degrees of freedom to consider 30 | /// \param gpu Details of the GPU that will carry out the very basic calculation. The 31 | /// kernel is so simple and short that no optimization or kernel manager is 32 | /// needed. 33 | void launchTemperatureComputation(const AtomGraphSynthesis &poly_ag, ScoreCardWriter *scw, 34 | const bool use_constraints, const GpuDetails &gpu); 35 | 36 | } // namespace mm 37 | } // namespace stormm 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/Numerics/numeric_enumerators.h: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #ifndef STORMM_NUMERIC_ENUMERATORS_H 3 | #define STORMM_NUMERIC_ENUMERATORS_H 4 | 5 | #include 6 | #include "copyright.h" 7 | 8 | namespace stormm { 9 | namespace numerics { 10 | 11 | /// \brief Enumerate the choices for carrying out fixed-precision accumulation 12 | enum class AccumulationMethod { 13 | SPLIT, ///< Use split accumulation, stashing the low 32 bits in a locally cached int and the 14 | ///< high 32 bits in a secondary accumulator probably located further away in main 15 | ///< memory. So long as most of the work happens in the low 32 bits, this reduces 16 | ///< local memory demand and overall memory bandwidth by a factor of two, lowers 17 | ///< GPU kernel register pressure on many architectures, and has shown 2.2 - 2.9x 18 | ///< the speed of accumulating in int64. 19 | WHOLE, ///< Sum fixed-precision numbers in int64 accumulators. This is needed when the 20 | ///< fixed-precision work cannot be mostly confined to the low 32 bits. 21 | AUTOMATIC ///< Determine the accumulation method by looking at the number of fixed-precision 22 | ///< bits after the decimal and making some assumptions about typical molecular 23 | ///< mechanics forces. 24 | }; 25 | 26 | /// \brief Get a human-readable name for the enumerations detailed above. 27 | /// 28 | /// \param input The enumeration of interest 29 | /// \{ 30 | std::string getEnumerationName(AccumulationMethod input); 31 | /// \} 32 | 33 | /// \brief Translate a human-readable (user input) string into an enumeration for the accumulation 34 | /// method 35 | /// 36 | /// \param input The string to translate 37 | AccumulationMethod translateAccumulationMethod(const std::string &input); 38 | 39 | } // namespace numerics 40 | } // namespace stormm 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/Trajectory/coordinateframe.tpp: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | #include "copyright.h" 3 | 4 | namespace stormm { 5 | namespace trajectory { 6 | 7 | //------------------------------------------------------------------------------------------------- 8 | template 9 | void CoordinateFrame::fill(const T* xcrd, const T* ycrd, const T* zcrd, const int scale_bits, 10 | const double* box_dims) { 11 | double* xptr = x_coordinates.data(); 12 | double* yptr = y_coordinates.data(); 13 | double* zptr = z_coordinates.data(); 14 | if (scale_bits == 0) { 15 | for (int i = 0; i < atom_count; i++) { 16 | xptr[i] = xcrd[i]; 17 | yptr[i] = ycrd[i]; 18 | zptr[i] = zcrd[i]; 19 | } 20 | } 21 | else { 22 | const double conv_factor = pow(2.0, -scale_bits); 23 | for (int i = 0; i < atom_count; i++) { 24 | xptr[i] = static_cast(xcrd[i]) * conv_factor; 25 | yptr[i] = static_cast(ycrd[i]) * conv_factor; 26 | zptr[i] = static_cast(zcrd[i]) * conv_factor; 27 | } 28 | } 29 | if (box_dims != nullptr) { 30 | double* boxptr = box_dimensions.data(); 31 | for (int i = 0; i < 6; i++) { 32 | boxptr[i] = box_dims[i]; 33 | } 34 | computeBoxTransform(boxptr, box_space_transform.data(), inverse_transform.data()); 35 | unit_cell = determineUnitCellTypeByShape(inverse_transform.data()); 36 | } 37 | } 38 | 39 | //------------------------------------------------------------------------------------------------- 40 | template 41 | void CoordinateFrame::fill(const std::vector &xcrd, const std::vector &ycrd, 42 | const std::vector &zcrd, const int scale_bits, 43 | const std::vector &box_dims) { 44 | fill(xcrd.data(), ycrd.data(), zcrd.data(), scale_bits, box_dims.data()); 45 | } 46 | 47 | } // namespace trajectory 48 | } // namespace stormm 49 | --------------------------------------------------------------------------------