Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gg27fyla authored Jun 21, 2024
2 parents 8331d9b + 93916d8 commit f4fd582
Show file tree
Hide file tree
Showing 27 changed files with 2,347 additions and 498 deletions.
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url = https://github.com/conradhuebler/ripser
[submodule "external/xtb"]
path = external/xtb
url = https://github.com/conradhuebler/xtb
url = https://github.com/grimme-lab/xtb
[submodule "external/tblite"]
path = external/tblite
url = https://github.com/tblite/tblite
Expand All @@ -22,3 +22,6 @@
[submodule "external/simple-dftd3"]
path = external/simple-dftd3
url = https://github.com/dftd3/simple-dftd3
[submodule "external/plumed2"]
path = external/plumed2
url = https://github.com/plumed/plumed2
23 changes: 19 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ option (Helper
option (WriteMoreInfo
"Write statistic files with more info" OFF)

option (USE_Plumed
"Enable interface to plumed for metadynamics")

add_subdirectory(${PROJECT_SOURCE_DIR}/external/fmt EXCLUDE_FROM_ALL)

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand All @@ -38,6 +41,8 @@ include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/external/fmt/include
${PROJECT_SOURCE_DIR}/external/eigen-3.4.0
${PROJECT_SOURCE_DIR}/external/cpp-d4/include
${PROJECT_SOURCE_DIR}/external/)


include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} )

# Get the current working branch
Expand Down Expand Up @@ -167,18 +172,24 @@ set(curcuma_core_SRC
src/core/forcefieldthread.cpp
src/core/forcefield.cpp
src/core/forcefieldfunctions.h
src/core/forcefieldgenerator.cpp
#src/core/forcefield_terms/qmdff_terms.h
src/tools/formats.h
src/tools/geometry.h
src/tools/general.h
)
add_library(curcuma_core ${curcuma_core_SRC})

add_executable(curcuma
src/main.cpp
src/core/forcefieldgenerator.h src/core/forcefieldgenerator.cpp
set(km_SRC
src/capabilities/c_code/hungarian.c
src/capabilities/c_code/interface.c
)
add_library(km ${km_SRC})
target_link_libraries(curcuma_core km)

)
add_executable(curcuma
src/main.cpp
)

if(C17)
set_property(TARGET curcuma_core PROPERTY CXX_STANDARD 17)
Expand Down Expand Up @@ -330,6 +341,10 @@ if(USE_D4)
target_link_libraries(curcuma_core curcuma_d4)
endif()

if(USE_Plumed)
target_link_libraries(curcuma_core ${PROJECT_SOURCE_DIR}/external/plumed2/src/lib/libplumed.so)
endif()

target_link_libraries(curcuma_core pthread fmt::fmt-header-only )


Expand Down
72 changes: 65 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ git clones automatically some submodules.
- [CxxThreadPool](https://github.com/conradhuebler/CxxThreadPool) - C++ Thread Pool for parallel calculation
- [eigen](https://gitlab.com/libeigen/eigen) provides eigen C++ library for linear algebra. Eigen is not downloaded automatically, but will be fetched and updated if the build scripts in the **scripts** subdirectory are used.
- [fmt](https://github.com/fmtlib/fmt) formatted console output
- [plumped](https://github.com/plumed/plumed2) Support for Metadynamics, must be compiled manually and enabled manually (Option USE_Plumed)

Additionally, [nlohmann/json](https://github.com/nlohmann/json) is obtained via cmake.

Expand Down Expand Up @@ -427,22 +428,65 @@ curcuma -nci file1.dat file2.dat
```
one can ''remove'' RDG vs sign(λ<sub>2</sub>)ρ points which occur in both plots (file1.dat and file2.dat). The similarity of two points is set to true, if the distance is below a threshold distance, which is defined by the averaged distance of two adjacent points.

## Molecular Dynamics
## Molecular Dynamics and Metadynamics
Curcuma has now a Molecular Dynamics modul, which can be used with:
```sh
curcuma -md input.xyz
```

Naturally, there are many more better fitting tools to perform molecular dynamics. Unlike curcuma, they do respect correct units etc. However, MD calculations work and can be controlled with the following arguments:

### Possible options
```json
{ "GFN", 2 },
{ "MaxSteps", 5000 },
{ "writeXYZ", true },
{ "printOutput", true },
{ "MaxTime", 5000 },
{ "T", 298.15 },
{ "dt", 1 },
{ "dt", 1 }, // single step in fs
{ "rm_COM", 100 }, // remove translation and rotation every x fs
{ "charge", 0 },
{ "Spin", 0 },
{ "centered", false }
{ "rmrottrans", 0 },
{ "nocenter", false },
{ "dump", 50 },
{ "print", 1000 },
{ "unique", false },
{ "rmsd", 1.5 },
{ "opt", false },
{ "hmass", 1 },
{ "velo", 1 },
{ "rescue", false },
{ "coupling", 10 },
{ "MaxTopoDiff", 15 },
{ "impuls", 0 },
{ "method", "uff" },
{ "impuls_scaling", 0.75 },
{ "writeinit", false },
{ "initfile", "none" },
{ "norestart", false },
{ "writerestart", 1000 },
{ "rattle", false },
{ "rattle_tolerance", 1e-6 },
{ "rattle_maxiter", 10 },
{ "thermostat", "csvr" },
{ "respa", 1 },
{ "dipole", false },
{ "seed", 1 },
{ "cleanenergy", false },
{ "wall", "none" }, // can be spheric or rect
{ "wall_type", "logfermi" }, // can be logfermi or harmonic
{ "wall_spheric_radius", 0 },
{ "wall_xl", 0 },
{ "wall_yl", 0 },
{ "wall_zl", 0 },
{ "wall_x_min", 0 },
{ "wall_x_max", 0 },
{ "wall_y_min", 0 },
{ "wall_y_max", 0 },
{ "wall_z_min", 0 },
{ "wall_z_max", 0 },
{ "wall_temp", 298.15 },
{ "wall_beta", 6 },
{ "mtd", false },
{ "plumed", "plumed.dat" }
```

For example, using
Expand All @@ -456,8 +500,22 @@ curcuma -md input.xyz -method gfnff -T 500 -berendson 200 -dt 1 -hmass 1 -therm
```
will perform some kind of conformational search using GFN-FF. Results are stored in **input.unique.xyz**! Repeating it will result in other conformations and the previous results stored in **input.unique.xyz** will be overwritten. Bonds may break from time to time ...

Rattle can be used to constrain (currently) all bonds, allowing larger time steps for integration. Up to 8 fs might be possible.
```sh
curcuma -md input.xyz -rattle -dt 4
```

The MD implementation integrates well into curcuma, hence calculation can be stopped with Ctrl-C (or a "stop" file) and will be resumed (velocities and geometries are stored) if a restart file is found.

With
```sh
curcuma -md input.xyz -mtd
```
a metadynamics simulation can be performed using plumed. It is a ***plumed.dat*** expected, or can be set with
```sh
curcuma -md input.xyz -mtd -plumed input.plumed
```

# Citation
Please cite the software package if you obtain results:
[conradhuebler/curcuma: Curcuma Zenodo Citation](https://doi.org/10.5281/zenodo.4302722)
Expand Down
1 change: 1 addition & 0 deletions external/plumed2
Submodule plumed2 added at d4f7b5
Loading

0 comments on commit f4fd582

Please sign in to comment.