Compare commits
47 Commits
patch_31Ju
...
patch_2Aug
| Author | SHA1 | Date | |
|---|---|---|---|
| aff5f06e8f | |||
| bd3ffe1321 | |||
| 11198e9d29 | |||
| a857e7f790 | |||
| 9c691ddd0f | |||
| 828ddfd957 | |||
| 7ba6b8a06a | |||
| d750cc02c0 | |||
| 9ed43e55f0 | |||
| 8fd28cd78d | |||
| b5f19b93c2 | |||
| 5076f1a36c | |||
| f61cd68ca4 | |||
| 5b4b418289 | |||
| 8df7f51470 | |||
| f9e34825f0 | |||
| 52e2db44a1 | |||
| de366c27e2 | |||
| 5fd323fe32 | |||
| 64b682b9f9 | |||
| 083841ab2a | |||
| fa6a990536 | |||
| 73d2b824bd | |||
| e17e6bb45d | |||
| 2fe4a6490c | |||
| 5fe457667e | |||
| 02511a0ae5 | |||
| 76bac4cedc | |||
| 8f5cd8661f | |||
| e57c3c04d0 | |||
| c967c09561 | |||
| a6bd86eb77 | |||
| e3c91626c8 | |||
| 2a74832a1e | |||
| 86e3740fb3 | |||
| 892e4759df | |||
| 207976f4e9 | |||
| 074ae06b36 | |||
| 75c1e28566 | |||
| 58404946db | |||
| d09ca91627 | |||
| e89cedbd99 | |||
| 4011f6650d | |||
| 0fa9cd5004 | |||
| 3cc8508795 | |||
| da3b91a744 | |||
| bc79412203 |
@ -497,37 +497,36 @@ if(BUILD_LIB)
|
||||
add_dependencies(lammps ${LAMMPS_DEPS})
|
||||
endif()
|
||||
set(LAMMPS_CXX_HEADERS
|
||||
angle.h
|
||||
atom.h
|
||||
bond.h
|
||||
citeme.h
|
||||
comm.h
|
||||
compute.h
|
||||
dihedral.h
|
||||
domain.h
|
||||
error.h
|
||||
fix.h
|
||||
force.h
|
||||
group.h
|
||||
improper.h
|
||||
input.h
|
||||
kspace.h
|
||||
lammps.h
|
||||
lattice.h
|
||||
lmppython.h
|
||||
memory.h
|
||||
modify.h
|
||||
neighbor.h
|
||||
neigh_list.h
|
||||
output.h
|
||||
pair.h
|
||||
pointers.h
|
||||
region.h
|
||||
timer.h
|
||||
universe.h
|
||||
update.h
|
||||
variable.h)
|
||||
list(TRANSFORM LAMMPS_CXX_HEADERS PREPEND ${LAMMPS_SOURCE_DIR}/)
|
||||
${LAMMPS_SOURCE_DIR}/angle.h
|
||||
${LAMMPS_SOURCE_DIR}/atom.h
|
||||
${LAMMPS_SOURCE_DIR}/bond.h
|
||||
${LAMMPS_SOURCE_DIR}/citeme.h
|
||||
${LAMMPS_SOURCE_DIR}/comm.h
|
||||
${LAMMPS_SOURCE_DIR}/compute.h
|
||||
${LAMMPS_SOURCE_DIR}/dihedral.h
|
||||
${LAMMPS_SOURCE_DIR}/domain.h
|
||||
${LAMMPS_SOURCE_DIR}/error.h
|
||||
${LAMMPS_SOURCE_DIR}/fix.h
|
||||
${LAMMPS_SOURCE_DIR}/force.h
|
||||
${LAMMPS_SOURCE_DIR}/group.h
|
||||
${LAMMPS_SOURCE_DIR}/improper.h
|
||||
${LAMMPS_SOURCE_DIR}/input.h
|
||||
${LAMMPS_SOURCE_DIR}/kspace.h
|
||||
${LAMMPS_SOURCE_DIR}/lammps.h
|
||||
${LAMMPS_SOURCE_DIR}/lattice.h
|
||||
${LAMMPS_SOURCE_DIR}/lmppython.h
|
||||
${LAMMPS_SOURCE_DIR}/memory.h
|
||||
${LAMMPS_SOURCE_DIR}/modify.h
|
||||
${LAMMPS_SOURCE_DIR}/neighbor.h
|
||||
${LAMMPS_SOURCE_DIR}/neigh_list.h
|
||||
${LAMMPS_SOURCE_DIR}/output.h
|
||||
${LAMMPS_SOURCE_DIR}/pair.h
|
||||
${LAMMPS_SOURCE_DIR}/pointers.h
|
||||
${LAMMPS_SOURCE_DIR}/region.h
|
||||
${LAMMPS_SOURCE_DIR}/timer.h
|
||||
${LAMMPS_SOURCE_DIR}/universe.h
|
||||
${LAMMPS_SOURCE_DIR}/update.h
|
||||
${LAMMPS_SOURCE_DIR}/variable.h)
|
||||
|
||||
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_LIB_SUFFIX})
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
|
||||
@ -20,9 +20,13 @@ if(PKG_KIM)
|
||||
message(FATAL_ERROR "Cannot build downloaded KIM-API library with Ninja build tool")
|
||||
endif()
|
||||
message(STATUS "KIM-API download requested - we will build our own")
|
||||
enable_language(C)
|
||||
enable_language(Fortran)
|
||||
include(CheckLanguage)
|
||||
include(ExternalProject)
|
||||
enable_language(C)
|
||||
check_language(Fortran)
|
||||
if(NOT CMAKE_Fortran_COMPILER)
|
||||
message(FATAL_ERROR "Compiling the KIM-API library requires a Fortran compiler")
|
||||
endif()
|
||||
ExternalProject_Add(kim_build
|
||||
URL https://s3.openkim.org/kim-api/kim-api-2.1.2.txz
|
||||
URL_MD5 6ac52e14ef52967fc7858220b208cba5
|
||||
|
||||
@ -18,8 +18,12 @@ if(PKG_VORONOI)
|
||||
else()
|
||||
set(VORO_BUILD_CFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}")
|
||||
endif()
|
||||
string(APPEND VORO_BUILD_CFLAGS ${CMAKE_CXX_FLAGS})
|
||||
set(VORO_BUILD_OPTIONS CXX=${CMAKE_CXX_COMPILER} CFLAGS=${VORO_BUILD_CFLAGS})
|
||||
if(APPLE)
|
||||
get_filename_component(VORO_CXX ${CMAKE_CXX_COMPILER} NAME_WE)
|
||||
set(VORO_BUILD_OPTIONS CXX=${VORO_CXX} CFLAGS=${VORO_BUILD_CFLAGS})
|
||||
else()
|
||||
set(VORO_BUILD_OPTIONS CXX=${CMAKE_CXX_COMPILER} CFLAGS=${VORO_BUILD_CFLAGS})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(voro_build
|
||||
URL https://download.lammps.org/thirdparty/voro++-0.4.6.tar.gz
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.TH LAMMPS "31 July 2019" "2019-07-31"
|
||||
.TH LAMMPS "2 August 2019" "2019-08-02"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 49 KiB |
@ -27,7 +27,7 @@
|
||||
V_{ij} & = & e^{-\lambda (r_{ij} -z_0)} \left [ C + f(\rho_{ij}) + f(\rho_{ji}) - A \left ( \frac{r_{ij}}{z_0}\right )^{-6} \right ] \\
|
||||
\rho_{ij}^2 & = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{i})^2 \\[15pt]
|
||||
\rho_{ji}^2 & = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{j})^2 \\[15pt]
|
||||
f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { \rho/\delta }^{2n}
|
||||
f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { (\rho/\delta) }^{2n}
|
||||
\end{eqnarray*}
|
||||
\endgroup
|
||||
\end{document}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="31 Jul 2019 version">
|
||||
<META NAME="docnumber" CONTENT="2 Aug 2019 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
@ -21,7 +21,7 @@
|
||||
:line
|
||||
|
||||
LAMMPS Documentation :c,h1
|
||||
31 Jul 2019 version :c,h2
|
||||
2 Aug 2019 version :c,h2
|
||||
|
||||
"What is a LAMMPS version?"_Manual_version.html
|
||||
|
||||
|
||||
Binary file not shown.
137
doc/src/fix.txt
137
doc/src/fix.txt
@ -165,40 +165,40 @@ page are followed by one or more of (g,i,k,o,t) to indicate which
|
||||
accelerated styles exist.
|
||||
|
||||
"adapt"_fix_adapt.html - change a simulation parameter over time
|
||||
"adapt/fep"_fix_adapt_fep.html -
|
||||
"adapt/fep"_fix_adapt_fep.html - enhanced version of fix adapt
|
||||
"addforce"_fix_addforce.html - add a force to each atom
|
||||
"addtorque"_fix_addtorque.html -
|
||||
"addtorque"_fix_addtorque.html - add a torque to a group of atoms
|
||||
"append/atoms"_fix_append_atoms.html - append atoms to a running simulation
|
||||
"atc"_fix_atc.html -
|
||||
"atc"_fix_atc.html - initiates a coupled MD/FE simulation
|
||||
"atom/swap"_fix_atom_swap.html - Monte Carlo atom type swapping
|
||||
"ave/atom"_fix_ave_atom.html - compute per-atom time-averaged quantities
|
||||
"ave/chunk"_fix_ave_chunk.html - compute per-chunk time-averaged quantities
|
||||
"ave/correlate"_fix_ave_correlate.html - compute/output time correlations
|
||||
"ave/correlate/long"_fix_ave_correlate_long.html -
|
||||
"ave/histo"_fix_ave_histo.html - compute/output time-averaged histograms
|
||||
"ave/histo/weight"_fix_ave_histo.html -
|
||||
"ave/histo/weight"_fix_ave_histo.html - weighted version of fix ave/histo
|
||||
"ave/time"_fix_ave_time.html - compute/output global time-averaged quantities
|
||||
"aveforce"_fix_aveforce.html - add an averaged force to each atom
|
||||
"balance"_fix_balance.html - perform dynamic load-balancing
|
||||
"bocs"_fix_bocs.html -
|
||||
"bocs"_fix_bocs.html - NPT style time integration with pressure correction
|
||||
"bond/break"_fix_bond_break.html - break bonds on the fly
|
||||
"bond/create"_fix_bond_create.html - create bonds on the fly
|
||||
"bond/react"_fix_bond_react.html -
|
||||
"bond/react"_fix_bond_react.html - apply topology changes to model reactions
|
||||
"bond/swap"_fix_bond_swap.html - Monte Carlo bond swapping
|
||||
"box/relax"_fix_box_relax.html - relax box size during energy minimization
|
||||
"client/md"_fix_client_md.html -
|
||||
"cmap"_fix_cmap.html -
|
||||
"colvars"_fix_colvars.html -
|
||||
"controller"_fix_controller.html -
|
||||
"client/md"_fix_client_md.html - MD client for client/server simulations
|
||||
"cmap"_fix_cmap.html - enables CMAP cross-terms of the CHARMM force field
|
||||
"colvars"_fix_colvars.html - interface to the collective variables “Colvars” library
|
||||
"controller"_fix_controller.html - apply control loop feedback mechanism
|
||||
"deform"_fix_deform.html - change the simulation box size/shape
|
||||
"deposit"_fix_deposit.html - add new atoms above a surface
|
||||
"dpd/energy"_fix_dpd_energy.html -
|
||||
"dpd/energy"_fix_dpd_energy.html - constant energy dissipative particle dynamics
|
||||
"drag"_fix_drag.html - drag atoms towards a defined coordinate
|
||||
"drude"_fix_drude.html -
|
||||
"drude/transform/direct"_fix_drude_transform.html -
|
||||
"drude/transform/inverse"_fix_drude_transform.html -
|
||||
"drude"_fix_drude.html - part of Drude oscillator polarization model
|
||||
"drude/transform/direct"_fix_drude_transform.html - part of Drude oscillator polarization model
|
||||
"drude/transform/inverse"_fix_drude_transform.html - part of Drude oscillator polarization model
|
||||
"dt/reset"_fix_dt_reset.html - reset the timestep based on velocity, forces
|
||||
"edpd/source"_fix_dpd_source.html -
|
||||
"edpd/source"_fix_dpd_source.html - add heat source to eDPD simulations
|
||||
"efield"_fix_efield.html - impose electric field on system
|
||||
"ehex"_fix_ehex.html - enhanced heat exchange algorithm
|
||||
"electron/stopping"_fix_electron_stopping.html - electronic stopping power as a friction force
|
||||
@ -208,27 +208,26 @@ accelerated styles exist.
|
||||
"eos/table/rx"_fix_eos_table_rx.html -
|
||||
"evaporate"_fix_evaporate.html - remove atoms from simulation periodically
|
||||
"external"_fix_external.html - callback to an external driver program
|
||||
"ffl"_fix_ffl.html -
|
||||
"filter/corotate"_fix_filter_corotate.html -
|
||||
"flow/gauss"_fix_flow_gauss.html -
|
||||
"ffl"_fix_ffl.html - apply a Fast-Forward Langevin equation thermostat
|
||||
"filter/corotate"_fix_filter_corotate.html - implement corotation filter to allow larger timesteps with r-RESPA
|
||||
"flow/gauss"_fix_flow_gauss.html - Gaussian dynamics for constant mass flux
|
||||
"freeze"_fix_freeze.html - freeze atoms in a granular simulation
|
||||
"gcmc"_fix_gcmc.html - grand canonical insertions/deletions
|
||||
"gld"_fix_gcmc.html - generalized Langevin dynamics integrator
|
||||
"gld"_fix_gld.html -
|
||||
"gle"_fix_gle.html -
|
||||
"gld"_fix_gld.html - generalized Langevin dynamics integrator
|
||||
"gle"_fix_gle.html - generalized Langevin equation thermostat
|
||||
"gravity"_fix_gravity.html - add gravity to atoms in a granular simulation
|
||||
"grem"_fix_grem.html -
|
||||
"grem"_fix_grem.html - implements the generalized replica exchange method
|
||||
"halt"_fix_halt.html - terminate a dynamics run or minimization
|
||||
"heat"_fix_heat.html - add/subtract momentum-conserving heat
|
||||
"hyper/global"_fix_hyper_global.html - global hyperdynamics
|
||||
"hyper/local"_fix_hyper_local.html - local hyperdynamics
|
||||
"imd"_fix_imd.html -
|
||||
"imd"_fix_imd.html - implements the “Interactive MD” (IMD) protocol
|
||||
"indent"_fix_indent.html - impose force due to an indenter
|
||||
"ipi"_fix_ipi.html -
|
||||
"ipi"_fix_ipi.html - enable LAMMPS to run as a client for i-PI path-integral simulations
|
||||
"langevin"_fix_langevin.html - Langevin temperature control
|
||||
"langevin/drude"_fix_langevin_drude.html -
|
||||
"langevin/eff"_fix_langevin_eff.html -
|
||||
"langevin/spin"_fix_langevin_spin.html -
|
||||
"langevin/drude"_fix_langevin_drude.html - Langevin temperature control of Drude oscillators
|
||||
"langevin/eff"_fix_langevin_eff.html - Langevin temperature control for the electron force field model
|
||||
"langevin/spin"_fix_langevin_spin.html - Langevin temperature control for a spin or spin-lattice system
|
||||
"latte"_fix_latte.html - wrapper on LATTE density-functional tight-binding code
|
||||
"lb/fluid"_fix_lb_fluid.html -
|
||||
"lb/momentum"_fix_lb_momentum.html -
|
||||
@ -236,64 +235,60 @@ accelerated styles exist.
|
||||
"lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html -
|
||||
"lb/viscous"_fix_lb_viscous.html -
|
||||
"lineforce"_fix_lineforce.html - constrain atoms to move in a line
|
||||
"manifoldforce"_fix_manifoldforce.html -
|
||||
"meso"_fix_meso.html -
|
||||
"meso"_fix_meso_move.html - move mesoscopic SPH/SDPD particles in a prescribed fashion
|
||||
"meso/move"_fix_meso_move.html -
|
||||
"manifoldforce"_fix_manifoldforce.html - restrain atoms to a manifold during minimization
|
||||
"meso"_fix_meso.html - time integration for SPH/DPDE particles
|
||||
"meso/move"_fix_meso_move.html - move mesoscopic SPH/SDPD particles in a prescribed fashion
|
||||
"meso/stationary"_fix_meso_stationary.html -
|
||||
"momentum"_fix_momentum.html - zero the linear and/or angular momentum of a group of atoms
|
||||
"move"_fix_move.html - move atoms in a prescribed fashion
|
||||
"mscg"_fix_mscg.html -
|
||||
"mscg"_fix_mscg.html - apply MSCG method for force-matching to generate coarse grain models
|
||||
"msst"_fix_msst.html - multi-scale shock technique (MSST) integration
|
||||
"mvv/dpd"_fix_mvv_dpd.html -
|
||||
"mvv/edpd"_fix_mvv_dpd.html -
|
||||
"mvv/tdpd"_fix_mvv_dpd.html -
|
||||
"mvv/dpd"_fix_mvv_dpd.html - DPD using the modified velocity-Verlet integration algorithm
|
||||
"mvv/edpd"_fix_mvv_dpd.html - constant energy DPD using the modified velocity-Verlet algrithm
|
||||
"mvv/tdpd"_fix_mvv_dpd.html - constant temperature DPD using the modified velocity-Verlet algorithm
|
||||
"neb"_fix_neb.html - nudged elastic band (NEB) spring forces
|
||||
"nph"_fix_nh.html - constant NPH time integration via Nose/Hoover
|
||||
"nph/asphere"_fix_nph_asphere.html - NPH for aspherical particles
|
||||
"nph/body"_fix_nph_body.html -
|
||||
"nph/body"_fix_nve_body.html - NPH for body particles
|
||||
"nph/eff"_fix_nh_eff.html -
|
||||
"nph/body"_fix_nph_body.html - NPH for body particles
|
||||
"nph/eff"_fix_nh_eff.html - NPH for nuclei and electrons in the electron force field model
|
||||
"nph/sphere"_fix_nph_sphere.html - NPH for spherical particles
|
||||
"nphug"_fix_nphug.html - constant-stress Hugoniostat integration
|
||||
"npt"_fix_nh.html - constant NPT time integration via Nose/Hoover
|
||||
"npt/asphere"_fix_npt_asphere.html - NPT for aspherical particles
|
||||
"npt/body"_fix_npt_body.html -
|
||||
"npt/body"_fix_nve_body.html - NPT for body particles
|
||||
"npt/eff"_fix_nh_eff.html -
|
||||
"npt/body"_fix_npt_body.html - NPT for body particles
|
||||
"npt/eff"_fix_nh_eff.html - NPT for nuclei and electrons in the electron force field model
|
||||
"npt/sphere"_fix_npt_sphere.html - NPT for spherical particles
|
||||
"npt/uef"_fix_nh_uef.html -
|
||||
"npt/uef"_fix_nh_uef.html - NPT style time integration with diagonal flow
|
||||
"nve"_fix_nve.html - constant NVE time integration
|
||||
"nve/asphere"_fix_nve_asphere.html - NVE for aspherical particles
|
||||
"nve/asphere/noforce"_fix_nve_asphere_noforce.html - NVE for aspherical particles without forces"
|
||||
"nve/awpmd"_fix_nve_awpmd.html -
|
||||
"nve/asphere/noforce"_fix_nve_asphere_noforce.html - NVE for aspherical particles without forces
|
||||
"nve/awpmd"_fix_nve_awpmd.html - NVE for the Antisymmetrized Wave Packet Molecular Dynamics model
|
||||
"nve/body"_fix_nve_body.html - NVE for body particles
|
||||
"nve/dot"_fix_nve_dot.html -
|
||||
"nve/dotc/langevin"_fix_nve_dotc_langevin.html -
|
||||
"nve/eff"_fix_nve_eff.html -
|
||||
"nve/dot"_fix_nve_dot.html - rigid body constant energy time integrator for coarse grain models
|
||||
"nve/dotc/langevin"_fix_nve_dotc_langevin.html - Langevin style rigid body time integrator for coarse grain models
|
||||
"nve/eff"_fix_nve_eff.html - NVE for nuclei and electrons in the electron force field model
|
||||
"nve/limit"_fix_nve_limit.html - NVE with limited step length
|
||||
"nve/line"_fix_nve_line.html - NVE for line segments
|
||||
"nve/manifold/rattle"_fix_nve_manifold_rattle.html -
|
||||
"nve/noforce"_fix_nve_noforce.html - NVE without forces (v only)
|
||||
"nve/sphere"_fix_nve_sphere.html - NVE for spherical particles
|
||||
"nve/spin"_fix_nve_spin.html -
|
||||
"nve/spin"_fix_nve_spin.html - NVE for a spin or spin-lattice system
|
||||
"nve/tri"_fix_nve_tri.html - NVE for triangles
|
||||
"nvk"_fix_nvk.html -
|
||||
"nvt"_fix_nh.html - constant NVT time integration via Nose/Hoover
|
||||
"nvk"_fix_nvk.html - constant kinetic energy time integration
|
||||
"nvt"_fix_nh.html - NVT time integration via Nose/Hoover
|
||||
"nvt/asphere"_fix_nvt_asphere.html - NVT for aspherical particles
|
||||
"nvt/body"_fix_nve_body.html - NVT for body particles
|
||||
"nvt/body"_fix_nvt_body.html -
|
||||
"nvt/eff"_fix_nh_eff.html -
|
||||
"nvt/body"_fix_nvt_body.html - NVT for body particles
|
||||
"nvt/eff"_fix_nh_eff.html - NVE for nuclei and electrons in the electron force field model
|
||||
"nvt/manifold/rattle"_fix_nvt_manifold_rattle.html -
|
||||
"nvt/sllod"_fix_nvt_sllod.html - NVT for NEMD with SLLOD equations
|
||||
"nvt/sllod/eff"_fix_nvt_sllod_eff.html -
|
||||
"nvt/sllod/eff"_fix_nvt_sllod_eff.html - NVT for NEMD with SLLOD equations for the electron force field model
|
||||
"nvt/sphere"_fix_nvt_sphere.html - NVT for spherical particles
|
||||
"nvt/uef"_fix_nh_uef.html -
|
||||
"nvt/uef"_fix_nh_uef.html - NVT style time integration with diagonal flow
|
||||
"oneway"_fix_oneway.html - constrain particles on move in one direction
|
||||
"orient/bcc"_fix_orient.html - add grain boundary migration force for BCC
|
||||
"orient/fcc"_fix_orient.html - add grain boundary migration force for FCC
|
||||
"phonon"_fix_phonon.html -
|
||||
"pimd"_fix_pimd.html -
|
||||
"phonon"_fix_phonon.html - calculate dynamical matrix from MD simulations
|
||||
"pimd"_fix_pimd.html - Feynman path integral molecular dynamics
|
||||
"planeforce"_fix_planeforce.html - constrain atoms to move in a plane
|
||||
"plumed"_fix_plumed.html - wrapper on PLUMED free energy library
|
||||
"poems"_fix_poems.html - constrain clusters of atoms to move as coupled rigid bodies
|
||||
@ -302,24 +297,24 @@ accelerated styles exist.
|
||||
"press/berendsen"_fix_press_berendsen.html - pressure control by Berendsen barostat
|
||||
"print"_fix_print.html - print text and variables during a simulation
|
||||
"property/atom"_fix_property_atom.html - add customized per-atom values
|
||||
"python/invoke"_fix_python_invoke.html -
|
||||
"python/move"_fix_python_move.html -
|
||||
"qbmsst"_fix_qbmsst.html -
|
||||
"python/invoke"_fix_python_invoke.html - call a Python function during a simulation
|
||||
"python/move"_fix_python_move.html - call a Python function during a simulation run
|
||||
"qbmsst"_fix_qbmsst.html - quantum bath multi-scale shock technique time integrator
|
||||
"qeq/comb"_fix_qeq_comb.html - charge equilibration for COMB potential
|
||||
"qeq/dynamic"_fix_qeq.html - charge equilibration via dynamic method
|
||||
"qeq/fire"_fix_qeq.html - charge equilibration via FIRE minimizer
|
||||
"qeq/point"_fix_qeq.html - charge equilibration via point method
|
||||
"qeq/reax"_fix_qeq_reax.html -
|
||||
"qeq/reax"_fix_qeq_reax.html - charge equilibration for ReaxFF potential
|
||||
"qeq/shielded"_fix_qeq.html - charge equilibration via shielded method
|
||||
"qeq/slater"_fix_qeq.html - charge equilibration via Slater method
|
||||
"qmmm"_fix_qmmm.html -
|
||||
"qtb"_fix_qtb.html -
|
||||
"qmmm"_fix_qmmm.html - functionality to enable a quantum mechanics/molecular mechanics coupling
|
||||
"qtb"_fix_qtb.html - implement quantum thermal bath scheme
|
||||
"rattle"_fix_shake.html - RATTLE constraints on bonds and/or angles
|
||||
"reax/c/bonds"_fix_reaxc_bonds.html - write out ReaxFF bond information
|
||||
"reax/c/species"_fix_reaxc_species.html - write out ReaxFF molecule information
|
||||
"recenter"_fix_recenter.html - constrain the center-of-mass position of a group of atoms
|
||||
"restrain"_fix_restrain.html - constrain a bond, angle, dihedral
|
||||
"rhok"_fix_rhok.html -
|
||||
"rhok"_fix_rhok.html - add bias potential for long-range ordered systems
|
||||
"rigid"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NVE integration
|
||||
"rigid/meso"_fix_rigid_meso.html - constrain clusters of mesoscopic SPH/SDPD particles to move as a rigid body
|
||||
"rigid/nph"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NPH integration
|
||||
@ -332,11 +327,11 @@ accelerated styles exist.
|
||||
"rigid/nvt/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVT integration
|
||||
"rigid/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVE integration
|
||||
"rx"_fix_rx.html -
|
||||
"saed/vtk"_fix_saed_vtk.html -
|
||||
"saed/vtk"_fix_saed_vtk.html -
|
||||
"setforce"_fix_setforce.html - set the force on each atom
|
||||
"shake"_fix_shake.html - SHAKE constraints on bonds and/or angles
|
||||
"shardlow"_fix_shardlow.html -
|
||||
"smd"_fix_smd.html -
|
||||
"shardlow"_fix_shardlow.html - integration of DPD equations of motion using the Shardlow splitting
|
||||
"smd"_fix_smd.html - applied a steered MD force to a group
|
||||
"smd/adjust_dt"_fix_smd_adjust_dt.html -
|
||||
"smd/integrate_tlsph"_fix_smd_integrate_tlsph.html -
|
||||
"smd/integrate_ulsph"_fix_smd_integrate_ulsph.html -
|
||||
@ -355,13 +350,13 @@ accelerated styles exist.
|
||||
"temp/csld"_fix_temp_csvr.html - canonical sampling thermostat with Langevin dynamics
|
||||
"temp/csvr"_fix_temp_csvr.html - canonical sampling thermostat with Hamiltonian dynamics
|
||||
"temp/rescale"_fix_temp_rescale.html - temperature control by velocity rescaling
|
||||
"temp/rescale/eff"_fix_temp_rescale_eff.html -
|
||||
"temp/rescale/eff"_fix_temp_rescale_eff.html - temperature control by velocity rescaling in the electron force field model
|
||||
"tfmc"_fix_tfmc.html - perform force-bias Monte Carlo with time-stamped method
|
||||
"thermal/conductivity"_fix_thermal_conductivity.html - Muller-Plathe kinetic energy exchange for thermal conductivity calculation
|
||||
"ti/spring"_fix_ti_spring.html -
|
||||
"tmd"_fix_tmd.html - guide a group of atoms to a new configuration
|
||||
"ttm"_fix_ttm.html - two-temperature model for electronic/atomic coupling
|
||||
"ttm/mod"_fix_ttm.html -
|
||||
"ttm/mod"_fix_ttm.html - enhanced two-temperature model with additional options
|
||||
"tune/kspace"_fix_tune_kspace.html - auto-tune KSpace parameters
|
||||
"vector"_fix_vector.html - accumulate a global vector every N timesteps
|
||||
"viscosity"_fix_viscosity.html - Muller-Plathe momentum exchange for viscosity calculation
|
||||
@ -369,7 +364,7 @@ accelerated styles exist.
|
||||
"wall/body/polygon"_fix_wall_body_polygon.html -
|
||||
"wall/body/polyhedron"_fix_wall_body_polyhedron.html -
|
||||
"wall/colloid"_fix_wall.html - Lennard-Jones wall interacting with finite-size particles
|
||||
"wall/ees"_fix_wall_ees.html -
|
||||
"wall/ees"_fix_wall_ees.html - wall for ellipsoidal particles
|
||||
"wall/gran"_fix_wall_gran.html - frictional wall(s) for granular simulations
|
||||
"wall/gran/region"_fix_wall_gran_region.html -
|
||||
"wall/harmonic"_fix_wall.html - harmonic spring wall
|
||||
@ -379,7 +374,7 @@ accelerated styles exist.
|
||||
"wall/piston"_fix_wall_piston.html - moving reflective piston wall
|
||||
"wall/reflect"_fix_wall_reflect.html - reflecting wall(s)
|
||||
"wall/region"_fix_wall_region.html - use region surface as wall
|
||||
"wall/region/ees"_fix_wall_ees.html -
|
||||
"wall/region/ees"_fix_wall_ees.html - use region surface as wall for ellipsoidal particles
|
||||
"wall/srd"_fix_wall_srd.html - slip/no-slip wall for SRD particles :ul
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
@ -47,13 +47,13 @@ or {cubic_spline}.
|
||||
|
||||
With either spline method, the only argument that needs to follow it
|
||||
is the name of a file that contains the desired pressure correction
|
||||
as a function of volume. The file should be formatted so each line has:
|
||||
as a function of volume. The file must be formatted so each line has:
|
||||
|
||||
Volume_i, PressureCorrection_i :pre
|
||||
|
||||
Note both the COMMA and the SPACE separating the volume's
|
||||
value and its corresponding pressure correction. The volumes in the file
|
||||
should be uniformly spaced. Both the volumes and the pressure corrections
|
||||
must be uniformly spaced. Both the volumes and the pressure corrections
|
||||
should be provided in the proper units, e.g. if you are using {units real},
|
||||
the volumes should all be in cubic angstroms, and the pressure corrections
|
||||
should all be in atmospheres. Furthermore, the table should start/end at a
|
||||
|
||||
@ -39,8 +39,8 @@ An example of using the interface pinning method is located in the
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This fix is part of the MISC package. It is only enabled if LAMMPS
|
||||
was built with that package. See the "Build
|
||||
This fix is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Build
|
||||
package"_Build_package.html doc page for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
@ -13,7 +13,7 @@ pair_style coul/shield command :h3
|
||||
pair_style coul/shield cutoff tap_flag :pre
|
||||
|
||||
cutoff = global cutoff (distance units)
|
||||
tap_flag = 0/1 to turn off/on the taper function
|
||||
tap_flag = 0/1 to turn off/on the taper function :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
|
||||
@ -13,17 +13,17 @@ pair_style ilp/graphene/hbn command :h3
|
||||
pair_style \[hybrid/overlay ...\] ilp/graphene/hbn cutoff tap_flag :pre
|
||||
|
||||
cutoff = global cutoff (distance units)
|
||||
tap_flag = 0/1 to turn off/on the taper function
|
||||
tap_flag = 0/1 to turn off/on the taper function :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style hybrid/overlay ilp/graphene/hbn 16.0 1
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C :pre
|
||||
pair_style hybrid/overlay ilp/graphene/hbn 16.0 1
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C :pre
|
||||
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
pair_coeff * * rebo CH.rebo NULL NULL C
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C
|
||||
pair_coeff * * rebo CH.rebo NULL NULL C
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.695
|
||||
pair_coeff 2 2 coul/shield 0.69 :pre
|
||||
@ -85,6 +85,22 @@ be found in "(Ouyang)"_#Ouyang.
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
|
||||
This pair style tallies a breakdown of the total interlayer potential
|
||||
energy into sub-categories, which can be accessed via the "compute
|
||||
pair"_compute_pair.html command as a vector of values of length 2.
|
||||
The 2 values correspond to the following sub-categories:
|
||||
|
||||
{E_vdW} = vdW (attractive) energy
|
||||
{E_Rep} = Repulsive energy :ol
|
||||
|
||||
To print these quantities to the log file (with descriptive column
|
||||
headings) the following commands could be included in an input script:
|
||||
|
||||
compute 0 all pair ilp/graphene/hbn
|
||||
variable Evdw equal c_0\[1\]
|
||||
variable Erep equal c_0\[2\]
|
||||
thermo_style custom step temp epair v_Erep v_Evdw :pre
|
||||
|
||||
:line
|
||||
|
||||
[Mixing, shift, table, tail correction, restart, rRESPA info]:
|
||||
|
||||
@ -13,7 +13,7 @@ pair_style kolmogorov/crespi/full command :h3
|
||||
pair_style hybrid/overlay kolmogorov/crespi/full cutoff tap_flag :pre
|
||||
|
||||
cutoff = global cutoff (distance units)
|
||||
tap_flag = 0/1 to turn off/on the taper function
|
||||
tap_flag = 0/1 to turn off/on the taper function :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
@ -74,6 +74,22 @@ comparison of these parameters can be found in "(Ouyang)"_#Ouyang1.
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
|
||||
This pair style tallies a breakdown of the total interlayer potential
|
||||
energy into sub-categories, which can be accessed via the "compute
|
||||
pair"_compute_pair.html command as a vector of values of length 2.
|
||||
The 2 values correspond to the following sub-categories:
|
||||
|
||||
{E_vdW} = vdW (attractive) energy
|
||||
{E_Rep} = Repulsive energy :ol
|
||||
|
||||
To print these quantities to the log file (with descriptive column
|
||||
headings) the following commands could be included in an input script:
|
||||
|
||||
compute 0 all pair kolmogorov/crespi/full
|
||||
variable Evdw equal c_0\[1\]
|
||||
variable Erep equal c_0\[2\]
|
||||
thermo_style custom step temp epair v_Erep v_Evdw :pre
|
||||
|
||||
:line
|
||||
|
||||
[Mixing, shift, table, tail correction, restart, rRESPA info]:
|
||||
|
||||
1372
examples/USER/misc/ilp_graphene_hbn/Bi_gr_AB_stack_2L_noH.data
Normal file
1372
examples/USER/misc/ilp_graphene_hbn/Bi_gr_AB_stack_2L_noH.data
Normal file
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
../../../../../potentials/BNCH-old.ILP
|
||||
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
../../../../../potentials/CH.airebo
|
||||
@ -1,61 +0,0 @@
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
# read lammps data file
|
||||
read_data Bi_gr_AB_stack_2L_noH_300K.data
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
group adsorbate type 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo ilp/graphene/hbn 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo NULL C # chemical
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair ilp/graphene/hbn
|
||||
variable REBO equal c_0
|
||||
variable ILP equal c_1
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_ILP temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
@ -1,137 +0,0 @@
|
||||
LAMMPS (8 Mar 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
# read lammps data file
|
||||
read_data Bi_gr_AB_stack_2L_noH_300K.data
|
||||
orthogonal box = (0 0 0) to (42.6 41.8117 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
reading velocities ...
|
||||
1360 velocities
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
680 atoms in group membrane
|
||||
group adsorbate type 2
|
||||
680 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo ilp/graphene/hbn 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo NULL C # chemical
|
||||
Reading potential file CH.airebo with DATE: 2011-10-25
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair ilp/graphene/hbn
|
||||
variable REBO equal c_0
|
||||
variable ILP equal c_1
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_ILP temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair rebo, perpetual, skip from (2)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: skip/ghost
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 16.96 | 16.96 | 16.96 Mbytes
|
||||
Step TotEng PotEng KinEng v_REBO v_ILP Temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
0 -5029.3801131277 -5044.0700799791 14.6899668514 -5011.2636297759 -32.8064502032 83.6251135127 22.0155657205 20.2812150219 3.4623630945 0.0282287195 0.0535565745 0.2193320108
|
||||
100 -5029.3895815657 -5045.3201249690 15.9305434033 -5012.4897058028 -32.8304191662 90.6873047362 22.0181751545 20.2867946176 3.4502536831 0.0239131349 0.0576557373 -0.4387830564
|
||||
200 -5029.3874064119 -5045.8119502228 16.4245438109 -5012.7276250747 -33.0843251481 93.4994853617 22.0202931358 20.2926890775 3.3883512918 0.0180268639 0.0596894423 -0.6964675465
|
||||
300 -5029.3851410393 -5044.9928147367 15.6076736974 -5012.1131531405 -32.8796615962 88.8493144891 22.0216852689 20.2985091183 3.3368274018 0.0093519893 0.0546775051 -0.2110676539
|
||||
400 -5029.3900102082 -5045.6706717598 16.2806615516 -5012.7330095297 -32.9376622301 92.6804113372 22.0220931529 20.3035219616 3.3560233852 -0.0015365116 0.0454268927 0.5478139709
|
||||
500 -5029.3985510533 -5046.0433160610 16.6447650078 -5013.0924334585 -32.9508826025 94.7531316612 22.0214795944 20.3074656871 3.4232399722 -0.0107212024 0.0332249366 0.6595923534
|
||||
600 -5029.3929936746 -5045.4367231195 16.0437294449 -5012.7046931021 -32.7320300174 91.3316353653 22.0200027176 20.3101652565 3.4651727438 -0.0178110391 0.0210056002 0.1144372537
|
||||
700 -5029.3934435811 -5045.6074608403 16.2140172592 -5012.7886962164 -32.8187646239 92.3010274644 22.0178838793 20.3116257077 3.4432436715 -0.0242636237 0.0078323424 -0.5162836955
|
||||
800 -5029.3892931255 -5046.2270462380 16.8377531124 -5013.2383770824 -32.9886691555 95.8517489911 22.0151485191 20.3116305041 3.3780520461 -0.0302821178 -0.0083184719 -0.6710801515
|
||||
900 -5029.3930414672 -5046.0272003818 16.6341589146 -5013.2317798384 -32.7954205434 94.6927546874 22.0119224940 20.3099187654 3.3350551183 -0.0341747588 -0.0256858066 -0.0799872839
|
||||
1000 -5029.3908907831 -5045.6437703691 16.2528795861 -5012.6800867885 -32.9636835807 92.5222578135 22.0084902521 20.3065746721 3.3658243730 -0.0336536245 -0.0406018547 0.6191660974
|
||||
Loop time of 137.46 on 1 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 0.629 ns/day, 38.183 hours/ns, 7.275 timesteps/s
|
||||
95.1% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 137.33 | 137.33 | 137.33 | 0.0 | 99.90
|
||||
Bond | 0.00071788 | 0.00071788 | 0.00071788 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.067907 | 0.067907 | 0.067907 | 0.0 | 0.05
|
||||
Output | 0.0016029 | 0.0016029 | 0.0016029 | 0.0 | 0.00
|
||||
Modify | 0.036542 | 0.036542 | 0.036542 | 0.0 | 0.03
|
||||
Other | | 0.02574 | | | 0.02
|
||||
|
||||
Nlocal: 1360 ave 1360 max 1360 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7964 ave 7964 max 7964 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 265206 ave 265206 max 265206 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 265206
|
||||
Ave neighs/atom = 195.004
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:02:17
|
||||
@ -1,137 +0,0 @@
|
||||
LAMMPS (8 Mar 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
# read lammps data file
|
||||
read_data Bi_gr_AB_stack_2L_noH_300K.data
|
||||
orthogonal box = (0 0 0) to (42.6 41.8117 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
reading velocities ...
|
||||
1360 velocities
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
680 atoms in group membrane
|
||||
group adsorbate type 2
|
||||
680 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo ilp/graphene/hbn 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo NULL C # chemical
|
||||
Reading potential file CH.airebo with DATE: 2011-10-25
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair ilp/graphene/hbn
|
||||
variable REBO equal c_0
|
||||
variable ILP equal c_1
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_ILP temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair rebo, perpetual, skip from (2)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: skip/ghost
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 11.13 | 11.13 | 11.13 Mbytes
|
||||
Step TotEng PotEng KinEng v_REBO v_ILP Temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
0 -5029.3801131277 -5044.0700799791 14.6899668514 -5011.2636297759 -32.8064502032 83.6251135127 22.0155657205 20.2812150219 3.4623630945 0.0282287195 0.0535565745 0.2193320108
|
||||
100 -5029.3895815657 -5045.3201249690 15.9305434033 -5012.4897058028 -32.8304191662 90.6873047362 22.0181751545 20.2867946176 3.4502536831 0.0239131349 0.0576557373 -0.4387830564
|
||||
200 -5029.3874064119 -5045.8119502228 16.4245438109 -5012.7276250747 -33.0843251481 93.4994853617 22.0202931358 20.2926890775 3.3883512918 0.0180268639 0.0596894423 -0.6964675465
|
||||
300 -5029.3851410393 -5044.9928147367 15.6076736974 -5012.1131531405 -32.8796615962 88.8493144891 22.0216852689 20.2985091183 3.3368274018 0.0093519893 0.0546775051 -0.2110676539
|
||||
400 -5029.3900102082 -5045.6706717598 16.2806615516 -5012.7330095297 -32.9376622301 92.6804113371 22.0220931529 20.3035219616 3.3560233852 -0.0015365116 0.0454268927 0.5478139709
|
||||
500 -5029.3985510533 -5046.0433160611 16.6447650078 -5013.0924334585 -32.9508826025 94.7531316612 22.0214795944 20.3074656871 3.4232399722 -0.0107212024 0.0332249366 0.6595923534
|
||||
600 -5029.3929936746 -5045.4367231195 16.0437294449 -5012.7046931021 -32.7320300174 91.3316353653 22.0200027176 20.3101652565 3.4651727438 -0.0178110391 0.0210056002 0.1144372537
|
||||
700 -5029.3934435811 -5045.6074608403 16.2140172592 -5012.7886962164 -32.8187646239 92.3010274643 22.0178838793 20.3116257077 3.4432436715 -0.0242636237 0.0078323424 -0.5162836955
|
||||
800 -5029.3892931255 -5046.2270462380 16.8377531124 -5013.2383770824 -32.9886691555 95.8517489911 22.0151485191 20.3116305041 3.3780520461 -0.0302821178 -0.0083184719 -0.6710801515
|
||||
900 -5029.3930414671 -5046.0272003818 16.6341589146 -5013.2317798384 -32.7954205434 94.6927546874 22.0119224940 20.3099187654 3.3350551183 -0.0341747588 -0.0256858066 -0.0799872839
|
||||
1000 -5029.3908907831 -5045.6437703692 16.2528795861 -5012.6800867885 -32.9636835807 92.5222578135 22.0084902521 20.3065746721 3.3658243730 -0.0336536245 -0.0406018547 0.6191660974
|
||||
Loop time of 36.0917 on 4 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 2.394 ns/day, 10.025 hours/ns, 27.707 timesteps/s
|
||||
97.6% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 33.204 | 34.289 | 35.893 | 17.3 | 95.01
|
||||
Bond | 0.00038719 | 0.00065947 | 0.00097609 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.1539 | 1.7595 | 2.8464 | 76.7 | 4.88
|
||||
Output | 0.0013447 | 0.0014529 | 0.0016887 | 0.4 | 0.00
|
||||
Modify | 0.010811 | 0.012037 | 0.013764 | 1.0 | 0.03
|
||||
Other | | 0.0287 | | | 0.08
|
||||
|
||||
Nlocal: 340 ave 344 max 334 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 1 1
|
||||
Nghost: 4628 ave 4634 max 4624 min
|
||||
Histogram: 1 0 1 0 1 0 0 0 0 1
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 66301.5 ave 67860 max 63963 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 1 1
|
||||
|
||||
Total # of neighbors = 265206
|
||||
Ave neighs/atom = 195.004
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:36
|
||||
@ -1 +0,0 @@
|
||||
../../../../../potentials/BNC.tersoff
|
||||
@ -1 +0,0 @@
|
||||
../../../../../potentials/BNCH-old.ILP
|
||||
@ -1 +0,0 @@
|
||||
../../../../../potentials/CH.airebo
|
||||
@ -1,71 +0,0 @@
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data gr_hBN_Cstack_2L_noH.data
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | membrane
|
||||
mass 3 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
group adsorbate type 3
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo NULL NULL C # chemical
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL # chemical
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N C # long range
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair tersoff
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
compute 3 all pair coul/shield
|
||||
variable REBO equal c_0
|
||||
variable Tersoff equal c_1
|
||||
variable EILP equal c_2
|
||||
variable Ecoul equal c_3
|
||||
|
||||
# Calculate the pair potential between the substrate and slider
|
||||
compute sldsub adsorbate group/group membrane
|
||||
variable Evdw equal c_sldsub
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_REBO v_EILP v_Ecoul temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
@ -1,171 +0,0 @@
|
||||
LAMMPS (8 Mar 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data gr_hBN_Cstack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (44.583 42.9 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1440 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | membrane
|
||||
mass 3 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
720 atoms in group membrane
|
||||
group adsorbate type 3
|
||||
720 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo NULL NULL C # chemical
|
||||
Reading potential file CH.airebo with DATE: 2011-10-25
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N C # long range
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair tersoff
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
compute 3 all pair coul/shield
|
||||
variable REBO equal c_0
|
||||
variable Tersoff equal c_1
|
||||
variable EILP equal c_2
|
||||
variable Ecoul equal c_3
|
||||
|
||||
# Calculate the pair potential between the substrate and slider
|
||||
compute sldsub adsorbate group/group membrane
|
||||
variable Evdw equal c_sldsub
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_REBO v_EILP v_Ecoul temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
7 neighbor lists, perpetual/occasional/extra = 6 1 0
|
||||
(1) pair rebo, perpetual, skip from (3)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: skip/ghost
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair tersoff, perpetual, skip from (6)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(3) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(4) pair coul/shield, perpetual, half/full from (2)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton/skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) compute group/group, occasional, copy from (7)
|
||||
attributes: half, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(6) neighbor class addition, perpetual, copy from (3)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(7) neighbor class addition, perpetual, half/full from (6)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 25.93 | 25.93 | 25.93 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_REBO v_EILP v_Ecoul Temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
0 -10708.4531746010 -10764.2547791975 55.8016045965 -66.8250335416 -5401.7347845703 -5322.2780762734 -40.2419183538 0.0000000000 300.0000000000 21.6722857297 22.1650000000 3.3300000000 0.1682661410 -0.0842226772 0.1056563755
|
||||
100 -10708.2491256387 -10738.4532793285 30.2041536898 -68.8603937785 -5389.4304136167 -5309.6361134033 -39.3867523085 0.0000000000 162.3832535368 21.6879886706 22.1574778199 3.3223279482 0.1346509596 -0.0580689194 -0.1274433614
|
||||
200 -10708.1985754490 -10736.7142682477 28.5156927987 -70.0276479251 -5388.8677096501 -5308.3263464524 -39.5202121452 0.0000000000 153.3057678444 21.6968427596 22.1541506320 3.3143666142 0.0334706445 -0.0081639882 -0.0055006321
|
||||
300 -10708.1878214116 -10736.9033486636 28.7155272520 -68.2422175765 -5388.5952548022 -5308.9505338445 -39.3575600169 0.0000000000 154.3801157314 21.6939171741 22.1551483321 3.3251666346 -0.0896064591 0.0248921781 0.1717740196
|
||||
400 -10708.2036103906 -10738.2295882994 30.0259779088 -67.4993928655 -5389.4510311345 -5309.1985887571 -39.5799684078 0.0000000000 161.4253467759 21.6806789605 22.1589742804 3.3300374170 -0.1615300496 0.0532638209 -0.1185426799
|
||||
500 -10708.1853082161 -10736.0245173060 27.8392090900 -69.9737746636 -5387.9379921501 -5308.5551693329 -39.5313558230 0.0000000000 149.6688632411 21.6641276776 22.1655659011 3.3143210751 -0.1579504334 0.0766822604 -0.1154029266
|
||||
600 -10708.1781001285 -10736.4254568396 28.2473567110 -69.9368770273 -5388.3515507737 -5308.6700567475 -39.4038493184 0.0000000000 151.8631421907 21.6516789999 22.1733266592 3.3149997184 -0.0805825343 0.0684349609 0.1419617624
|
||||
700 -10708.1867253590 -10736.6143955088 28.4276701498 -67.1597096579 -5387.8570063253 -5309.0676141640 -39.6897750195 0.0000000000 152.8325414049 21.6489884054 22.1774523945 3.3315351816 0.0259900263 0.0094570835 0.0707953688
|
||||
800 -10708.1733385055 -10736.0277775931 27.8544390876 -68.6354557276 -5388.1933954711 -5308.5094712719 -39.3249108500 0.0000000000 149.7507425941 21.6565725156 22.1751617515 3.3227650180 0.1222442823 -0.0531420670 -0.1677749693
|
||||
900 -10708.1827888042 -10737.2646739167 29.0818851126 -70.2218493216 -5387.9824857335 -5309.6527953488 -39.6293928345 0.0000000000 156.3497250098 21.6716950833 22.1680989334 3.3131455846 0.1650154385 -0.0820901425 0.0072049300
|
||||
1000 -10708.1804322657 -10736.1966428009 28.0162105352 -68.3753745517 -5388.2611029662 -5308.4521913187 -39.4833485160 0.0000000000 150.6204565501 21.6865468141 22.1602434319 3.3246621699 0.1213363701 -0.0688593023 0.1701174943
|
||||
Loop time of 149.449 on 1 procs for 1000 steps with 1440 atoms
|
||||
|
||||
Performance: 0.578 ns/day, 41.514 hours/ns, 6.691 timesteps/s
|
||||
96.7% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 149.06 | 149.06 | 149.06 | 0.0 | 99.74
|
||||
Bond | 0.00082946 | 0.00082946 | 0.00082946 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.068351 | 0.068351 | 0.068351 | 0.0 | 0.05
|
||||
Output | 0.25935 | 0.25935 | 0.25935 | 0.0 | 0.17
|
||||
Modify | 0.030915 | 0.030915 | 0.030915 | 0.0 | 0.02
|
||||
Other | | 0.02702 | | | 0.02
|
||||
|
||||
Nlocal: 1440 ave 1440 max 1440 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 8180 ave 8180 max 8180 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 140400 ave 140400 max 140400 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 280800 ave 280800 max 280800 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 280800
|
||||
Ave neighs/atom = 195
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:02:29
|
||||
@ -1,171 +0,0 @@
|
||||
LAMMPS (8 Mar 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data gr_hBN_Cstack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (44.583 42.9 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1440 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | membrane
|
||||
mass 3 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
720 atoms in group membrane
|
||||
group adsorbate type 3
|
||||
720 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo NULL NULL C # chemical
|
||||
Reading potential file CH.airebo with DATE: 2011-10-25
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N C # long range
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair tersoff
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
compute 3 all pair coul/shield
|
||||
variable REBO equal c_0
|
||||
variable Tersoff equal c_1
|
||||
variable EILP equal c_2
|
||||
variable Ecoul equal c_3
|
||||
|
||||
# Calculate the pair potential between the substrate and slider
|
||||
compute sldsub adsorbate group/group membrane
|
||||
variable Evdw equal c_sldsub
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_REBO v_EILP v_Ecoul temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
7 neighbor lists, perpetual/occasional/extra = 6 1 0
|
||||
(1) pair rebo, perpetual, skip from (3)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: skip/ghost
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair tersoff, perpetual, skip from (6)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(3) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(4) pair coul/shield, perpetual, half/full from (2)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton/skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) compute group/group, occasional, copy from (7)
|
||||
attributes: half, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(6) neighbor class addition, perpetual, copy from (3)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(7) neighbor class addition, perpetual, half/full from (6)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 14.25 | 14.25 | 14.25 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_REBO v_EILP v_Ecoul Temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
0 -10708.4531746011 -10764.2547791976 55.8016045965 -66.8250335415 -5401.7347845703 -5322.2780762735 -40.2419183538 0.0000000000 300.0000000000 21.6722857297 22.1650000000 3.3300000000 0.1682661410 -0.0842226772 0.1056563755
|
||||
100 -10708.2491256387 -10738.4532793285 30.2041536898 -68.8603937785 -5389.4304136167 -5309.6361134033 -39.3867523085 0.0000000000 162.3832535368 21.6879886706 22.1574778199 3.3223279482 0.1346509596 -0.0580689194 -0.1274433614
|
||||
200 -10708.1985754490 -10736.7142682477 28.5156927987 -70.0276479251 -5388.8677096501 -5308.3263464524 -39.5202121452 0.0000000000 153.3057678444 21.6968427596 22.1541506320 3.3143666142 0.0334706445 -0.0081639882 -0.0055006321
|
||||
300 -10708.1878214116 -10736.9033486636 28.7155272520 -68.2422175765 -5388.5952548022 -5308.9505338445 -39.3575600169 0.0000000000 154.3801157314 21.6939171741 22.1551483321 3.3251666346 -0.0896064591 0.0248921781 0.1717740196
|
||||
400 -10708.2036103906 -10738.2295882994 30.0259779088 -67.4993928655 -5389.4510311345 -5309.1985887571 -39.5799684078 0.0000000000 161.4253467759 21.6806789605 22.1589742804 3.3300374170 -0.1615300496 0.0532638209 -0.1185426799
|
||||
500 -10708.1853082161 -10736.0245173060 27.8392090900 -69.9737746636 -5387.9379921501 -5308.5551693329 -39.5313558230 0.0000000000 149.6688632411 21.6641276776 22.1655659011 3.3143210751 -0.1579504334 0.0766822604 -0.1154029266
|
||||
600 -10708.1781001285 -10736.4254568396 28.2473567110 -69.9368770273 -5388.3515507736 -5308.6700567475 -39.4038493184 0.0000000000 151.8631421907 21.6516789999 22.1733266592 3.3149997184 -0.0805825343 0.0684349609 0.1419617624
|
||||
700 -10708.1867253590 -10736.6143955089 28.4276701498 -67.1597096579 -5387.8570063253 -5309.0676141640 -39.6897750195 0.0000000000 152.8325414049 21.6489884054 22.1774523945 3.3315351816 0.0259900263 0.0094570835 0.0707953688
|
||||
800 -10708.1733385055 -10736.0277775930 27.8544390876 -68.6354557276 -5388.1933954711 -5308.5094712719 -39.3249108500 0.0000000000 149.7507425941 21.6565725156 22.1751617515 3.3227650180 0.1222442823 -0.0531420670 -0.1677749693
|
||||
900 -10708.1827888042 -10737.2646739167 29.0818851126 -70.2218493216 -5387.9824857335 -5309.6527953488 -39.6293928345 0.0000000000 156.3497250098 21.6716950833 22.1680989334 3.3131455846 0.1650154385 -0.0820901425 0.0072049300
|
||||
1000 -10708.1804322657 -10736.1966428009 28.0162105352 -68.3753745517 -5388.2611029662 -5308.4521913187 -39.4833485160 0.0000000000 150.6204565501 21.6865468141 22.1602434319 3.3246621699 0.1213363701 -0.0688593023 0.1701174943
|
||||
Loop time of 39.6206 on 4 procs for 1000 steps with 1440 atoms
|
||||
|
||||
Performance: 2.181 ns/day, 11.006 hours/ns, 25.239 timesteps/s
|
||||
98.9% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 34.948 | 37.122 | 39.309 | 31.6 | 93.69
|
||||
Bond | 0.00046444 | 0.0005914 | 0.00089121 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.20131 | 2.3895 | 4.565 | 124.7 | 6.03
|
||||
Output | 0.069107 | 0.069157 | 0.069264 | 0.0 | 0.17
|
||||
Modify | 0.010056 | 0.010403 | 0.010688 | 0.3 | 0.03
|
||||
Other | | 0.02875 | | | 0.07
|
||||
|
||||
Nlocal: 360 ave 380 max 340 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Nghost: 4716 ave 4736 max 4696 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Neighs: 35100 ave 37050 max 33150 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
FullNghs: 70200 ave 74100 max 66300 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
|
||||
Total # of neighbors = 280800
|
||||
Ave neighs/atom = 195
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:39
|
||||
1372
examples/USER/misc/ilp_graphene_hbn/hBN_AA_prime_stack_2L_noH.data
Normal file
1372
examples/USER/misc/ilp_graphene_hbn/hBN_AA_prime_stack_2L_noH.data
Normal file
File diff suppressed because it is too large
Load Diff
51
examples/USER/misc/ilp_graphene_hbn/in.bilayer-graphene
Normal file
51
examples/USER/misc/ilp_graphene_hbn/in.bilayer-graphene
Normal file
@ -0,0 +1,51 @@
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
|
||||
read_data Bi_gr_AB_stack_2L_noH.data
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
group layer2 molecule 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo ilp/graphene/hbn 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo C C # chemical
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair ilp/graphene/hbn
|
||||
variable REBO equal c_0 # REBO energy
|
||||
variable ILP equal c_1 # total interlayer energy
|
||||
variable Evdw equal c_1[1] # attractive energy
|
||||
variable Erep equal c_1[2] # repulsive energy
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_ILP v_Erep v_Evdw temp
|
||||
thermo_modify lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
fix thermostat all nve
|
||||
run 1000
|
||||
56
examples/USER/misc/ilp_graphene_hbn/in.bilayer-hBN
Normal file
56
examples/USER/misc/ilp_graphene_hbn/in.bilayer-hBN
Normal file
@ -0,0 +1,56 @@
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AA_prime_stack_2L_noH.data
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
group layer2 molecule 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff B N B N # chemical
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345 dist gaussian mom yes rot yes
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0 # Tersoff energy
|
||||
variable Ecoul equal c_1 # Coulomb energy
|
||||
variable EILP equal c_2 # total interlayer energy
|
||||
variable Evdw equal c_2[1] # attractive energy
|
||||
variable Erep equal c_2[2] # repulsive energy
|
||||
|
||||
############# Output ###############
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_EILP v_Erep v_Evdw v_Ecoul temp
|
||||
thermo_modify lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
56
examples/USER/misc/ilp_graphene_hbn/in.grhBN
Normal file
56
examples/USER/misc/ilp_graphene_hbn/in.grhBN
Normal file
@ -0,0 +1,56 @@
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data gr_hBN_Cstack_2L_noH.data
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | membrane
|
||||
mass 3 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group hBN molecule 1
|
||||
group gr molecule 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo NULL NULL C # chemical
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL # chemical
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C # long range
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345 dist gaussian mom yes rot yes
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair tersoff
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
compute 3 all pair coul/shield
|
||||
variable REBO equal c_0
|
||||
variable Tersoff equal c_1
|
||||
variable EILP equal c_2 # total interlayer energy
|
||||
variable Evdw equal c_2[1] # attractive energy
|
||||
variable Erep equal c_2[2] # repulsive energy
|
||||
variable Ecoul equal c_3
|
||||
|
||||
############# Output ##############
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_REBO v_EILP v_Erep v_Evdw v_Ecoul temp
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
@ -32,14 +32,6 @@ neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
@ -51,19 +43,16 @@ compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0
|
||||
variable Ecoul equal c_1
|
||||
variable EILP equal c_2
|
||||
|
||||
# Calculate the pair potential between the substrate and slider
|
||||
compute sldsub adsorbate group/group membrane
|
||||
variable Evdw equal c_sldsub
|
||||
variable ILP equal c_2
|
||||
variable Evdw equal c_2[1]
|
||||
variable Erep equal c_2[2]
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_EILP v_Ecoul temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom f_subf[1] f_subf[2] f_subf[3]
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn #ignore
|
||||
thermo_style custom step etotal pe ke v_Tersoff v_ILP v_Ecoul v_Erep v_Evdw temp
|
||||
thermo_modify lost warn #ignore
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
@ -1,168 +0,0 @@
|
||||
LAMMPS (8 Mar 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AB_stack_2L_noH_equi_300K.data
|
||||
orthogonal box = (0 0 0) to (43.38 42.5773 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
reading velocities ...
|
||||
1360 velocities
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
680 atoms in group membrane
|
||||
group adsorbate type 3 4
|
||||
680 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff NULL NULL B N # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0
|
||||
variable Ecoul equal c_1
|
||||
variable EILP equal c_2
|
||||
|
||||
# Calculate the pair potential between the substrate and slider
|
||||
compute sldsub adsorbate group/group membrane
|
||||
variable Evdw equal c_sldsub
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_EILP v_Ecoul temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom f_subf[1] f_subf[2] f_subf[3]
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn #ignore
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
6 neighbor lists, perpetual/occasional/extra = 5 1 0
|
||||
(1) pair tersoff, perpetual, skip from (5)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) pair coul/shield, perpetual, skip from (6)
|
||||
attributes: half, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) compute group/group, occasional, copy from (6)
|
||||
attributes: half, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) neighbor class addition, perpetual, copy from (2)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(6) neighbor class addition, perpetual, half/full from (5)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 57.85 | 57.85 | 57.85 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_EILP v_Ecoul Temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom f_subf[1] f_subf[2] f_subf[3]
|
||||
0 -5114.6628078598 -5127.8586355055 13.1958276458 -75.3652234209 -5091.4120857465 -36.0831137829 -0.3634359761 75.1194741238 20.9113202537 20.6582215878 3.2895976612 -0.0495147937 -0.0552233516 -0.0166592619 -0.1742790202 -0.0884665936 -0.8010816801
|
||||
100 -5114.6620580583 -5127.6958349342 13.0337768758 -75.2249487778 -5091.2407919311 -36.0927601416 -0.3622828614 74.1969727889 20.9076129631 20.6534162972 3.2908118318 -0.0234802196 -0.0397832410 0.0332404745 -0.2430042439 -0.1598109185 -0.5351246275
|
||||
200 -5114.6630637865 -5127.5945140906 12.9314503041 -74.6445167393 -5091.1507571912 -36.0866688941 -0.3570880053 73.6144615235 20.9067696105 20.6505240051 3.2976575241 0.0078967872 -0.0170385302 0.0850447973 -0.2934041648 -0.2405295165 0.2309200807
|
||||
300 -5114.6693830121 -5128.3286231421 13.6592401300 -74.2223518942 -5091.8645555419 -36.1107860098 -0.3532815904 77.7575278367 20.9090146500 20.6502445717 3.3024525026 0.0352437329 0.0112279015 -0.0021399216 -0.2166516175 -0.2410661267 0.9007458614
|
||||
400 -5114.6614035404 -5127.6423784754 12.9809749350 -74.6548295432 -5091.2348011465 -36.0496340516 -0.3579432773 73.8963888364 20.9136276183 20.6526810045 3.2977225951 0.0556629502 0.0358324354 -0.0738287296 -0.1431221016 -0.1626739623 0.0673046122
|
||||
500 -5114.6599876234 -5127.4097813122 12.7497936887 -75.2268687829 -5090.9284608504 -36.1195707042 -0.3617497575 72.5803506074 20.9197050770 20.6571510311 3.2909058903 0.0631939085 0.0530269602 -0.0516940297 -0.0112976844 -0.1217009147 -0.4713422319
|
||||
600 -5114.6672773464 -5128.0912983829 13.4240210364 -75.3848112535 -5091.6338883189 -36.0938401510 -0.3635699131 76.4185034811 20.9258252862 20.6628322031 3.2892805234 0.0573396226 0.0579085440 0.0291853982 0.1059950758 0.0102266125 -0.7683214794
|
||||
700 -5114.6609647250 -5127.7466720637 13.0857073388 -74.7981789470 -5091.2811095008 -36.1066385732 -0.3589239897 74.4925957063 20.9307092134 20.6683554324 3.2957959411 0.0396744013 0.0503347378 0.0818267711 0.1737903706 0.1258761156 0.1307185989
|
||||
800 -5114.6622627667 -5128.0130406264 13.3507778597 -74.2952448854 -5091.5693975625 -36.0897180314 -0.3539250325 76.0015543464 20.9334441079 20.6725125240 3.3019570181 0.0142277646 0.0313116646 0.0291673132 0.2457478793 0.1912082770 0.7239823553
|
||||
900 -5114.6675469561 -5128.1496933801 13.4821464240 -74.3644898573 -5091.6703861750 -36.1246785145 -0.3546286905 76.7493920516 20.9334403558 20.6744181494 3.3005582394 -0.0141399355 0.0063543986 -0.0561206619 0.2370151923 0.2115707560 0.7822017606
|
||||
1000 -5114.6683146144 -5128.3364609113 13.6681462969 -75.1091579020 -5091.9370210069 -36.0375964349 -0.3618434694 77.8082276935 20.9306643096 20.6737238853 3.2922181699 -0.0411219854 -0.0200694204 -0.0788193565 0.2225175431 0.2377413412 -0.5875288557
|
||||
Loop time of 202.063 on 1 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 0.428 ns/day, 56.129 hours/ns, 4.949 timesteps/s
|
||||
91.0% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 201.4 | 201.4 | 201.4 | 0.0 | 99.67
|
||||
Bond | 0.00092697 | 0.00092697 | 0.00092697 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.086005 | 0.086005 | 0.086005 | 0.0 | 0.04
|
||||
Output | 0.50438 | 0.50438 | 0.50438 | 0.0 | 0.25
|
||||
Modify | 0.038846 | 0.038846 | 0.038846 | 0.0 | 0.02
|
||||
Other | | 0.03093 | | | 0.02
|
||||
|
||||
Nlocal: 1360 ave 1360 max 1360 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7840 ave 7840 max 7840 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 249628 ave 249628 max 249628 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 253390 ave 253390 max 253390 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 253390
|
||||
Ave neighs/atom = 186.316
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:03:22
|
||||
@ -1,168 +0,0 @@
|
||||
LAMMPS (8 Mar 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AB_stack_2L_noH_equi_300K.data
|
||||
orthogonal box = (0 0 0) to (43.38 42.5773 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
reading velocities ...
|
||||
1360 velocities
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
680 atoms in group membrane
|
||||
group adsorbate type 3 4
|
||||
680 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff NULL NULL B N # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0
|
||||
variable Ecoul equal c_1
|
||||
variable EILP equal c_2
|
||||
|
||||
# Calculate the pair potential between the substrate and slider
|
||||
compute sldsub adsorbate group/group membrane
|
||||
variable Evdw equal c_sldsub
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_EILP v_Ecoul temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom f_subf[1] f_subf[2] f_subf[3]
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn #ignore
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
6 neighbor lists, perpetual/occasional/extra = 5 1 0
|
||||
(1) pair tersoff, perpetual, skip from (5)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) pair coul/shield, perpetual, skip from (6)
|
||||
attributes: half, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) compute group/group, occasional, copy from (6)
|
||||
attributes: half, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) neighbor class addition, perpetual, copy from (2)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(6) neighbor class addition, perpetual, half/full from (5)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 30.63 | 30.63 | 30.64 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_EILP v_Ecoul Temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom f_subf[1] f_subf[2] f_subf[3]
|
||||
0 -5114.6628078598 -5127.8586355055 13.1958276458 -75.3652234209 -5091.4120857465 -36.0831137829 -0.3634359761 75.1194741238 20.9113202537 20.6582215878 3.2895976612 -0.0495147937 -0.0552233516 -0.0166592619 -0.1742790202 -0.0884665936 -0.8010816801
|
||||
100 -5114.6620580583 -5127.6958349342 13.0337768758 -75.2249487778 -5091.2407919311 -36.0927601416 -0.3622828614 74.1969727889 20.9076129631 20.6534162972 3.2908118318 -0.0234802196 -0.0397832410 0.0332404745 -0.2430042439 -0.1598109185 -0.5351246275
|
||||
200 -5114.6630637865 -5127.5945140906 12.9314503041 -74.6445167393 -5091.1507571912 -36.0866688941 -0.3570880053 73.6144615235 20.9067696105 20.6505240051 3.2976575241 0.0078967872 -0.0170385302 0.0850447973 -0.2934041648 -0.2405295165 0.2309200807
|
||||
300 -5114.6693830121 -5128.3286231421 13.6592401300 -74.2223518942 -5091.8645555419 -36.1107860098 -0.3532815904 77.7575278367 20.9090146500 20.6502445717 3.3024525026 0.0352437329 0.0112279015 -0.0021399216 -0.2166516175 -0.2410661267 0.9007458614
|
||||
400 -5114.6614035404 -5127.6423784754 12.9809749350 -74.6548295432 -5091.2348011465 -36.0496340516 -0.3579432773 73.8963888364 20.9136276183 20.6526810045 3.2977225951 0.0556629502 0.0358324354 -0.0738287296 -0.1431221016 -0.1626739623 0.0673046122
|
||||
500 -5114.6599876234 -5127.4097813122 12.7497936887 -75.2268687829 -5090.9284608504 -36.1195707042 -0.3617497575 72.5803506074 20.9197050770 20.6571510311 3.2909058903 0.0631939085 0.0530269602 -0.0516940297 -0.0112976844 -0.1217009147 -0.4713422319
|
||||
600 -5114.6672773464 -5128.0912983829 13.4240210364 -75.3848112535 -5091.6338883189 -36.0938401510 -0.3635699131 76.4185034811 20.9258252862 20.6628322031 3.2892805234 0.0573396226 0.0579085440 0.0291853982 0.1059950758 0.0102266125 -0.7683214794
|
||||
700 -5114.6609647250 -5127.7466720637 13.0857073388 -74.7981789470 -5091.2811095008 -36.1066385732 -0.3589239897 74.4925957063 20.9307092134 20.6683554324 3.2957959411 0.0396744013 0.0503347378 0.0818267711 0.1737903706 0.1258761156 0.1307185989
|
||||
800 -5114.6622627667 -5128.0130406264 13.3507778597 -74.2952448854 -5091.5693975625 -36.0897180314 -0.3539250325 76.0015543464 20.9334441079 20.6725125240 3.3019570181 0.0142277646 0.0313116646 0.0291673132 0.2457478793 0.1912082770 0.7239823553
|
||||
900 -5114.6675469561 -5128.1496933801 13.4821464240 -74.3644898573 -5091.6703861750 -36.1246785145 -0.3546286905 76.7493920516 20.9334403558 20.6744181494 3.3005582394 -0.0141399355 0.0063543986 -0.0561206619 0.2370151923 0.2115707560 0.7822017606
|
||||
1000 -5114.6683146144 -5128.3364609113 13.6681462969 -75.1091579020 -5091.9370210069 -36.0375964349 -0.3618434694 77.8082276935 20.9306643096 20.6737238853 3.2922181699 -0.0411219854 -0.0200694204 -0.0788193565 0.2225175431 0.2377413412 -0.5875288557
|
||||
Loop time of 53.3155 on 4 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 1.621 ns/day, 14.810 hours/ns, 18.756 timesteps/s
|
||||
97.6% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 49.475 | 50.978 | 52.988 | 18.0 | 95.62
|
||||
Bond | 0.00045061 | 0.00066602 | 0.00086665 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.16491 | 2.1759 | 3.679 | 87.0 | 4.08
|
||||
Output | 0.11871 | 0.11882 | 0.11911 | 0.0 | 0.22
|
||||
Modify | 0.012956 | 0.013504 | 0.01387 | 0.3 | 0.03
|
||||
Other | | 0.02828 | | | 0.05
|
||||
|
||||
Nlocal: 340 ave 346 max 336 min
|
||||
Histogram: 1 0 1 0 1 0 0 0 0 1
|
||||
Nghost: 4537.5 ave 4540 max 4534 min
|
||||
Histogram: 1 0 0 0 0 0 2 0 0 1
|
||||
Neighs: 62407 ave 62413 max 62402 min
|
||||
Histogram: 1 0 0 1 1 0 0 0 0 1
|
||||
FullNghs: 63347.5 ave 65585 max 61866 min
|
||||
Histogram: 1 1 0 1 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 253926
|
||||
Ave neighs/atom = 186.71
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:53
|
||||
@ -0,0 +1,127 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
|
||||
read_data Bi_gr_AB_stack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (42.6 41.8117 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000290871 secs
|
||||
read_data CPU = 0.00159073 secs
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
680 atoms in group layer1
|
||||
group layer2 molecule 2
|
||||
680 atoms in group layer2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo ilp/graphene/hbn 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo C C # chemical
|
||||
Reading potential file CH.rebo with DATE: 2018-7-3
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair ilp/graphene/hbn
|
||||
variable REBO equal c_0 # REBO energy
|
||||
variable ILP equal c_1 # total interlayer energy
|
||||
variable Evdw equal c_1[1] # attractive energy
|
||||
variable Erep equal c_1[2] # repulsive energy
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_ILP v_Erep v_Evdw temp
|
||||
thermo_modify lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
fix thermostat all nve
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair rebo, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(2) pair ilp/graphene/hbn, perpetual, copy from (1)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 17.21 | 17.21 | 17.21 Mbytes
|
||||
Step TotEng PotEng KinEng v_REBO v_ILP v_Erep v_Evdw Temp
|
||||
0 -10037.285 -10089.985 52.699361 -10057.189 -32.795185 43.640104 -76.435288 300
|
||||
100 -10037.034 -10064.765 27.73131 -10032.181 -32.58421 34.730868 -67.315078 157.86516
|
||||
200 -10036.963 -10061.144 24.18111 -10028.856 -32.288132 28.179936 -60.468068 137.65505
|
||||
300 -10037.003 -10063.5 26.496726 -10030.823 -32.677105 34.923849 -67.600954 150.83708
|
||||
400 -10037.032 -10064.389 27.356526 -10031.853 -32.535415 44.242347 -76.777762 155.73164
|
||||
500 -10037.023 -10064.114 27.090279 -10031.431 -32.682418 37.229232 -69.91165 154.21598
|
||||
600 -10037.003 -10063.657 26.653718 -10031.327 -32.329664 28.509073 -60.838737 151.73078
|
||||
700 -10037.004 -10063.35 26.345697 -10030.801 -32.549231 32.564686 -65.113917 149.97732
|
||||
800 -10037.025 -10064.219 27.194765 -10031.766 -32.453653 43.381557 -75.83521 154.81078
|
||||
900 -10037.028 -10064.668 27.639127 -10032.167 -32.500121 39.99345 -72.493571 157.34039
|
||||
1000 -10037.003 -10063.662 26.658825 -10031.337 -32.325053 29.573578 -61.898631 151.75986
|
||||
Loop time of 149.887 on 1 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 0.576 ns/day, 41.635 hours/ns, 6.672 timesteps/s
|
||||
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 149.75 | 149.75 | 149.75 | 0.0 | 99.91
|
||||
Bond | 0.00024772 | 0.00024772 | 0.00024772 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.086328 | 0.086328 | 0.086328 | 0.0 | 0.06
|
||||
Output | 0.00036383 | 0.00036383 | 0.00036383 | 0.0 | 0.00
|
||||
Modify | 0.028636 | 0.028636 | 0.028636 | 0.0 | 0.02
|
||||
Other | | 0.01708 | | | 0.01
|
||||
|
||||
Nlocal: 1360 ave 1360 max 1360 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7964 ave 7964 max 7964 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 1.037e+06 ave 1.037e+06 max 1.037e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1037000
|
||||
Ave neighs/atom = 762.5
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:02:30
|
||||
@ -0,0 +1,127 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
|
||||
read_data Bi_gr_AB_stack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (42.6 41.8117 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000157118 secs
|
||||
read_data CPU = 0.00145698 secs
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
680 atoms in group layer1
|
||||
group layer2 molecule 2
|
||||
680 atoms in group layer2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo ilp/graphene/hbn 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo C C # chemical
|
||||
Reading potential file CH.rebo with DATE: 2018-7-3
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair ilp/graphene/hbn
|
||||
variable REBO equal c_0 # REBO energy
|
||||
variable ILP equal c_1 # total interlayer energy
|
||||
variable Evdw equal c_1[1] # attractive energy
|
||||
variable Erep equal c_1[2] # repulsive energy
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_ILP v_Erep v_Evdw temp
|
||||
thermo_modify lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
fix thermostat all nve
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair rebo, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(2) pair ilp/graphene/hbn, perpetual, copy from (1)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 9.879 | 9.879 | 9.879 Mbytes
|
||||
Step TotEng PotEng KinEng v_REBO v_ILP v_Erep v_Evdw Temp
|
||||
0 -10037.285 -10089.985 52.699361 -10057.189 -32.795185 43.640104 -76.435288 300
|
||||
100 -10037.034 -10064.765 27.73131 -10032.181 -32.58421 34.730868 -67.315078 157.86516
|
||||
200 -10036.963 -10061.144 24.18111 -10028.856 -32.288132 28.179936 -60.468068 137.65505
|
||||
300 -10037.003 -10063.5 26.496726 -10030.823 -32.677105 34.923849 -67.600954 150.83708
|
||||
400 -10037.032 -10064.389 27.356526 -10031.853 -32.535415 44.242347 -76.777762 155.73164
|
||||
500 -10037.023 -10064.114 27.090279 -10031.431 -32.682418 37.229232 -69.91165 154.21598
|
||||
600 -10037.003 -10063.657 26.653718 -10031.327 -32.329664 28.509073 -60.838737 151.73078
|
||||
700 -10037.004 -10063.35 26.345697 -10030.801 -32.549231 32.564686 -65.113917 149.97732
|
||||
800 -10037.025 -10064.219 27.194765 -10031.766 -32.453653 43.381557 -75.83521 154.81078
|
||||
900 -10037.028 -10064.668 27.639127 -10032.167 -32.500121 39.99345 -72.493571 157.34039
|
||||
1000 -10037.003 -10063.662 26.658825 -10031.337 -32.325053 29.573578 -61.898631 151.75986
|
||||
Loop time of 44.6551 on 4 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 1.935 ns/day, 12.404 hours/ns, 22.394 timesteps/s
|
||||
93.9% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 40.304 | 41.221 | 41.998 | 9.5 | 92.31
|
||||
Bond | 0.00027633 | 0.00029379 | 0.00031424 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 2.5678 | 3.3334 | 4.2403 | 32.9 | 7.46
|
||||
Output | 0.0051446 | 0.0054518 | 0.0059683 | 0.4 | 0.01
|
||||
Modify | 0.0088317 | 0.009002 | 0.0090654 | 0.1 | 0.02
|
||||
Other | | 0.08586 | | | 0.19
|
||||
|
||||
Nlocal: 340 ave 340 max 340 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 4628 ave 4628 max 4628 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 259250 ave 259250 max 259250 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1037000
|
||||
Ave neighs/atom = 762.5
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:44
|
||||
@ -0,0 +1,142 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AA_prime_stack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (43.38 42.5773 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000375509 secs
|
||||
read_data CPU = 0.00181293 secs
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
680 atoms in group layer1
|
||||
group layer2 molecule 2
|
||||
680 atoms in group layer2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff B N B N # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345 dist gaussian mom yes rot yes
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0 # Tersoff energy
|
||||
variable Ecoul equal c_1 # Coulomb energy
|
||||
variable EILP equal c_2 # total interlayer energy
|
||||
variable Evdw equal c_2[1] # attractive energy
|
||||
variable Erep equal c_2[2] # repulsive energy
|
||||
|
||||
############# Output ###############
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_EILP v_Erep v_Evdw v_Ecoul temp
|
||||
thermo_modify lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
4 neighbor lists, perpetual/occasional/extra = 4 0 0
|
||||
(1) pair tersoff, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) pair coul/shield, perpetual, skip from (4)
|
||||
attributes: half, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) neighbor class addition, perpetual, half/full from (1)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 35.9 | 35.9 | 35.9 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_EILP v_Erep v_Evdw v_Ecoul Temp
|
||||
0 -10193.138 -10245.837 52.699361 -77.557069 -10208.73 -36.776483 40.780586 -77.557069 -0.33075117 300
|
||||
100 -10192.814 -10215.193 22.37957 -80.997619 -10177.878 -36.967736 44.029884 -80.997619 -0.34809915 127.39947
|
||||
200 -10192.922 -10221.807 28.884855 -86.370319 -10184.251 -37.168986 49.201334 -86.370319 -0.38644764 164.43191
|
||||
300 -10192.878 -10219.029 26.151464 -83.063924 -10182.349 -36.30412 46.759804 -83.063924 -0.37660157 148.87162
|
||||
400 -10192.892 -10218.834 25.942229 -78.394242 -10181.398 -37.110968 41.283274 -78.394242 -0.32494569 147.68051
|
||||
500 -10192.909 -10221.331 28.422213 -81.768531 -10184.03 -36.946226 44.822304 -81.768531 -0.35489965 161.79824
|
||||
600 -10192.886 -10219.371 26.48495 -86.278335 -10182.669 -36.29515 49.983185 -86.278335 -0.40636253 150.77004
|
||||
700 -10192.902 -10220.95 28.048108 -82.28873 -10183.208 -37.39374 44.89499 -82.28873 -0.34777958 159.66859
|
||||
800 -10192.88 -10218.51 25.630186 -78.011019 -10181.427 -36.754209 41.256811 -78.011019 -0.32904942 145.90415
|
||||
900 -10192.894 -10220.56 27.665437 -82.474379 -10183.801 -36.381157 46.093222 -82.474379 -0.37703328 157.49017
|
||||
1000 -10192.897 -10219.01 26.11313 -87.125683 -10181.252 -37.361898 49.763785 -87.125683 -0.39607952 148.65339
|
||||
Loop time of 211.527 on 1 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 0.408 ns/day, 58.757 hours/ns, 4.728 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 211.4 | 211.4 | 211.4 | 0.0 | 99.94
|
||||
Bond | 0.00018859 | 0.00018859 | 0.00018859 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.082034 | 0.082034 | 0.082034 | 0.0 | 0.04
|
||||
Output | 0.00037289 | 0.00037289 | 0.00037289 | 0.0 | 0.00
|
||||
Modify | 0.027928 | 0.027928 | 0.027928 | 0.0 | 0.01
|
||||
Other | | 0.0159 | | | 0.01
|
||||
|
||||
Nlocal: 1360 ave 1360 max 1360 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7836 ave 7836 max 7836 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 249560 ave 249560 max 249560 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 1.00504e+06 ave 1.00504e+06 max 1.00504e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1005040
|
||||
Ave neighs/atom = 739
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:03:31
|
||||
@ -0,0 +1,142 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AA_prime_stack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (43.38 42.5773 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000224352 secs
|
||||
read_data CPU = 0.00160909 secs
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
680 atoms in group layer1
|
||||
group layer2 molecule 2
|
||||
680 atoms in group layer2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff B N B N # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345 dist gaussian mom yes rot yes
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0 # Tersoff energy
|
||||
variable Ecoul equal c_1 # Coulomb energy
|
||||
variable EILP equal c_2 # total interlayer energy
|
||||
variable Evdw equal c_2[1] # attractive energy
|
||||
variable Erep equal c_2[2] # repulsive energy
|
||||
|
||||
############# Output ###############
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_EILP v_Erep v_Evdw v_Ecoul temp
|
||||
thermo_modify lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
4 neighbor lists, perpetual/occasional/extra = 4 0 0
|
||||
(1) pair tersoff, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) pair coul/shield, perpetual, skip from (4)
|
||||
attributes: half, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) neighbor class addition, perpetual, half/full from (1)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 18.99 | 18.99 | 18.99 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_EILP v_Erep v_Evdw v_Ecoul Temp
|
||||
0 -10193.138 -10245.837 52.699361 -77.557069 -10208.73 -36.776483 40.780586 -77.557069 -0.33075117 300
|
||||
100 -10192.814 -10215.193 22.37957 -80.997619 -10177.878 -36.967736 44.029884 -80.997619 -0.34809915 127.39947
|
||||
200 -10192.922 -10221.807 28.884855 -86.370319 -10184.251 -37.168986 49.201334 -86.370319 -0.38644764 164.43191
|
||||
300 -10192.878 -10219.029 26.151464 -83.063924 -10182.349 -36.30412 46.759804 -83.063924 -0.37660157 148.87162
|
||||
400 -10192.892 -10218.834 25.942229 -78.394242 -10181.398 -37.110968 41.283274 -78.394242 -0.32494569 147.68051
|
||||
500 -10192.909 -10221.331 28.422213 -81.768531 -10184.03 -36.946226 44.822304 -81.768531 -0.35489965 161.79824
|
||||
600 -10192.886 -10219.371 26.48495 -86.278335 -10182.669 -36.29515 49.983185 -86.278335 -0.40636253 150.77004
|
||||
700 -10192.902 -10220.95 28.048108 -82.28873 -10183.208 -37.39374 44.89499 -82.28873 -0.34777958 159.66859
|
||||
800 -10192.88 -10218.51 25.630186 -78.011019 -10181.427 -36.754209 41.256811 -78.011019 -0.32904942 145.90415
|
||||
900 -10192.894 -10220.56 27.665437 -82.474379 -10183.801 -36.381157 46.093222 -82.474379 -0.37703328 157.49017
|
||||
1000 -10192.897 -10219.01 26.11313 -87.125683 -10181.252 -37.361898 49.763785 -87.125683 -0.39607952 148.65339
|
||||
Loop time of 68.3631 on 4 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 1.264 ns/day, 18.990 hours/ns, 14.628 timesteps/s
|
||||
98.5% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 64.58 | 66.38 | 67.402 | 13.2 | 97.10
|
||||
Bond | 0.0001719 | 0.00021869 | 0.00024033 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.93767 | 1.9601 | 3.76 | 77.0 | 2.87
|
||||
Output | 0.00033593 | 0.00061601 | 0.0014501 | 0.0 | 0.00
|
||||
Modify | 0.0085733 | 0.0089303 | 0.0093236 | 0.4 | 0.01
|
||||
Other | | 0.01285 | | | 0.02
|
||||
|
||||
Nlocal: 340 ave 340 max 340 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 4536 ave 4536 max 4536 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 62390 ave 62390 max 62390 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 251260 ave 251260 max 251260 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1005040
|
||||
Ave neighs/atom = 739
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:01:08
|
||||
153
examples/USER/misc/ilp_graphene_hbn/log.31Jul19.grhBN.g++.1
Normal file
153
examples/USER/misc/ilp_graphene_hbn/log.31Jul19.grhBN.g++.1
Normal file
@ -0,0 +1,153 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data gr_hBN_Cstack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (44.583 42.9 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1440 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000282049 secs
|
||||
read_data CPU = 0.00159025 secs
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | membrane
|
||||
mass 3 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group hBN molecule 1
|
||||
720 atoms in group hBN
|
||||
group gr molecule 2
|
||||
720 atoms in group gr
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo NULL NULL C # chemical
|
||||
Reading potential file CH.rebo with DATE: 2018-7-3
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C # long range
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345 dist gaussian mom yes rot yes
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair tersoff
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
compute 3 all pair coul/shield
|
||||
variable REBO equal c_0
|
||||
variable Tersoff equal c_1
|
||||
variable EILP equal c_2 # total interlayer energy
|
||||
variable Evdw equal c_2[1] # attractive energy
|
||||
variable Erep equal c_2[2] # repulsive energy
|
||||
variable Ecoul equal c_3
|
||||
|
||||
############# Output ##############
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_REBO v_EILP v_Erep v_Evdw v_Ecoul temp
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
6 neighbor lists, perpetual/occasional/extra = 6 0 0
|
||||
(1) pair rebo, perpetual, skip from (3)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: skip/ghost
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair tersoff, perpetual, skip from (5)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(3) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(4) pair coul/shield, perpetual, half/full from (2)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton/skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) neighbor class addition, perpetual, copy from (3)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(6) neighbor class addition, perpetual, half/full from (5)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 22.52 | 22.52 | 22.52 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_REBO v_EILP v_Erep v_Evdw v_Ecoul Temp
|
||||
0 -10707.284 -10763.085 55.801605 -75.247726 -5401.7348 -5322.2781 -39.072409 36.175318 -75.247726 0 300
|
||||
100 -10707.074 -10737.127 30.05353 -73.217322 -5389.9568 -5309.2004 -37.970102 35.24722 -73.217322 0 161.57347
|
||||
200 -10707.016 -10734.932 27.91576 -71.603097 -5389.1294 -5307.7455 -38.056875 33.546222 -71.603097 0 150.08042
|
||||
300 -10707.013 -10734.987 27.973705 -75.082134 -5388.9196 -5308.1165 -37.950947 37.131186 -75.082134 0 150.39194
|
||||
400 -10707.012 -10735.498 28.486171 -76.339871 -5389.1657 -5308.153 -38.179442 38.160429 -76.339871 0 153.14706
|
||||
500 -10707.007 -10734.681 27.674101 -73.312354 -5388.7261 -5307.7384 -38.216944 35.09541 -73.312354 0 148.78121
|
||||
600 -10707.018 -10735.833 28.815132 -71.927763 -5389.0798 -5308.596 -38.157333 33.77043 -71.927763 0 154.91561
|
||||
700 -10707.02 -10735.656 28.635377 -74.679371 -5389.2971 -5308.1866 -38.172002 36.507368 -74.679371 0 153.94921
|
||||
800 -10707.004 -10734.352 27.347425 -76.371288 -5388.5923 -5307.7206 -38.038736 38.332552 -76.371288 0 147.02494
|
||||
900 -10707.014 -10735.832 28.817405 -73.699332 -5388.9674 -5308.7964 -38.068078 35.631254 -73.699332 0 154.92783
|
||||
1000 -10706.995 -10733.562 26.56615 -71.439868 -5388.0186 -5307.4414 -38.101452 33.338415 -71.439868 0 142.82466
|
||||
Loop time of 152.66 on 1 procs for 1000 steps with 1440 atoms
|
||||
|
||||
Performance: 0.566 ns/day, 42.406 hours/ns, 6.550 timesteps/s
|
||||
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 152.52 | 152.52 | 152.52 | 0.0 | 99.91
|
||||
Bond | 0.00023174 | 0.00023174 | 0.00023174 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.087147 | 0.087147 | 0.087147 | 0.0 | 0.06
|
||||
Output | 0.0004189 | 0.0004189 | 0.0004189 | 0.0 | 0.00
|
||||
Modify | 0.029972 | 0.029972 | 0.029972 | 0.0 | 0.02
|
||||
Other | | 0.02057 | | | 0.01
|
||||
|
||||
Nlocal: 1440 ave 1440 max 1440 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 8180 ave 8180 max 8180 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 140400 ave 140400 max 140400 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 280800 ave 280800 max 280800 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 280800
|
||||
Ave neighs/atom = 195
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:02:32
|
||||
153
examples/USER/misc/ilp_graphene_hbn/log.31Jul19.grhBN.g++.4
Normal file
153
examples/USER/misc/ilp_graphene_hbn/log.31Jul19.grhBN.g++.4
Normal file
@ -0,0 +1,153 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data gr_hBN_Cstack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (44.583 42.9 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1440 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.00012207 secs
|
||||
read_data CPU = 0.00357461 secs
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | membrane
|
||||
mass 3 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group hBN molecule 1
|
||||
720 atoms in group hBN
|
||||
group gr molecule 2
|
||||
720 atoms in group gr
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo NULL NULL C # chemical
|
||||
Reading potential file CH.rebo with DATE: 2018-7-3
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C # long range
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345 dist gaussian mom yes rot yes
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair tersoff
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
compute 3 all pair coul/shield
|
||||
variable REBO equal c_0
|
||||
variable Tersoff equal c_1
|
||||
variable EILP equal c_2 # total interlayer energy
|
||||
variable Evdw equal c_2[1] # attractive energy
|
||||
variable Erep equal c_2[2] # repulsive energy
|
||||
variable Ecoul equal c_3
|
||||
|
||||
############# Output ##############
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Evdw v_Tersoff v_REBO v_EILP v_Erep v_Evdw v_Ecoul temp
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
6 neighbor lists, perpetual/occasional/extra = 6 0 0
|
||||
(1) pair rebo, perpetual, skip from (3)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: skip/ghost
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair tersoff, perpetual, skip from (5)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(3) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(4) pair coul/shield, perpetual, half/full from (2)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton/skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) neighbor class addition, perpetual, copy from (3)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(6) neighbor class addition, perpetual, half/full from (5)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 12.45 | 12.45 | 12.45 Mbytes
|
||||
Step TotEng PotEng KinEng v_Evdw v_Tersoff v_REBO v_EILP v_Erep v_Evdw v_Ecoul Temp
|
||||
0 -10707.284 -10763.085 55.801605 -75.247726 -5401.7348 -5322.2781 -39.072409 36.175318 -75.247726 0 300
|
||||
100 -10707.074 -10737.127 30.05353 -73.217322 -5389.9568 -5309.2004 -37.970102 35.24722 -73.217322 0 161.57347
|
||||
200 -10707.016 -10734.932 27.91576 -71.603097 -5389.1294 -5307.7455 -38.056875 33.546222 -71.603097 0 150.08042
|
||||
300 -10707.013 -10734.987 27.973705 -75.082134 -5388.9196 -5308.1165 -37.950947 37.131186 -75.082134 0 150.39194
|
||||
400 -10707.012 -10735.498 28.486171 -76.339871 -5389.1657 -5308.153 -38.179442 38.160429 -76.339871 0 153.14706
|
||||
500 -10707.007 -10734.681 27.674101 -73.312354 -5388.7261 -5307.7384 -38.216944 35.09541 -73.312354 0 148.78121
|
||||
600 -10707.018 -10735.833 28.815132 -71.927763 -5389.0798 -5308.596 -38.157333 33.77043 -71.927763 0 154.91561
|
||||
700 -10707.02 -10735.656 28.635377 -74.679371 -5389.2971 -5308.1866 -38.172002 36.507368 -74.679371 0 153.94921
|
||||
800 -10707.004 -10734.352 27.347425 -76.371288 -5388.5923 -5307.7206 -38.038736 38.332552 -76.371288 0 147.02494
|
||||
900 -10707.014 -10735.832 28.817405 -73.699332 -5388.9674 -5308.7964 -38.068078 35.631254 -73.699332 0 154.92783
|
||||
1000 -10706.995 -10733.562 26.56615 -71.439868 -5388.0186 -5307.4414 -38.101452 33.338415 -71.439868 0 142.82466
|
||||
Loop time of 54.095 on 4 procs for 1000 steps with 1440 atoms
|
||||
|
||||
Performance: 1.597 ns/day, 15.026 hours/ns, 18.486 timesteps/s
|
||||
84.8% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 42.138 | 45.531 | 49.106 | 42.0 | 84.17
|
||||
Bond | 0.0003159 | 0.00037384 | 0.000489 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 4.71 | 8.2803 | 11.682 | 98.3 | 15.31
|
||||
Output | 0.0021999 | 0.0055975 | 0.013382 | 6.0 | 0.01
|
||||
Modify | 0.0092845 | 0.010981 | 0.012538 | 1.3 | 0.02
|
||||
Other | | 0.2673 | | | 0.49
|
||||
|
||||
Nlocal: 360 ave 380 max 340 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Nghost: 4716 ave 4736 max 4696 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Neighs: 35100 ave 37050 max 33150 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
FullNghs: 70200 ave 74100 max 66300 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
|
||||
Total # of neighbors = 280800
|
||||
Ave neighs/atom = 195
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:54
|
||||
@ -0,0 +1,154 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AB_stack_2L_noH_equi_300K.data
|
||||
orthogonal box = (0 0 0) to (43.38 42.5773 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
reading velocities ...
|
||||
1360 velocities
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000251532 secs
|
||||
read_data CPU = 0.00451231 secs
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
680 atoms in group membrane
|
||||
group adsorbate type 3 4
|
||||
680 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff NULL NULL B N # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0
|
||||
variable Ecoul equal c_1
|
||||
variable ILP equal c_2
|
||||
variable Evdw equal c_2[1]
|
||||
variable Erep equal c_2[2]
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Tersoff v_ILP v_Ecoul v_Erep v_Evdw temp
|
||||
thermo_modify lost warn #ignore
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
5 neighbor lists, perpetual/occasional/extra = 5 0 0
|
||||
(1) pair tersoff, perpetual, skip from (4)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) pair coul/shield, perpetual, skip from (5)
|
||||
attributes: half, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) neighbor class addition, perpetual, copy from (2)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) neighbor class addition, perpetual, half/full from (4)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 54.59 | 54.59 | 54.59 Mbytes
|
||||
Step TotEng PotEng KinEng v_Tersoff v_ILP v_Ecoul v_Erep v_Evdw Temp
|
||||
0 -5114.6628 -5127.8586 13.195828 -5091.4121 -36.083114 -0.36343598 38.918674 -75.001787 75.119474
|
||||
100 -5114.6621 -5127.6958 13.033777 -5091.2408 -36.09276 -0.36228286 38.769906 -74.862666 74.196973
|
||||
200 -5114.6631 -5127.5945 12.93145 -5091.1508 -36.086669 -0.35708801 38.20076 -74.287429 73.614462
|
||||
300 -5114.6694 -5128.3286 13.65924 -5091.8646 -36.110786 -0.35328159 37.758284 -73.86907 77.757528
|
||||
400 -5114.6614 -5127.6424 12.980975 -5091.2348 -36.049634 -0.35794328 38.247252 -74.296886 73.896389
|
||||
500 -5114.66 -5127.4098 12.749794 -5090.9285 -36.119571 -0.36174976 38.745548 -74.865119 72.580351
|
||||
600 -5114.6673 -5128.0913 13.424021 -5091.6339 -36.09384 -0.36356991 38.927401 -75.021241 76.418503
|
||||
700 -5114.661 -5127.7467 13.085707 -5091.2811 -36.106639 -0.35892399 38.332616 -74.439255 74.492596
|
||||
800 -5114.6623 -5128.013 13.350778 -5091.5694 -36.089718 -0.35392503 37.851602 -73.94132 76.001554
|
||||
900 -5114.6675 -5128.1497 13.482146 -5091.6704 -36.124679 -0.35462869 37.885183 -74.009861 76.749392
|
||||
1000 -5114.6683 -5128.3365 13.668146 -5091.937 -36.037596 -0.36184347 38.709718 -74.747314 77.808228
|
||||
Loop time of 207.028 on 1 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 0.417 ns/day, 57.508 hours/ns, 4.830 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 206.9 | 206.9 | 206.9 | 0.0 | 99.94
|
||||
Bond | 0.00019169 | 0.00019169 | 0.00019169 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.081397 | 0.081397 | 0.081397 | 0.0 | 0.04
|
||||
Output | 0.00036597 | 0.00036597 | 0.00036597 | 0.0 | 0.00
|
||||
Modify | 0.033408 | 0.033408 | 0.033408 | 0.0 | 0.02
|
||||
Other | | 0.01615 | | | 0.01
|
||||
|
||||
Nlocal: 1360 ave 1360 max 1360 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7840 ave 7840 max 7840 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 249628 ave 249628 max 249628 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 253390 ave 253390 max 253390 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 253390
|
||||
Ave neighs/atom = 186.316
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:03:27
|
||||
@ -0,0 +1,154 @@
|
||||
LAMMPS (31 Jul 2019)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data hBN_AB_stack_2L_noH_equi_300K.data
|
||||
orthogonal box = (0 0 0) to (43.38 42.5773 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
reading velocities ...
|
||||
1360 velocities
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000332117 secs
|
||||
read_data CPU = 0.00270581 secs
|
||||
mass 1 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 2 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
mass 3 10.8110 # boron mass (g/mole) | membrane
|
||||
mass 4 14.0067 # nitrogen mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1 2
|
||||
680 atoms in group membrane
|
||||
group adsorbate type 3 4
|
||||
680 atoms in group adsorbate
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * tersoff BNC.tersoff NULL NULL B N # chemical
|
||||
Reading potential file BNC.tersoff with DATE: 2013-03-21
|
||||
pair_coeff * * ilp/graphene/hbn BNCH-old.ILP B N B N # long range
|
||||
pair_coeff 1 3 coul/shield 0.70
|
||||
pair_coeff 1 4 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 3 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 4 coul/shield 0.69
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
#velocity adsorbate create 300.0 12345
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
|
||||
compute 0 all pair tersoff
|
||||
compute 1 all pair coul/shield ecoul
|
||||
compute 2 all pair ilp/graphene/hbn
|
||||
variable Tersoff equal c_0
|
||||
variable Ecoul equal c_1
|
||||
variable ILP equal c_2
|
||||
variable Evdw equal c_2[1]
|
||||
variable Erep equal c_2[2]
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_Tersoff v_ILP v_Ecoul v_Erep v_Evdw temp
|
||||
thermo_modify lost warn #ignore
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
5 neighbor lists, perpetual/occasional/extra = 5 0 0
|
||||
(1) pair tersoff, perpetual, skip from (4)
|
||||
attributes: full, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(2) pair ilp/graphene/hbn, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) pair coul/shield, perpetual, skip from (5)
|
||||
attributes: half, newton on
|
||||
pair build: skip
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) neighbor class addition, perpetual, copy from (2)
|
||||
attributes: full, newton on
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) neighbor class addition, perpetual, half/full from (4)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 28.9 | 28.9 | 28.9 Mbytes
|
||||
Step TotEng PotEng KinEng v_Tersoff v_ILP v_Ecoul v_Erep v_Evdw Temp
|
||||
0 -5114.6628 -5127.8586 13.195828 -5091.4121 -36.083114 -0.36343598 38.918674 -75.001787 75.119474
|
||||
100 -5114.6621 -5127.6958 13.033777 -5091.2408 -36.09276 -0.36228286 38.769906 -74.862666 74.196973
|
||||
200 -5114.6631 -5127.5945 12.93145 -5091.1508 -36.086669 -0.35708801 38.20076 -74.287429 73.614462
|
||||
300 -5114.6694 -5128.3286 13.65924 -5091.8646 -36.110786 -0.35328159 37.758284 -73.86907 77.757528
|
||||
400 -5114.6614 -5127.6424 12.980975 -5091.2348 -36.049634 -0.35794328 38.247252 -74.296886 73.896389
|
||||
500 -5114.66 -5127.4098 12.749794 -5090.9285 -36.119571 -0.36174976 38.745548 -74.865119 72.580351
|
||||
600 -5114.6673 -5128.0913 13.424021 -5091.6339 -36.09384 -0.36356991 38.927401 -75.021241 76.418503
|
||||
700 -5114.661 -5127.7467 13.085707 -5091.2811 -36.106639 -0.35892399 38.332616 -74.439255 74.492596
|
||||
800 -5114.6623 -5128.013 13.350778 -5091.5694 -36.089718 -0.35392503 37.851602 -73.94132 76.001554
|
||||
900 -5114.6675 -5128.1497 13.482146 -5091.6704 -36.124679 -0.35462869 37.885183 -74.009861 76.749392
|
||||
1000 -5114.6683 -5128.3365 13.668146 -5091.937 -36.037596 -0.36184347 38.709718 -74.747314 77.808228
|
||||
Loop time of 65.9005 on 4 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 1.311 ns/day, 18.306 hours/ns, 15.174 timesteps/s
|
||||
98.9% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 63.244 | 64.208 | 65.281 | 10.1 | 97.43
|
||||
Bond | 0.00013971 | 0.00017679 | 0.00022101 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.58237 | 1.6612 | 2.6292 | 63.1 | 2.52
|
||||
Output | 0.0003171 | 0.00062358 | 0.0015192 | 0.0 | 0.00
|
||||
Modify | 0.010251 | 0.010509 | 0.01075 | 0.2 | 0.02
|
||||
Other | | 0.02025 | | | 0.03
|
||||
|
||||
Nlocal: 340 ave 346 max 336 min
|
||||
Histogram: 1 0 1 0 1 0 0 0 0 1
|
||||
Nghost: 4537.5 ave 4540 max 4534 min
|
||||
Histogram: 1 0 0 0 0 0 2 0 0 1
|
||||
Neighs: 62407 ave 62413 max 62402 min
|
||||
Histogram: 1 0 0 1 1 0 0 0 0 1
|
||||
FullNghs: 63347.5 ave 65585 max 61866 min
|
||||
Histogram: 1 1 0 1 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 253926
|
||||
Ave neighs/atom = 186.71
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:01:06
|
||||
1372
examples/USER/misc/kolmogorov_crespi_full/Bi_gr_AB_stack_2L_noH.data
Normal file
1372
examples/USER/misc/kolmogorov_crespi_full/Bi_gr_AB_stack_2L_noH.data
Normal file
File diff suppressed because it is too large
Load Diff
1
examples/USER/misc/kolmogorov_crespi_full/CH.KC
Symbolic link
1
examples/USER/misc/kolmogorov_crespi_full/CH.KC
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../potentials/CH.KC
|
||||
1
examples/USER/misc/kolmogorov_crespi_full/CH_taper.KC
Symbolic link
1
examples/USER/misc/kolmogorov_crespi_full/CH_taper.KC
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../potentials/CH_taper.KC
|
||||
@ -5,21 +5,22 @@ atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
# read lammps data file
|
||||
read_data Bi_gr_AB_stack_2L_noH_300K.data
|
||||
|
||||
read_data Bi_gr_AB_stack_2L_noH.data
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
group adsorbate type 2
|
||||
group layer1 molecule 1
|
||||
group layer2 molecule 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/full 16.0
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/full 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo NULL C # chemical
|
||||
pair_coeff * * kolmogorov/crespi/full CC.KC-full C C # long range
|
||||
pair_coeff * * rebo CH.rebo C C # chemical
|
||||
pair_coeff * * kolmogorov/crespi/full CH_taper.KC C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
@ -27,34 +28,25 @@ neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
# calculate the COM
|
||||
variable adsxcom equal xcm(adsorbate,x)
|
||||
variable adsycom equal xcm(adsorbate,y)
|
||||
variable adszcom equal xcm(adsorbate,z)
|
||||
variable adsvxcom equal vcm(adsorbate,x)
|
||||
variable adsvycom equal vcm(adsorbate,y)
|
||||
variable adsvzcom equal vcm(adsorbate,z)
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
fix subf membrane setforce 0.0 0.0 0.0
|
||||
fix thermostat all nve
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair kolmogorov/crespi/full
|
||||
variable REBO equal c_0
|
||||
variable KC equal c_1
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair kolmogorov/crespi/full
|
||||
variable REBO equal c_0 # REBO energy
|
||||
variable KC equal c_1 # total interlayer energy
|
||||
variable Evdw equal c_1[1] # attractive energy
|
||||
variable Erep equal c_1[2] # repulsive energy
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step etotal pe ke v_REBO v_KC temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
|
||||
thermo_modify line one format float %.10f
|
||||
thermo_modify flush yes norm no lost warn #ignore
|
||||
|
||||
#dump 1 all custom 1000 traj.lammpstrj id mol type xu yu zu
|
||||
#dump_modify 1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes
|
||||
thermo_style custom step cpu etotal pe ke v_REBO v_KC v_Erep v_Evdw temp
|
||||
thermo_modify line one format float %.16f
|
||||
thermo_modify flush yes norm no lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
fix thermostat all nve
|
||||
run 1000
|
||||
|
||||
@ -0,0 +1,129 @@
|
||||
LAMMPS (5 Jun 2019)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:88)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
|
||||
read_data Bi_gr_AB_stack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (42.6 41.8117 100)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000143357 secs
|
||||
read_data CPU = 0.00128686 secs
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
680 atoms in group layer1
|
||||
group layer2 molecule 2
|
||||
680 atoms in group layer2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/full 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo C C # chemical
|
||||
Reading potential file CH.rebo with DATE: 2018-7-3
|
||||
pair_coeff * * kolmogorov/crespi/full CH_taper.KC C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair kolmogorov/crespi/full
|
||||
variable REBO equal c_0 # REBO energy
|
||||
variable KC equal c_1 # total interlayer energy
|
||||
variable Evdw equal c_1[1] # attractive energy
|
||||
variable Erep equal c_1[2] # repulsive energy
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step cpu etotal pe ke v_REBO v_KC v_Erep v_Evdw temp
|
||||
thermo_modify line one format float %.16f
|
||||
thermo_modify flush yes norm no lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
fix thermostat all nve
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair rebo, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(2) pair kolmogorov/crespi/full, perpetual, copy from (1)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 17.21 | 17.21 | 17.21 Mbytes
|
||||
Step CPU TotEng PotEng KinEng v_REBO v_KC v_Erep v_Evdw Temp
|
||||
0 0.0000000000000000 -10037.7640583248121402 -10090.4634194413119985 52.6993611164999436 -10057.1894932863488066 -33.2739261549639664 35.9559834316876348 -69.2299095866357561 299.9999999999996589
|
||||
100 5.3877589240437374 -10037.5122858156355505 -10065.4637593850693520 27.9514735694345475 -10032.2132655062632693 -33.2504938788055995 25.2100699045900747 -58.4605637833913789 159.1184768311149185
|
||||
200 10.7755050340201706 -10037.4414086674350983 -10061.6271012692632212 24.1856926018286202 -10028.9093252939674130 -32.7177759752951403 18.5366534598604176 -51.2544294351563394 137.6811336385792970
|
||||
300 16.1665089030284435 -10037.4824653300311184 -10064.2845326005663082 26.8020672705344225 -10030.9195389405322203 -33.3649936600345924 26.3639208740001152 -59.7289145340284122 152.5752876469470891
|
||||
400 21.5454839280573651 -10037.5105626329259394 -10064.8769084956420556 27.3663458627154164 -10031.8478821022799821 -33.0290263933626349 36.6142885774199272 -69.6433149707719963 155.7875386888538571
|
||||
500 26.9370588400634006 -10037.5010433785082569 -10064.8363209936451312 27.3352776151367571 -10031.4417172103931080 -33.3946037832518243 26.2980262321670750 -59.6926300154142595 155.6106774503846850
|
||||
600 32.4204196080099791 -10037.4817772372425679 -10064.1925798287738871 26.7108025915316247 -10031.4376178099264507 -32.7549620188478201 18.5745873777024606 -51.3295493965519327 152.0557480714992380
|
||||
700 37.8001567909959704 -10037.4834430268438155 -10064.1291975032218033 26.6457544763788299 -10030.8722888097800023 -33.2569086934421492 25.2322818106646771 -58.4891905041015008 151.6854507067418467
|
||||
800 43.1622281169984490 -10037.5047888097760733 -10064.8671187128948077 27.3623299031188978 -10031.9815058608437539 -32.8856128520517217 36.5236695083771536 -69.4092823604148350 155.7646771616279011
|
||||
900 48.5261204120470211 -10037.5068323940176924 -10065.3998155271074211 27.8929831330889542 -10032.1734374829957233 -33.2263780441125931 27.7314849391008309 -60.9578629832065317 158.7855101588076820
|
||||
1000 53.8888844919856638 -10037.4811494880468672 -10064.0099109142265661 26.5287614261789670 -10031.3325267421259923 -32.6773841721003464 18.9005970229871600 -51.5779811950879434 151.0194480396057202
|
||||
Loop time of 53.8889 on 1 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 1.603 ns/day, 14.969 hours/ns, 18.557 timesteps/s
|
||||
100.0% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 53.836 | 53.836 | 53.836 | 0.0 | 99.90
|
||||
Bond | 0.00043479 | 0.00043479 | 0.00043479 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.032452 | 0.032452 | 0.032452 | 0.0 | 0.06
|
||||
Output | 0.00058326 | 0.00058326 | 0.00058326 | 0.0 | 0.00
|
||||
Modify | 0.0094135 | 0.0094135 | 0.0094135 | 0.0 | 0.02
|
||||
Other | | 0.009815 | | | 0.02
|
||||
|
||||
Nlocal: 1360 ave 1360 max 1360 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7964 ave 7964 max 7964 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 1.037e+06 ave 1.037e+06 max 1.037e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1037000
|
||||
Ave neighs/atom = 762.5
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:54
|
||||
@ -0,0 +1,129 @@
|
||||
LAMMPS (5 Jun 2019)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:88)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style full
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use different molecule ids for each layer of hBN
|
||||
# so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
|
||||
read_data Bi_gr_AB_stack_2L_noH.data
|
||||
orthogonal box = (0 0 0) to (42.6 41.8117 100)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
1360 atoms
|
||||
0 = max # of 1-2 neighbors
|
||||
0 = max # of 1-3 neighbors
|
||||
0 = max # of 1-4 neighbors
|
||||
1 = max # of special neighbors
|
||||
special bonds CPU = 0.000245051 secs
|
||||
read_data CPU = 0.00257704 secs
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Separate atom groups
|
||||
group layer1 molecule 1
|
||||
680 atoms in group layer1
|
||||
group layer2 molecule 2
|
||||
680 atoms in group layer2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/full 16.0 1
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.rebo C C # chemical
|
||||
Reading potential file CH.rebo with DATE: 2018-7-3
|
||||
pair_coeff * * kolmogorov/crespi/full CH_taper.KC C C # long range
|
||||
####################################################################
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.001
|
||||
velocity all create 300.0 12345
|
||||
|
||||
compute 0 all pair rebo
|
||||
compute 1 all pair kolmogorov/crespi/full
|
||||
variable REBO equal c_0 # REBO energy
|
||||
variable KC equal c_1 # total interlayer energy
|
||||
variable Evdw equal c_1[1] # attractive energy
|
||||
variable Erep equal c_1[2] # repulsive energy
|
||||
|
||||
############################
|
||||
|
||||
# Output
|
||||
thermo 100
|
||||
thermo_style custom step cpu etotal pe ke v_REBO v_KC v_Erep v_Evdw temp
|
||||
thermo_modify line one format float %.16f
|
||||
thermo_modify flush yes norm no lost warn
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
fix thermostat all nve
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 18
|
||||
ghost atom cutoff = 18
|
||||
binsize = 9, bins = 5 5 12
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair rebo, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(2) pair kolmogorov/crespi/full, perpetual, copy from (1)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 9.878 | 9.878 | 9.878 Mbytes
|
||||
Step CPU TotEng PotEng KinEng v_REBO v_KC v_Erep v_Evdw Temp
|
||||
0 0.0000000000000000 -10037.7640583250176860 -10090.4634194415175443 52.6993611164999933 -10057.1894932866325689 -33.2739261548851388 35.9559834317043467 -69.2299095866038954 299.9999999999999432
|
||||
100 1.5180600649910048 -10037.5122858156355505 -10065.4637593850711710 27.9514735694348637 -10032.2132655062741833 -33.2504938787968172 25.2100699046001573 -58.4605637833912795 159.1184768311167090
|
||||
200 3.0089348420733586 -10037.4414086674296414 -10061.6271012692577642 24.1856926018279914 -10028.9093252939601371 -32.7177759752976272 18.5366534598677504 -51.2544294351567515 137.6811336385757158
|
||||
300 4.5315427089808509 -10037.4824653300020145 -10064.2845326005372044 26.8020672705348311 -10030.9195389405158494 -33.3649936600211205 26.3639208740115549 -59.7289145340278722 152.5752876469494197
|
||||
400 6.0353655620710924 -10037.5105626329095685 -10064.8769084956238657 27.3663458627148124 -10031.8478821022818011 -33.0290263933414394 36.6142885774347562 -69.6433149707726074 155.7875386888504181
|
||||
500 7.5396006110822782 -10037.5010433784900670 -10064.8363209936269413 27.3352776151361780 -10031.4417172103858320 -33.3946037832416351 26.2980262321774489 -59.6926300154146787 155.6106774503813881
|
||||
600 9.2617433650884777 -10037.4817772372534819 -10064.1925798287848011 26.7108025915320830 -10031.4376178099319077 -32.7549620188514226 18.5745873777100208 -51.3295493965524017 152.0557480715018528
|
||||
700 10.7484918619738892 -10037.4834430268347205 -10064.1291975032127084 26.6457544763787268 -10030.8722888097836403 -33.2569086934306739 25.2322818106757047 -58.4891905041008613 151.6854507067412499
|
||||
800 12.2509897360578179 -10037.5047888097869873 -10064.8671187129039026 27.3623299031166667 -10031.9815058608728577 -32.8856128520297801 36.5236695083899718 -69.4092823604150908 155.7646771616151966
|
||||
900 13.7584852169966325 -10037.5068323939758557 -10065.3998155270637653 27.8929831330881477 -10032.1734374829648004 -33.2263780440982259 27.7314849391120788 -60.9578629832060841 158.7855101588031062
|
||||
1000 15.2755981830414385 -10037.4811494880432292 -10064.0099109142211091 26.5287614261777058 -10031.3325267421205353 -32.6773841721017888 18.9005970229946634 -51.5779811950868776 151.0194480395985295
|
||||
Loop time of 15.2757 on 4 procs for 1000 steps with 1360 atoms
|
||||
|
||||
Performance: 5.656 ns/day, 4.243 hours/ns, 65.464 timesteps/s
|
||||
99.9% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 13.985 | 14.446 | 14.823 | 7.9 | 94.57
|
||||
Bond | 0.00040979 | 0.00042456 | 0.00046059 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.43692 | 0.81428 | 1.2749 | 33.2 | 5.33
|
||||
Output | 0.00028016 | 0.00037143 | 0.00063561 | 0.0 | 0.00
|
||||
Modify | 0.0045586 | 0.0046468 | 0.0047903 | 0.1 | 0.03
|
||||
Other | | 0.01041 | | | 0.07
|
||||
|
||||
Nlocal: 340 ave 340 max 340 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 4628 ave 4628 max 4628 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 259250 ave 259250 max 259250 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1037000
|
||||
Ave neighs/atom = 762.5
|
||||
Ave special neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:15
|
||||
@ -34,6 +34,7 @@ COLVARS_SRCS = \
|
||||
colvarcomp_coordnums.cpp \
|
||||
colvarcomp.cpp \
|
||||
colvarcomp_distances.cpp \
|
||||
colvarcomp_gpath.cpp \
|
||||
colvarcomp_protein.cpp \
|
||||
colvarcomp_rotations.cpp \
|
||||
colvar.cpp \
|
||||
|
||||
@ -791,6 +791,11 @@ int colvar::init_components(std::string const &conf)
|
||||
"inertia", "inertia");
|
||||
error_code |= init_components_type<inertia_z>(conf, "moment of inertia around an axis", "inertiaZ");
|
||||
error_code |= init_components_type<eigenvector>(conf, "eigenvector", "eigenvector");
|
||||
error_code |= init_components_type<gspath>(conf, "geometrical path collective variables (s)", "gspath");
|
||||
error_code |= init_components_type<gzpath>(conf, "geometrical path collective variables (z)", "gzpath");
|
||||
error_code |= init_components_type<linearCombination>(conf, "linear combination of other collective variables", "subColvar");
|
||||
error_code |= init_components_type<gspathCV>(conf, "geometrical path collective variables (s) for other CVs", "gspathCV");
|
||||
error_code |= init_components_type<gzpathCV>(conf, "geometrical path collective variables (z) for other CVs", "gzpathCV");
|
||||
|
||||
if (!cvcs.size() || (error_code != COLVARS_OK)) {
|
||||
cvm::error("Error: no valid components were provided "
|
||||
@ -1495,6 +1500,8 @@ int colvar::calc_colvar_properties()
|
||||
// calculate the velocity by finite differences
|
||||
if (cvm::step_relative() == 0) {
|
||||
x_old = x;
|
||||
v_fdiff.reset(); // Do not pretend we know anything about the actual velocity
|
||||
// eg. upon restarting. That would require saving v_fdiff or x_old to the state file
|
||||
} else {
|
||||
v_fdiff = fdiff_velocity(x_old, x);
|
||||
v_reported = v_fdiff;
|
||||
@ -1516,8 +1523,9 @@ int colvar::calc_colvar_properties()
|
||||
x_ext = prev_x_ext;
|
||||
v_ext = prev_v_ext;
|
||||
}
|
||||
|
||||
// report the restraint center as "value"
|
||||
// These position and velocities come from integration at the _previous timestep_ in update_forces_energy()
|
||||
// But we report values at the beginning of the timestep (value at t=0 on the first timestep)
|
||||
x_reported = x_ext;
|
||||
v_reported = v_ext;
|
||||
// the "total force" with the extended Lagrangian is
|
||||
@ -1651,8 +1659,6 @@ cvm::real colvar::update_forces_energy()
|
||||
// is equal to the actual coordinate
|
||||
x_ext = x;
|
||||
}
|
||||
// Report extended value
|
||||
x_reported = x_ext;
|
||||
}
|
||||
|
||||
// Now adding the force on the actual colvar (for those biases that
|
||||
@ -1975,9 +1981,8 @@ std::istream & colvar::read_restart(std::istream &is)
|
||||
}
|
||||
|
||||
if (is_enabled(f_cv_extended_Lagrangian)) {
|
||||
|
||||
if ( !(get_keyval(conf, "extended_x", x_ext,
|
||||
colvarvalue(x.type()), colvarparse::parse_silent)) &&
|
||||
colvarvalue(x.type()), colvarparse::parse_silent)) ||
|
||||
!(get_keyval(conf, "extended_v", v_ext,
|
||||
colvarvalue(x.type()), colvarparse::parse_silent)) ) {
|
||||
cvm::log("Error: restart file does not contain "
|
||||
@ -2079,11 +2084,11 @@ std::ostream & colvar::write_restart(std::ostream &os) {
|
||||
os << " extended_x "
|
||||
<< std::setprecision(cvm::cv_prec)
|
||||
<< std::setw(cvm::cv_width)
|
||||
<< x_ext << "\n"
|
||||
<< x_reported << "\n"
|
||||
<< " extended_v "
|
||||
<< std::setprecision(cvm::cv_prec)
|
||||
<< std::setw(cvm::cv_width)
|
||||
<< v_ext << "\n";
|
||||
<< v_reported << "\n";
|
||||
}
|
||||
|
||||
os << "}\n\n";
|
||||
@ -2150,7 +2155,6 @@ std::ostream & colvar::write_traj_label(std::ostream & os)
|
||||
std::ostream & colvar::write_traj(std::ostream &os)
|
||||
{
|
||||
os << " ";
|
||||
|
||||
if (is_enabled(f_cv_output_value)) {
|
||||
|
||||
if (is_enabled(f_cv_extended_Lagrangian)) {
|
||||
|
||||
@ -569,6 +569,14 @@ public:
|
||||
class alpha_dihedrals;
|
||||
class alpha_angles;
|
||||
class dihedPC;
|
||||
class componentDisabled;
|
||||
class CartesianBasedPath;
|
||||
class gspath;
|
||||
class gzpath;
|
||||
class linearCombination;
|
||||
class CVBasedPath;
|
||||
class gspathCV;
|
||||
class gzpathCV;
|
||||
|
||||
// non-scalar components
|
||||
class distance_vec;
|
||||
|
||||
270
lib/colvars/colvar_geometricpath.h
Normal file
270
lib/colvars/colvar_geometricpath.h
Normal file
@ -0,0 +1,270 @@
|
||||
#ifndef GEOMETRICPATHCV_H
|
||||
#define GEOMETRICPATHCV_H
|
||||
// This file is part of the Collective Variables module (Colvars).
|
||||
// The original version of Colvars and its updates are located at:
|
||||
// https://github.com/colvars/colvars
|
||||
// Please update all Colvars source files before making any changes.
|
||||
// If you wish to distribute your changes, please submit them to the
|
||||
// Colvars repository at GitHub.
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace GeometricPathCV {
|
||||
|
||||
enum path_sz {S, Z};
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
class GeometricPathBase {
|
||||
private:
|
||||
struct doCompareFrameDistance {
|
||||
doCompareFrameDistance(const GeometricPathBase& obj): m_obj(obj) {}
|
||||
const GeometricPathBase& m_obj;
|
||||
bool operator()(const size_t& i1, const size_t& i2) {
|
||||
return m_obj.frame_distances[i1] < m_obj.frame_distances[i2];
|
||||
}
|
||||
};
|
||||
protected:
|
||||
scalar_type v1v1;
|
||||
scalar_type v2v2;
|
||||
scalar_type v3v3;
|
||||
scalar_type v4v4;
|
||||
scalar_type v1v3;
|
||||
scalar_type v1v4;
|
||||
scalar_type f;
|
||||
scalar_type dx;
|
||||
scalar_type s;
|
||||
scalar_type z;
|
||||
scalar_type zz;
|
||||
std::vector<element_type> v1;
|
||||
std::vector<element_type> v2;
|
||||
std::vector<element_type> v3;
|
||||
std::vector<element_type> v4;
|
||||
std::vector<element_type> dfdv1;
|
||||
std::vector<element_type> dfdv2;
|
||||
std::vector<element_type> dzdv1;
|
||||
std::vector<element_type> dzdv2;
|
||||
std::vector<scalar_type> frame_distances;
|
||||
std::vector<size_t> frame_index;
|
||||
bool use_second_closest_frame;
|
||||
bool use_third_closest_frame;
|
||||
bool use_z_square;
|
||||
long min_frame_index_1;
|
||||
long min_frame_index_2;
|
||||
long min_frame_index_3;
|
||||
long sign;
|
||||
double M;
|
||||
double m;
|
||||
public:
|
||||
GeometricPathBase(size_t vector_size, const element_type& element = element_type(), size_t total_frames = 1, bool p_use_second_closest_frame = true, bool p_use_third_closest_frame = false, bool p_use_z_square = false);
|
||||
GeometricPathBase(size_t vector_size, const std::vector<element_type>& elements, size_t total_frames = 1, bool p_use_second_closest_frame = true, bool p_use_third_closest_frame = false, bool p_use_z_square = false);
|
||||
GeometricPathBase() {}
|
||||
virtual ~GeometricPathBase() {}
|
||||
virtual void initialize(size_t vector_size, const element_type& element = element_type(), size_t total_frames = 1, bool p_use_second_closest_frame = true, bool p_use_third_closest_frame = false, bool p_use_z_square = false);
|
||||
virtual void initialize(size_t vector_size, const std::vector<element_type>& elements, size_t total_frames = 1, bool p_use_second_closest_frame = true, bool p_use_third_closest_frame = false, bool p_use_z_square = false);
|
||||
virtual void prepareVectors();
|
||||
virtual void updateReferenceDistances();
|
||||
virtual void compute();
|
||||
virtual void determineClosestFrames();
|
||||
virtual void computeValue();
|
||||
virtual void computeDerivatives();
|
||||
};
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
GeometricPathBase<element_type, scalar_type, path_type>::GeometricPathBase(size_t vector_size, const element_type& element, size_t total_frames, bool p_use_second_closest_frame, bool p_use_third_closest_frame, bool p_use_z_square) {
|
||||
initialize(vector_size, element, total_frames, p_use_second_closest_frame, p_use_third_closest_frame, p_use_z_square);
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
GeometricPathBase<element_type, scalar_type, path_type>::GeometricPathBase(size_t vector_size, const std::vector<element_type>& elements, size_t total_frames, bool p_use_second_closest_frame, bool p_use_third_closest_frame, bool p_use_z_square) {
|
||||
initialize(vector_size, elements, total_frames, p_use_second_closest_frame, p_use_third_closest_frame, p_use_z_square);
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::initialize(size_t vector_size, const element_type& element, size_t total_frames, bool p_use_second_closest_frame, bool p_use_third_closest_frame, bool p_use_z_square) {
|
||||
v1v1 = scalar_type();
|
||||
v2v2 = scalar_type();
|
||||
v3v3 = scalar_type();
|
||||
v4v4 = scalar_type();
|
||||
v1v3 = scalar_type();
|
||||
v1v4 = scalar_type();
|
||||
f = scalar_type();
|
||||
dx = scalar_type();
|
||||
z = scalar_type();
|
||||
zz = scalar_type();
|
||||
sign = 0;
|
||||
v1.resize(vector_size, element);
|
||||
v2.resize(vector_size, element);
|
||||
v3.resize(vector_size, element);
|
||||
v4.resize(vector_size, element);
|
||||
dfdv1.resize(vector_size, element);
|
||||
dfdv2.resize(vector_size, element);
|
||||
dzdv1.resize(vector_size, element);
|
||||
dzdv2.resize(vector_size, element);
|
||||
frame_distances.resize(total_frames);
|
||||
frame_index.resize(total_frames);
|
||||
for (size_t i_frame = 0; i_frame < frame_index.size(); ++i_frame) {
|
||||
frame_index[i_frame] = i_frame;
|
||||
}
|
||||
use_second_closest_frame = p_use_second_closest_frame;
|
||||
use_third_closest_frame = p_use_third_closest_frame;
|
||||
use_z_square = p_use_z_square;
|
||||
M = static_cast<scalar_type>(total_frames - 1);
|
||||
m = static_cast<scalar_type>(1.0);
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::initialize(size_t vector_size, const std::vector<element_type>& elements, size_t total_frames, bool p_use_second_closest_frame, bool p_use_third_closest_frame, bool p_use_z_square) {
|
||||
v1v1 = scalar_type();
|
||||
v2v2 = scalar_type();
|
||||
v3v3 = scalar_type();
|
||||
v4v4 = scalar_type();
|
||||
v1v3 = scalar_type();
|
||||
v1v4 = scalar_type();
|
||||
f = scalar_type();
|
||||
dx = scalar_type();
|
||||
z = scalar_type();
|
||||
zz = scalar_type();
|
||||
sign = 0;
|
||||
v1 = elements;
|
||||
v2 = elements;
|
||||
v3 = elements;
|
||||
v4 = elements;
|
||||
dfdv1 = elements;
|
||||
dfdv2 = elements;
|
||||
dzdv1 = elements;
|
||||
dzdv2 = elements;
|
||||
frame_distances.resize(total_frames);
|
||||
frame_index.resize(total_frames);
|
||||
for (size_t i_frame = 0; i_frame < frame_index.size(); ++i_frame) {
|
||||
frame_index[i_frame] = i_frame;
|
||||
}
|
||||
use_second_closest_frame = p_use_second_closest_frame;
|
||||
use_third_closest_frame = p_use_third_closest_frame;
|
||||
use_z_square = p_use_z_square;
|
||||
M = static_cast<scalar_type>(total_frames - 1);
|
||||
m = static_cast<scalar_type>(1.0);
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::prepareVectors() {
|
||||
std::cout << "Warning: you should not call the prepareVectors() in base class!\n";
|
||||
std::cout << std::flush;
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::updateReferenceDistances() {
|
||||
std::cout << "Warning: you should not call the updateReferenceDistances() in base class!\n";
|
||||
std::cout << std::flush;
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::compute() {
|
||||
computeValue();
|
||||
computeDerivatives();
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::determineClosestFrames() {
|
||||
// Find the closest and the second closest frames
|
||||
std::sort(frame_index.begin(), frame_index.end(), doCompareFrameDistance(*this));
|
||||
// Determine the sign
|
||||
sign = static_cast<long>(frame_index[0]) - static_cast<long>(frame_index[1]);
|
||||
if (sign > 1) {
|
||||
// sigma(z) is on the left side of the closest frame
|
||||
sign = 1;
|
||||
} else if (sign < -1) {
|
||||
// sigma(z) is on the right side of the closest frame
|
||||
sign = -1;
|
||||
}
|
||||
if (std::abs(static_cast<long>(frame_index[0]) - static_cast<long>(frame_index[1])) > 1) {
|
||||
std::cout << "Warning: Geometrical pathCV relies on the assumption that the second closest frame is the neighbouring frame\n";
|
||||
std::cout << " Please check your configuration or increase restraint on z(σ)\n";
|
||||
for (size_t i_frame = 0; i_frame < frame_index.size(); ++i_frame) {
|
||||
std::cout << "Frame index: " << frame_index[i_frame] << " ; optimal RMSD = " << frame_distances[frame_index[i_frame]] << "\n";
|
||||
}
|
||||
}
|
||||
min_frame_index_1 = frame_index[0]; // s_m
|
||||
min_frame_index_2 = use_second_closest_frame ? frame_index[1] : min_frame_index_1 - sign; // s_(m-1)
|
||||
min_frame_index_3 = use_third_closest_frame ? frame_index[2] : min_frame_index_1 + sign; // s_(m+1)
|
||||
m = static_cast<double>(frame_index[0]);
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::computeValue() {
|
||||
updateReferenceDistances();
|
||||
determineClosestFrames();
|
||||
prepareVectors();
|
||||
v1v1 = scalar_type();
|
||||
v2v2 = scalar_type();
|
||||
v3v3 = scalar_type();
|
||||
v1v3 = scalar_type();
|
||||
if (path_type == Z) {
|
||||
v1v4 = scalar_type();
|
||||
v4v4 = scalar_type();
|
||||
}
|
||||
for (size_t i_elem = 0; i_elem < v1.size(); ++i_elem) {
|
||||
v1v1 += v1[i_elem] * v1[i_elem];
|
||||
v2v2 += v2[i_elem] * v2[i_elem];
|
||||
v3v3 += v3[i_elem] * v3[i_elem];
|
||||
v1v3 += v1[i_elem] * v3[i_elem];
|
||||
if (path_type == Z) {
|
||||
v1v4 += v1[i_elem] * v4[i_elem];
|
||||
v4v4 += v4[i_elem] * v4[i_elem];
|
||||
}
|
||||
}
|
||||
f = (std::sqrt(v1v3 * v1v3 - v3v3 * (v1v1 - v2v2)) - v1v3) / v3v3;
|
||||
if (path_type == Z) {
|
||||
dx = 0.5 * (f - 1);
|
||||
zz = v1v1 + 2 * dx * v1v4 + dx * dx * v4v4;
|
||||
if (use_z_square) {
|
||||
z = zz;
|
||||
} else {
|
||||
z = std::sqrt(std::fabs(zz));
|
||||
}
|
||||
}
|
||||
if (path_type == S) {
|
||||
s = m/M + static_cast<double>(sign) * ((f - 1) / (2 * M));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename element_type, typename scalar_type, path_sz path_type>
|
||||
void GeometricPathBase<element_type, scalar_type, path_type>::computeDerivatives() {
|
||||
const scalar_type factor1 = 1.0 / (2.0 * v3v3 * std::sqrt(v1v3 * v1v3 - v3v3 * (v1v1 - v2v2)));
|
||||
const scalar_type factor2 = 1.0 / v3v3;
|
||||
for (size_t i_elem = 0; i_elem < v1.size(); ++i_elem) {
|
||||
// Compute the derivative of f with vector v1
|
||||
dfdv1[i_elem] = factor1 * (2.0 * v1v3 * v3[i_elem] - 2.0 * v3v3 * v1[i_elem]) - factor2 * v3[i_elem];
|
||||
// Compute the derivative of f with respect to vector v2
|
||||
dfdv2[i_elem] = factor1 * (2.0 * v3v3 * v2[i_elem]);
|
||||
// dZ(v1(r), v2(r), v3) / dr = ∂Z/∂v1 * dv1/dr + ∂Z/∂v2 * dv2/dr
|
||||
// dv1/dr = [fitting matrix 1][-1, ..., -1]
|
||||
// dv2/dr = [fitting matrix 2][1, ..., 1]
|
||||
// ∂Z/∂v1 = 1/(2*z) * (2v1 + (f-1)v4 + (v1⋅v4)∂f/∂v1 + v4^2 * 1/4 * 2(f-1) * ∂f/∂v1)
|
||||
// ∂Z/∂v2 = 1/(2*z) * ((v1⋅v4)∂f/∂v2 + v4^2 * 1/4 * 2(f-1) * ∂f/∂v2)
|
||||
if (path_type == Z) {
|
||||
if (use_z_square) {
|
||||
dzdv1[i_elem] = 2.0 * v1[i_elem] + (f-1) * v4[i_elem] + v1v4 * dfdv1[i_elem] + v4v4 * 0.25 * 2.0 * (f-1) * dfdv1[i_elem];
|
||||
dzdv2[i_elem] = v1v4 * dfdv2[i_elem] + v4v4 * 0.25 * 2.0 * (f-1) * dfdv2[i_elem];
|
||||
} else {
|
||||
if (z > static_cast<scalar_type>(0)) {
|
||||
dzdv1[i_elem] = (1.0 / (2.0 * z)) * (2.0 * v1[i_elem] + (f-1) * v4[i_elem] + v1v4 * dfdv1[i_elem] + v4v4 * 0.25 * 2.0 * (f-1) * dfdv1[i_elem]);
|
||||
dzdv2[i_elem] = (1.0 / (2.0 * z)) * (v1v4 * dfdv2[i_elem] + v4v4 * 0.25 * 2.0 * (f-1) * dfdv2[i_elem]);
|
||||
} else {
|
||||
// workaround at z = 0
|
||||
dzdv1[i_elem] = 0;
|
||||
dzdv2[i_elem] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // GEOMETRICPATHCV_H
|
||||
@ -37,7 +37,6 @@ colvarbias_meta::colvarbias_meta(char const *key)
|
||||
{
|
||||
new_hills_begin = hills.end();
|
||||
hills_traj_os = NULL;
|
||||
replica_hills_os = NULL;
|
||||
|
||||
ebmeta_equil_steps = 0L;
|
||||
}
|
||||
@ -203,23 +202,37 @@ int colvarbias_meta::init_ebmeta_params(std::string const &conf)
|
||||
target_dist = new colvar_grid_scalar();
|
||||
target_dist->init_from_colvars(colvars);
|
||||
std::string target_dist_file;
|
||||
get_keyval(conf, "targetdistfile", target_dist_file);
|
||||
get_keyval(conf, "targetDistFile", target_dist_file);
|
||||
std::ifstream targetdiststream(target_dist_file.c_str());
|
||||
target_dist->read_multicol(targetdiststream);
|
||||
cvm::real min_val = target_dist->minimum_value();
|
||||
cvm::real max_val = target_dist->maximum_value();
|
||||
if(min_val<0){
|
||||
cvm::error("Error: Target distribution of ebMeta "
|
||||
cvm::error("Error: Target distribution of EBMetaD "
|
||||
"has negative values!.\n", INPUT_ERROR);
|
||||
}
|
||||
cvm::real min_pos_val = target_dist->minimum_pos_value();
|
||||
if(min_pos_val<=0){
|
||||
cvm::error("Error: Target distribution of ebMeta has negative "
|
||||
"or zero minimum positive value!.\n", INPUT_ERROR);
|
||||
}
|
||||
if(min_val==0){
|
||||
cvm::log("WARNING: Target distribution has zero values.\n");
|
||||
cvm::log("Zeros will be converted to the minimum positive value.\n");
|
||||
target_dist->remove_zeros(min_pos_val);
|
||||
cvm::real target_dist_min_val;
|
||||
get_keyval(conf, "targetDistMinVal", target_dist_min_val, 1/1000000.0);
|
||||
if(target_dist_min_val>0 && target_dist_min_val<1){
|
||||
target_dist_min_val=max_val*target_dist_min_val;
|
||||
target_dist->remove_small_values(target_dist_min_val);
|
||||
} else {
|
||||
if (target_dist_min_val==0) {
|
||||
cvm::log("NOTE: targetDistMinVal is set to zero, the minimum value of the target \n");
|
||||
cvm::log(" distribution will be set as the minimum positive value.\n");
|
||||
cvm::real min_pos_val = target_dist->minimum_pos_value();
|
||||
if(min_pos_val<=0){
|
||||
cvm::error("Error: Target distribution of EBMetaD has negative "
|
||||
"or zero minimum positive value!.\n", INPUT_ERROR);
|
||||
}
|
||||
if(min_val==0){
|
||||
cvm::log("WARNING: Target distribution has zero values.\n");
|
||||
cvm::log("Zeros will be converted to the minimum positive value.\n");
|
||||
target_dist->remove_small_values(min_pos_val);
|
||||
}
|
||||
} else {
|
||||
cvm::error("Error: targetDistMinVal must be a value between 0 and 1!.\n", INPUT_ERROR);
|
||||
}
|
||||
}
|
||||
// normalize target distribution and multiply by effective volume = exp(differential entropy)
|
||||
target_dist->multiply_constant(1.0/target_dist->integral());
|
||||
@ -235,14 +248,14 @@ int colvarbias_meta::init_ebmeta_params(std::string const &conf)
|
||||
colvarbias_meta::~colvarbias_meta()
|
||||
{
|
||||
colvarbias_meta::clear_state_data();
|
||||
colvarproxy *proxy = cvm::proxy;
|
||||
|
||||
if (replica_hills_os) {
|
||||
cvm::proxy->close_output_stream(replica_hills_file);
|
||||
replica_hills_os = NULL;
|
||||
if (proxy->get_output_stream(replica_hills_file)) {
|
||||
proxy->close_output_stream(replica_hills_file);
|
||||
}
|
||||
|
||||
if (hills_traj_os) {
|
||||
cvm::proxy->close_output_stream(hills_traj_file_name());
|
||||
proxy->close_output_stream(hills_traj_file_name());
|
||||
hills_traj_os = NULL;
|
||||
}
|
||||
|
||||
@ -523,6 +536,8 @@ int colvarbias_meta::update_bias()
|
||||
|
||||
case multiple_replicas:
|
||||
create_hill(hill(hill_weight*hills_scale, colvars, hill_width, replica_id));
|
||||
std::ostream *replica_hills_os =
|
||||
cvm::proxy->get_output_stream(replica_hills_file);
|
||||
if (replica_hills_os) {
|
||||
*replica_hills_os << hills.back();
|
||||
} else {
|
||||
@ -921,13 +936,16 @@ void colvarbias_meta::recount_hills_off_grid(colvarbias_meta::hill_iter h_first
|
||||
|
||||
int colvarbias_meta::replica_share()
|
||||
{
|
||||
colvarproxy *proxy = cvm::proxy;
|
||||
// sync with the other replicas (if needed)
|
||||
if (comm == multiple_replicas) {
|
||||
// reread the replicas registry
|
||||
update_replicas_registry();
|
||||
// empty the output buffer
|
||||
std::ostream *replica_hills_os =
|
||||
proxy->get_output_stream(replica_hills_file);
|
||||
if (replica_hills_os) {
|
||||
cvm::proxy->flush_output_stream(replica_hills_os);
|
||||
proxy->flush_output_stream(replica_hills_os);
|
||||
}
|
||||
read_replica_files();
|
||||
}
|
||||
@ -1089,11 +1107,7 @@ void colvarbias_meta::read_replica_files()
|
||||
(replicas[ir])->replica_state_file+"\".\n");
|
||||
|
||||
std::ifstream is((replicas[ir])->replica_state_file.c_str());
|
||||
if (! (replicas[ir])->read_state(is)) {
|
||||
cvm::log("Reading from file \""+(replicas[ir])->replica_state_file+
|
||||
"\" failed or incomplete: will try again in "+
|
||||
cvm::to_str(replica_update_freq)+" steps.\n");
|
||||
} else {
|
||||
if ((replicas[ir])->read_state(is)) {
|
||||
// state file has been read successfully
|
||||
(replicas[ir])->replica_state_file_in_sync = true;
|
||||
(replicas[ir])->update_status = 0;
|
||||
@ -1550,15 +1564,11 @@ int colvarbias_meta::setup_output()
|
||||
// for the others to read
|
||||
|
||||
// open the "hills" buffer file
|
||||
if (!replica_hills_os) {
|
||||
cvm::proxy->backup_file(replica_hills_file);
|
||||
replica_hills_os = cvm::proxy->output_stream(replica_hills_file);
|
||||
if (!replica_hills_os) return cvm::get_error();
|
||||
replica_hills_os->setf(std::ios::scientific, std::ios::floatfield);
|
||||
}
|
||||
reopen_replica_buffer_file();
|
||||
|
||||
// write the state file (so that there is always one available)
|
||||
write_replica_state_file();
|
||||
|
||||
// schedule to read the state files of the other replicas
|
||||
for (size_t ir = 0; ir < replicas.size(); ir++) {
|
||||
(replicas[ir])->replica_state_file_in_sync = false;
|
||||
@ -1661,15 +1671,16 @@ std::ostream & colvarbias_meta::write_state_data(std::ostream& os)
|
||||
|
||||
int colvarbias_meta::write_state_to_replicas()
|
||||
{
|
||||
int error_code = COLVARS_OK;
|
||||
if (comm != single_replica) {
|
||||
write_replica_state_file();
|
||||
// schedule to reread the state files of the other replicas (they
|
||||
// have also rewritten them)
|
||||
error_code |= write_replica_state_file();
|
||||
error_code |= reopen_replica_buffer_file();
|
||||
// schedule to reread the state files of the other replicas
|
||||
for (size_t ir = 0; ir < replicas.size(); ir++) {
|
||||
(replicas[ir])->replica_state_file_in_sync = false;
|
||||
}
|
||||
}
|
||||
return COLVARS_OK;
|
||||
return error_code;
|
||||
}
|
||||
|
||||
|
||||
@ -1693,6 +1704,20 @@ void colvarbias_meta::write_pmf()
|
||||
// output the PMF from this instance or replica
|
||||
pmf->reset();
|
||||
pmf->add_grid(*hills_energy);
|
||||
|
||||
if (ebmeta) {
|
||||
int nt_points=pmf->number_of_points();
|
||||
for (int i = 0; i < nt_points; i++) {
|
||||
cvm:: real pmf_val=0.0;
|
||||
cvm:: real target_val=target_dist->value(i);
|
||||
if (target_val>0) {
|
||||
pmf_val=pmf->value(i);
|
||||
pmf_val=pmf_val+cvm::temperature() * cvm::boltzmann() * std::log(target_val);
|
||||
}
|
||||
pmf->set_value(i,pmf_val);
|
||||
}
|
||||
}
|
||||
|
||||
cvm::real const max = pmf->maximum_value();
|
||||
pmf->add_constant(-1.0 * max);
|
||||
pmf->multiply_constant(-1.0);
|
||||
@ -1716,10 +1741,24 @@ void colvarbias_meta::write_pmf()
|
||||
if (comm != single_replica) {
|
||||
// output the combined PMF from all replicas
|
||||
pmf->reset();
|
||||
pmf->add_grid(*hills_energy);
|
||||
// current replica already included in the pools of replicas
|
||||
for (size_t ir = 0; ir < replicas.size(); ir++) {
|
||||
pmf->add_grid(*(replicas[ir]->hills_energy));
|
||||
}
|
||||
|
||||
if (ebmeta) {
|
||||
int nt_points=pmf->number_of_points();
|
||||
for (int i = 0; i < nt_points; i++) {
|
||||
cvm:: real pmf_val=0.0;
|
||||
cvm:: real target_val=target_dist->value(i);
|
||||
if (target_val>0) {
|
||||
pmf_val=pmf->value(i);
|
||||
pmf_val=pmf_val+cvm::temperature() * cvm::boltzmann() * std::log(target_val);
|
||||
}
|
||||
pmf->set_value(i,pmf_val);
|
||||
}
|
||||
}
|
||||
|
||||
cvm::real const max = pmf->maximum_value();
|
||||
pmf->add_constant(-1.0 * max);
|
||||
pmf->multiply_constant(-1.0);
|
||||
@ -1744,74 +1783,47 @@ void colvarbias_meta::write_pmf()
|
||||
|
||||
int colvarbias_meta::write_replica_state_file()
|
||||
{
|
||||
colvarproxy *proxy = cvm::proxy;
|
||||
|
||||
if (cvm::debug()) {
|
||||
cvm::log("Writing replica state file for bias \""+name+"\"\n");
|
||||
}
|
||||
// write down also the restart for the other replicas
|
||||
cvm::backup_file(replica_state_file.c_str());
|
||||
std::ostream *rep_state_os = cvm::proxy->output_stream(replica_state_file);
|
||||
if (rep_state_os == NULL) {
|
||||
cvm::error("Error: in opening file \""+
|
||||
replica_state_file+"\" for writing.\n", FILE_ERROR);
|
||||
return FILE_ERROR;
|
||||
|
||||
int error_code = COLVARS_OK;
|
||||
|
||||
// Write to temporary state file
|
||||
std::string const tmp_state_file(replica_state_file+".tmp");
|
||||
error_code |= proxy->remove_file(tmp_state_file);
|
||||
std::ostream *rep_state_os = cvm::proxy->output_stream(tmp_state_file);
|
||||
if (rep_state_os) {
|
||||
if (!write_state(*rep_state_os)) {
|
||||
error_code |= cvm::error("Error: in writing to temporary file \""+
|
||||
tmp_state_file+"\".\n", FILE_ERROR);
|
||||
}
|
||||
}
|
||||
error_code |= proxy->close_output_stream(tmp_state_file);
|
||||
|
||||
rep_state_os->setf(std::ios::scientific, std::ios::floatfield);
|
||||
error_code |= proxy->rename_file(tmp_state_file, replica_state_file);
|
||||
|
||||
if (!write_state(*rep_state_os)) {
|
||||
cvm::error("Error: in writing to file \""+
|
||||
replica_state_file+"\".\n", FILE_ERROR);
|
||||
cvm::proxy->close_output_stream(replica_state_file);
|
||||
return FILE_ERROR;
|
||||
return error_code;
|
||||
}
|
||||
|
||||
|
||||
int colvarbias_meta::reopen_replica_buffer_file()
|
||||
{
|
||||
int error_code = COLVARS_OK;
|
||||
colvarproxy *proxy = cvm::proxy;
|
||||
if (proxy->get_output_stream(replica_hills_file) != NULL) {
|
||||
error_code |= proxy->close_output_stream(replica_hills_file);
|
||||
}
|
||||
|
||||
cvm::proxy->close_output_stream(replica_state_file);
|
||||
|
||||
// rep_state_os.setf(std::ios::scientific, std::ios::floatfield);
|
||||
// rep_state_os << "\n"
|
||||
// << "metadynamics {\n"
|
||||
// << " configuration {\n"
|
||||
// << " name " << this->name << "\n"
|
||||
// << " step " << cvm::step_absolute() << "\n";
|
||||
// if (this->comm != single_replica) {
|
||||
// rep_state_os << " replicaID " << this->replica_id << "\n";
|
||||
// }
|
||||
// rep_state_os << " }\n\n";
|
||||
// rep_state_os << " hills_energy\n";
|
||||
// rep_state_os << std::setprecision(cvm::cv_prec)
|
||||
// << std::setw(cvm::cv_width);
|
||||
// hills_energy->write_restart(rep_state_os);
|
||||
// rep_state_os << " hills_energy_gradients\n";
|
||||
// rep_state_os << std::setprecision(cvm::cv_prec)
|
||||
// << std::setw(cvm::cv_width);
|
||||
// hills_energy_gradients->write_restart(rep_state_os);
|
||||
|
||||
// if ( (!use_grids) || keep_hills ) {
|
||||
// // write all hills currently in memory
|
||||
// for (std::list<hill>::const_iterator h = this->hills.begin();
|
||||
// h != this->hills.end();
|
||||
// h++) {
|
||||
// rep_state_os << *h;
|
||||
// }
|
||||
// } else {
|
||||
// // write just those that are near the grid boundaries
|
||||
// for (std::list<hill>::const_iterator h = this->hills_off_grid.begin();
|
||||
// h != this->hills_off_grid.end();
|
||||
// h++) {
|
||||
// rep_state_os << *h;
|
||||
// }
|
||||
// }
|
||||
// rep_state_os << "}\n\n";
|
||||
// rep_state_os.close();
|
||||
|
||||
// reopen the hills file
|
||||
cvm::proxy->close_output_stream(replica_hills_file);
|
||||
cvm::proxy->backup_file(replica_hills_file);
|
||||
replica_hills_os = cvm::proxy->output_stream(replica_hills_file);
|
||||
if (!replica_hills_os) return cvm::get_error();
|
||||
replica_hills_os->setf(std::ios::scientific, std::ios::floatfield);
|
||||
|
||||
return COLVARS_OK;
|
||||
error_code |= proxy->remove_file(replica_hills_file);
|
||||
std::ostream *replica_hills_os = proxy->output_stream(replica_hills_file);
|
||||
if (replica_hills_os) {
|
||||
replica_hills_os->setf(std::ios::scientific, std::ios::floatfield);
|
||||
} else {
|
||||
error_code |= FILE_ERROR;
|
||||
}
|
||||
return error_code;
|
||||
}
|
||||
|
||||
|
||||
@ -1883,5 +1895,3 @@ std::ostream & operator << (std::ostream &os, colvarbias_meta::hill const &h)
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -215,9 +215,12 @@ protected:
|
||||
/// \brief Read new data from replicas' files
|
||||
virtual void read_replica_files();
|
||||
|
||||
/// \brief Write data to other replicas
|
||||
/// Write full state information to be read by other replicas
|
||||
virtual int write_replica_state_file();
|
||||
|
||||
/// Call this after write_replica_state_file()
|
||||
virtual int reopen_replica_buffer_file();
|
||||
|
||||
/// \brief Additional, "mirror" metadynamics biases, to collect info
|
||||
/// from the other replicas
|
||||
///
|
||||
@ -251,9 +254,6 @@ protected:
|
||||
/// This file becomes empty after replica_state_file is rewritten
|
||||
std::string replica_hills_file;
|
||||
|
||||
/// \brief Output stream corresponding to replica_hills_file
|
||||
std::ostream *replica_hills_os;
|
||||
|
||||
/// Position within replica_hills_file (when reading it)
|
||||
int replica_hills_file_pos;
|
||||
|
||||
|
||||
@ -1295,7 +1295,8 @@ colvarvalue const colvarbias_restraint_linear::restraint_force(size_t i) const
|
||||
|
||||
cvm::real colvarbias_restraint_linear::d_restraint_potential_dk(size_t i) const
|
||||
{
|
||||
return 1.0 / variables(i)->width * (variables(i)->value() - colvar_centers[i]);
|
||||
return 1.0 / variables(i)->width * (variables(i)->value() -
|
||||
colvar_centers[i]).sum();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
// If you wish to distribute your changes, please submit them to the
|
||||
// Colvars repository at GitHub.
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "colvarmodule.h"
|
||||
#include "colvarvalue.h"
|
||||
#include "colvar.h"
|
||||
|
||||
@ -24,6 +24,13 @@
|
||||
#include "colvar.h"
|
||||
#include "colvaratoms.h"
|
||||
|
||||
#if (__cplusplus >= 201103L)
|
||||
#include "colvar_geometricpath.h"
|
||||
#include <functional>
|
||||
#endif // C++11 checking
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
/// \brief Colvar component (base class for collective variables)
|
||||
///
|
||||
@ -688,9 +695,6 @@ protected:
|
||||
/// Reference coordinates
|
||||
std::vector<cvm::atom_pos> ref_pos;
|
||||
|
||||
/// Geometric center of the reference coordinates
|
||||
cvm::atom_pos ref_pos_center;
|
||||
|
||||
/// Eigenvector (of a normal or essential mode): will always have zero center
|
||||
std::vector<cvm::rvector> eigenvec;
|
||||
|
||||
@ -1383,6 +1387,222 @@ public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
class colvar::componentDisabled
|
||||
: public colvar::cvc
|
||||
{
|
||||
public:
|
||||
componentDisabled(std::string const &conf) {
|
||||
cvm::error("Error: this component is not enabled in the current build; please see https://colvars.github.io/README-c++11.html");
|
||||
}
|
||||
virtual ~componentDisabled() {}
|
||||
virtual void calc_value() {}
|
||||
virtual void calc_gradients() {}
|
||||
virtual void apply_force(colvarvalue const &force) {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
#if (__cplusplus >= 201103L)
|
||||
class colvar::CartesianBasedPath
|
||||
: public colvar::cvc
|
||||
{
|
||||
protected:
|
||||
virtual void computeReferenceDistance(std::vector<cvm::real>& result);
|
||||
/// Selected atoms
|
||||
cvm::atom_group *atoms;
|
||||
/// Fitting options
|
||||
bool has_user_defined_fitting;
|
||||
/// Reference frames
|
||||
std::vector<std::vector<cvm::atom_pos>> reference_frames;
|
||||
std::vector<std::vector<cvm::atom_pos>> reference_fitting_frames;
|
||||
/// Atom groups for RMSD calculation together with reference frames
|
||||
std::vector<cvm::atom_group*> comp_atoms;
|
||||
/// Total number of reference frames
|
||||
size_t total_reference_frames;
|
||||
public:
|
||||
CartesianBasedPath(std::string const &conf);
|
||||
virtual ~CartesianBasedPath();
|
||||
virtual void calc_value() = 0;
|
||||
virtual void apply_force(colvarvalue const &force) = 0;
|
||||
};
|
||||
|
||||
/// \brief Colvar component: alternative path collective variable using geometry, variable s
|
||||
/// For more information see https://plumed.github.io/doc-v2.5/user-doc/html/_p_a_t_h.html
|
||||
/// Díaz Leines, G.; Ensing, B. Path Finding on High-Dimensional Free Energy Landscapes. Phys. Rev. Lett. 2012, 109 (2), 020601. https://doi.org/10.1103/PhysRevLett.109.020601.
|
||||
class colvar::gspath
|
||||
: public colvar::CartesianBasedPath, public GeometricPathCV::GeometricPathBase<cvm::atom_pos, cvm::real, GeometricPathCV::path_sz::S>
|
||||
{
|
||||
private:
|
||||
// Optimal rotation for compute v3
|
||||
cvm::rotation rot_v3;
|
||||
protected:
|
||||
virtual void prepareVectors();
|
||||
virtual void updateReferenceDistances();
|
||||
public:
|
||||
gspath(std::string const &conf);
|
||||
virtual ~gspath() {}
|
||||
virtual void calc_value();
|
||||
virtual void calc_gradients();
|
||||
virtual void apply_force(colvarvalue const &force);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/// \brief Colvar component: alternative path collective variable using geometry, variable z
|
||||
/// This should be merged with gspath in the same class by class inheritance or something else
|
||||
class colvar::gzpath
|
||||
: public colvar::CartesianBasedPath, public GeometricPathCV::GeometricPathBase<cvm::atom_pos, cvm::real, GeometricPathCV::path_sz::Z>
|
||||
{
|
||||
private:
|
||||
// Optimal rotation for compute v3, v4
|
||||
cvm::rotation rot_v3;
|
||||
cvm::rotation rot_v4;
|
||||
protected:
|
||||
virtual void prepareVectors();
|
||||
virtual void updateReferenceDistances();
|
||||
public:
|
||||
gzpath(std::string const &conf);
|
||||
virtual ~gzpath() {}
|
||||
virtual void calc_value();
|
||||
virtual void calc_gradients();
|
||||
virtual void apply_force(colvarvalue const &force);
|
||||
};
|
||||
|
||||
/// Current only linear combination of sub-CVCs is available
|
||||
class colvar::linearCombination
|
||||
: public colvar::cvc
|
||||
{
|
||||
protected:
|
||||
/// Map from string to the types of colvar components
|
||||
std::map<std::string, std::function<colvar::cvc* (const std::string& subcv_conf)>> string_cv_map;
|
||||
/// Sub-colvar components
|
||||
std::vector<colvar::cvc*> cv;
|
||||
/// If all sub-cvs use explicit gradients then we also use it
|
||||
bool use_explicit_gradients;
|
||||
protected:
|
||||
cvm::real getPolynomialFactorOfCVGradient(size_t i_cv) const;
|
||||
public:
|
||||
linearCombination(std::string const &conf);
|
||||
virtual ~linearCombination();
|
||||
virtual void calc_value();
|
||||
virtual void calc_gradients();
|
||||
virtual void apply_force(colvarvalue const &force);
|
||||
};
|
||||
|
||||
|
||||
class colvar::CVBasedPath
|
||||
: public colvar::cvc
|
||||
{
|
||||
protected:
|
||||
/// Map from string to the types of colvar components
|
||||
std::map<std::string, std::function<colvar::cvc* (const std::string& subcv_conf)>> string_cv_map;
|
||||
/// Sub-colvar components
|
||||
std::vector<colvar::cvc*> cv;
|
||||
/// Refernce colvar values from path
|
||||
std::vector<std::vector<colvarvalue>> ref_cv;
|
||||
/// If all sub-cvs use explicit gradients then we also use it
|
||||
bool use_explicit_gradients;
|
||||
/// Total number of reference frames
|
||||
size_t total_reference_frames;
|
||||
protected:
|
||||
virtual void computeReferenceDistance(std::vector<cvm::real>& result);
|
||||
cvm::real getPolynomialFactorOfCVGradient(size_t i_cv) const;
|
||||
public:
|
||||
CVBasedPath(std::string const &conf);
|
||||
virtual ~CVBasedPath();
|
||||
virtual void calc_value() = 0;
|
||||
virtual void apply_force(colvarvalue const &force) = 0;
|
||||
};
|
||||
|
||||
|
||||
/// \brief Colvar component: alternative path collective variable using geometry, variable s
|
||||
/// Allow any combination of existing (scalar) CVs
|
||||
/// For more information see https://plumed.github.io/doc-v2.5/user-doc/html/_p_a_t_h.html
|
||||
/// Díaz Leines, G.; Ensing, B. Path Finding on High-Dimensional Free Energy Landscapes. Phys. Rev. Lett. 2012, 109 (2), 020601. https://doi.org/10.1103/PhysRevLett.109.020601.
|
||||
class colvar::gspathCV
|
||||
: public colvar::CVBasedPath, public GeometricPathCV::GeometricPathBase<colvarvalue, cvm::real, GeometricPathCV::path_sz::S>
|
||||
{
|
||||
protected:
|
||||
virtual void updateReferenceDistances();
|
||||
virtual void prepareVectors();
|
||||
public:
|
||||
gspathCV(std::string const &conf);
|
||||
virtual ~gspathCV();
|
||||
virtual void calc_value();
|
||||
virtual void calc_gradients();
|
||||
virtual void apply_force(colvarvalue const &force);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class colvar::gzpathCV
|
||||
: public colvar::CVBasedPath, public GeometricPathCV::GeometricPathBase<colvarvalue, cvm::real, GeometricPathCV::path_sz::Z>
|
||||
{
|
||||
protected:
|
||||
virtual void updateReferenceDistances();
|
||||
virtual void prepareVectors();
|
||||
public:
|
||||
gzpathCV(std::string const &conf);
|
||||
virtual ~gzpathCV();
|
||||
virtual void calc_value();
|
||||
virtual void calc_gradients();
|
||||
virtual void apply_force(colvarvalue const &force);
|
||||
};
|
||||
|
||||
#else // if the compiler doesn't support C++11
|
||||
|
||||
class colvar::linearCombination
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
linearCombination(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
class colvar::CartesianBasedPath
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
CartesianBasedPath(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
class colvar::CVBasedPath
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
CVBasedPath(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
class colvar::gspath
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
gspath(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
class colvar::gzpath
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
gzpath(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
class colvar::gspathCV
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
gspathCV(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
class colvar::gzpathCV
|
||||
: public colvar::componentDisabled
|
||||
{
|
||||
public:
|
||||
gzpathCV(std::string const &conf) : componentDisabled(conf) {}
|
||||
};
|
||||
|
||||
#endif // C++11 checking
|
||||
|
||||
// metrics functions for cvc implementations
|
||||
|
||||
// simple definitions of the distance functions; these are useful only
|
||||
|
||||
@ -1013,8 +1013,7 @@ colvar::rmsd::rmsd(std::string const &conf)
|
||||
cvm::to_str(atoms->size())+").\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
} else { // Only look for ref pos file if ref positions not already provided
|
||||
std::string ref_pos_file;
|
||||
if (get_keyval(conf, "refPositionsFile", ref_pos_file, std::string(""))) {
|
||||
|
||||
@ -1041,12 +1040,15 @@ colvar::rmsd::rmsd(std::string const &conf)
|
||||
|
||||
cvm::load_coords(ref_pos_file.c_str(), &ref_pos, atoms,
|
||||
ref_pos_col, ref_pos_col_value);
|
||||
} else {
|
||||
cvm::error("Error: no reference positions for RMSD; use either refPositions of refPositionsFile.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ref_pos.size() != atoms->size()) {
|
||||
cvm::error("Error: found " + cvm::to_str(ref_pos.size()) +
|
||||
" reference positions; expected " + cvm::to_str(atoms->size()));
|
||||
" reference positions for RMSD; expected " + cvm::to_str(atoms->size()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
910
lib/colvars/colvarcomp_gpath.cpp
Normal file
910
lib/colvars/colvarcomp_gpath.cpp
Normal file
@ -0,0 +1,910 @@
|
||||
#if (__cplusplus >= 201103L)
|
||||
|
||||
// This file is part of the Collective Variables module (Colvars).
|
||||
// The original version of Colvars and its updates are located at:
|
||||
// https://github.com/colvars/colvars
|
||||
// Please update all Colvars source files before making any changes.
|
||||
// If you wish to distribute your changes, please submit them to the
|
||||
// Colvars repository at GitHub.
|
||||
|
||||
#include <numeric>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <limits>
|
||||
|
||||
#include "colvarmodule.h"
|
||||
#include "colvarvalue.h"
|
||||
#include "colvarparse.h"
|
||||
#include "colvar.h"
|
||||
#include "colvarcomp.h"
|
||||
|
||||
namespace GeometricPathCV {
|
||||
void init_string_cv_map(std::map<std::string, std::function<colvar::cvc* (const std::string& conf)>>& string_cv_map);
|
||||
}
|
||||
|
||||
bool compareColvarComponent(colvar::cvc *i, colvar::cvc *j)
|
||||
{
|
||||
return i->name < j->name;
|
||||
}
|
||||
|
||||
colvar::CartesianBasedPath::CartesianBasedPath(std::string const &conf): cvc(conf), atoms(nullptr), reference_frames(0) {
|
||||
// Parse selected atoms
|
||||
atoms = parse_group(conf, "atoms");
|
||||
has_user_defined_fitting = false;
|
||||
std::string fitting_conf;
|
||||
if (key_lookup(conf, "fittingAtoms", &fitting_conf)) {
|
||||
has_user_defined_fitting = true;
|
||||
}
|
||||
// Lookup reference column of PDB
|
||||
// Copied from the RMSD class
|
||||
std::string reference_column;
|
||||
double reference_column_value;
|
||||
if (get_keyval(conf, "refPositionsCol", reference_column, std::string(""))) {
|
||||
bool found = get_keyval(conf, "refPositionsColValue", reference_column_value, 0.0);
|
||||
if (found && reference_column_value == 0.0) {
|
||||
cvm::error("Error: refPositionsColValue, "
|
||||
"if provided, must be non-zero.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Lookup all reference frames
|
||||
bool has_frames = true;
|
||||
total_reference_frames = 0;
|
||||
while (has_frames) {
|
||||
std::string reference_position_file_lookup = "refPositionsFile" + cvm::to_str(total_reference_frames + 1);
|
||||
if (key_lookup(conf, reference_position_file_lookup.c_str())) {
|
||||
std::string reference_position_filename;
|
||||
get_keyval(conf, reference_position_file_lookup.c_str(), reference_position_filename, std::string(""));
|
||||
std::vector<cvm::atom_pos> reference_position(atoms->size());
|
||||
cvm::load_coords(reference_position_filename.c_str(), &reference_position, atoms, reference_column, reference_column_value);
|
||||
reference_frames.push_back(reference_position);
|
||||
++total_reference_frames;
|
||||
} else {
|
||||
has_frames = false;
|
||||
}
|
||||
}
|
||||
// Setup alignment to compute RMSD with respect to reference frames
|
||||
for (size_t i_frame = 0; i_frame < reference_frames.size(); ++i_frame) {
|
||||
cvm::atom_group* tmp_atoms = parse_group(conf, "atoms");
|
||||
if (!has_user_defined_fitting) {
|
||||
// Swipe from the rmsd class
|
||||
tmp_atoms->b_center = true;
|
||||
tmp_atoms->b_rotate = true;
|
||||
tmp_atoms->ref_pos = reference_frames[i_frame];
|
||||
tmp_atoms->center_ref_pos();
|
||||
tmp_atoms->enable(f_ag_fit_gradients);
|
||||
tmp_atoms->rot.request_group1_gradients(tmp_atoms->size());
|
||||
tmp_atoms->rot.request_group2_gradients(tmp_atoms->size());
|
||||
comp_atoms.push_back(tmp_atoms);
|
||||
} else {
|
||||
// parse a group of atoms for fitting
|
||||
std::string fitting_group_name = std::string("fittingAtoms") + cvm::to_str(i_frame);
|
||||
cvm::atom_group* tmp_fitting_atoms = new cvm::atom_group(fitting_group_name.c_str());
|
||||
tmp_fitting_atoms->parse(fitting_conf);
|
||||
tmp_fitting_atoms->disable(f_ag_scalable);
|
||||
tmp_fitting_atoms->disable(f_ag_scalable_com);
|
||||
tmp_fitting_atoms->fit_gradients.assign(tmp_fitting_atoms->size(), cvm::atom_pos(0.0, 0.0, 0.0));
|
||||
std::string reference_position_file_lookup = "refPositionsFile" + cvm::to_str(i_frame + 1);
|
||||
std::string reference_position_filename;
|
||||
get_keyval(conf, reference_position_file_lookup.c_str(), reference_position_filename, std::string(""));
|
||||
std::vector<cvm::atom_pos> reference_fitting_position(tmp_fitting_atoms->size());
|
||||
cvm::load_coords(reference_position_filename.c_str(), &reference_fitting_position, tmp_fitting_atoms, reference_column, reference_column_value);
|
||||
// setup the atom group for calculating
|
||||
tmp_atoms->b_center = true;
|
||||
tmp_atoms->b_rotate = true;
|
||||
tmp_atoms->b_user_defined_fit = true;
|
||||
tmp_atoms->disable(f_ag_scalable);
|
||||
tmp_atoms->disable(f_ag_scalable_com);
|
||||
tmp_atoms->ref_pos = reference_fitting_position;
|
||||
tmp_atoms->center_ref_pos();
|
||||
tmp_atoms->enable(f_ag_fit_gradients);
|
||||
tmp_atoms->enable(f_ag_fitting_group);
|
||||
tmp_atoms->fitting_group = tmp_fitting_atoms;
|
||||
tmp_atoms->rot.request_group1_gradients(tmp_fitting_atoms->size());
|
||||
tmp_atoms->rot.request_group2_gradients(tmp_fitting_atoms->size());
|
||||
reference_fitting_frames.push_back(reference_fitting_position);
|
||||
comp_atoms.push_back(tmp_atoms);
|
||||
}
|
||||
}
|
||||
x.type(colvarvalue::type_scalar);
|
||||
// Don't use implicit gradient
|
||||
enable(f_cvc_explicit_gradient);
|
||||
}
|
||||
|
||||
colvar::CartesianBasedPath::~CartesianBasedPath() {
|
||||
for (auto it_comp_atoms = comp_atoms.begin(); it_comp_atoms != comp_atoms.end(); ++it_comp_atoms) {
|
||||
if (*it_comp_atoms != nullptr) {
|
||||
delete (*it_comp_atoms);
|
||||
(*it_comp_atoms) = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::CartesianBasedPath::computeReferenceDistance(std::vector<cvm::real>& result) {
|
||||
for (size_t i_frame = 0; i_frame < reference_frames.size(); ++i_frame) {
|
||||
cvm::real frame_rmsd = 0.0;
|
||||
for (size_t i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
frame_rmsd += ((*(comp_atoms[i_frame]))[i_atom].pos - reference_frames[i_frame][i_atom]).norm2();
|
||||
}
|
||||
frame_rmsd /= cvm::real(atoms->size());
|
||||
frame_rmsd = cvm::sqrt(frame_rmsd);
|
||||
result[i_frame] = frame_rmsd;
|
||||
}
|
||||
}
|
||||
|
||||
colvar::gspath::gspath(std::string const &conf): CartesianBasedPath(conf) {
|
||||
function_type = "gspath";
|
||||
get_keyval(conf, "useSecondClosestFrame", use_second_closest_frame, true);
|
||||
if (use_second_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the second closest frame to compute s_(m-1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the neighbouring frame to compute s_(m-1)\n"));
|
||||
}
|
||||
get_keyval(conf, "useThirdClosestFrame", use_third_closest_frame, false);
|
||||
if (use_third_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the third closest frame to compute s_(m+1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the neighbouring frame to compute s_(m+1)\n"));
|
||||
}
|
||||
GeometricPathCV::GeometricPathBase<cvm::atom_pos, cvm::real, GeometricPathCV::path_sz::S>::initialize(atoms->size(), cvm::atom_pos(), total_reference_frames, use_second_closest_frame, use_third_closest_frame);
|
||||
cvm::log(std::string("Geometric pathCV(s) is initialized.\n"));
|
||||
cvm::log(std::string("Geometric pathCV(s) loaded ") + cvm::to_str(reference_frames.size()) + std::string(" frames.\n"));
|
||||
}
|
||||
|
||||
void colvar::gspath::updateReferenceDistances() {
|
||||
computeReferenceDistance(frame_distances);
|
||||
}
|
||||
|
||||
void colvar::gspath::prepareVectors() {
|
||||
size_t i_atom;
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
// v1 = s_m - z
|
||||
v1[i_atom] = reference_frames[min_frame_index_1][i_atom] - (*(comp_atoms[min_frame_index_1]))[i_atom].pos;
|
||||
// v2 = z - s_(m-1)
|
||||
v2[i_atom] = (*(comp_atoms[min_frame_index_2]))[i_atom].pos - reference_frames[min_frame_index_2][i_atom];
|
||||
}
|
||||
if (min_frame_index_3 < 0 || min_frame_index_3 > M) {
|
||||
cvm::atom_pos reference_cog_1, reference_cog_2;
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
reference_cog_1 += reference_frames[min_frame_index_1][i_atom];
|
||||
reference_cog_2 += reference_frames[min_frame_index_2][i_atom];
|
||||
}
|
||||
reference_cog_1 /= reference_frames[min_frame_index_1].size();
|
||||
reference_cog_2 /= reference_frames[min_frame_index_2].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_1(reference_frames[min_frame_index_1].size());
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_2(reference_frames[min_frame_index_2].size());
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
tmp_reference_frame_1[i_atom] = reference_frames[min_frame_index_1][i_atom] - reference_cog_1;
|
||||
tmp_reference_frame_2[i_atom] = reference_frames[min_frame_index_2][i_atom] - reference_cog_2;
|
||||
}
|
||||
if (has_user_defined_fitting) {
|
||||
cvm::atom_pos reference_fitting_cog_1, reference_fitting_cog_2;
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_1].size(); ++i_atom) {
|
||||
reference_fitting_cog_1 += reference_fitting_frames[min_frame_index_1][i_atom];
|
||||
reference_fitting_cog_2 += reference_fitting_frames[min_frame_index_2][i_atom];
|
||||
}
|
||||
reference_fitting_cog_1 /= reference_fitting_frames[min_frame_index_1].size();
|
||||
reference_fitting_cog_2 /= reference_fitting_frames[min_frame_index_2].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_1(reference_fitting_frames[min_frame_index_1].size());
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_2(reference_fitting_frames[min_frame_index_2].size());
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_1].size(); ++i_atom) {
|
||||
tmp_reference_fitting_frame_1[i_atom] = reference_fitting_frames[min_frame_index_1][i_atom] - reference_fitting_cog_1;
|
||||
tmp_reference_fitting_frame_2[i_atom] = reference_fitting_frames[min_frame_index_2][i_atom] - reference_fitting_cog_2;
|
||||
}
|
||||
rot_v3.calc_optimal_rotation(tmp_reference_fitting_frame_1, tmp_reference_fitting_frame_2);
|
||||
} else {
|
||||
rot_v3.calc_optimal_rotation(tmp_reference_frame_1, tmp_reference_frame_2);
|
||||
}
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
v3[i_atom] = rot_v3.q.rotate(tmp_reference_frame_1[i_atom]) - tmp_reference_frame_2[i_atom];
|
||||
}
|
||||
} else {
|
||||
cvm::atom_pos reference_cog_1, reference_cog_3;
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
reference_cog_1 += reference_frames[min_frame_index_1][i_atom];
|
||||
reference_cog_3 += reference_frames[min_frame_index_3][i_atom];
|
||||
}
|
||||
reference_cog_1 /= reference_frames[min_frame_index_1].size();
|
||||
reference_cog_3 /= reference_frames[min_frame_index_3].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_1(reference_frames[min_frame_index_1].size());
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_3(reference_frames[min_frame_index_3].size());
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
tmp_reference_frame_1[i_atom] = reference_frames[min_frame_index_1][i_atom] - reference_cog_1;
|
||||
tmp_reference_frame_3[i_atom] = reference_frames[min_frame_index_3][i_atom] - reference_cog_3;
|
||||
}
|
||||
if (has_user_defined_fitting) {
|
||||
cvm::atom_pos reference_fitting_cog_1, reference_fitting_cog_3;
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_1].size(); ++i_atom) {
|
||||
reference_fitting_cog_1 += reference_fitting_frames[min_frame_index_1][i_atom];
|
||||
reference_fitting_cog_3 += reference_fitting_frames[min_frame_index_3][i_atom];
|
||||
}
|
||||
reference_fitting_cog_1 /= reference_fitting_frames[min_frame_index_1].size();
|
||||
reference_fitting_cog_3 /= reference_fitting_frames[min_frame_index_3].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_1(reference_fitting_frames[min_frame_index_1].size());
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_3(reference_fitting_frames[min_frame_index_3].size());
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_1].size(); ++i_atom) {
|
||||
tmp_reference_fitting_frame_1[i_atom] = reference_fitting_frames[min_frame_index_1][i_atom] - reference_fitting_cog_1;
|
||||
tmp_reference_fitting_frame_3[i_atom] = reference_fitting_frames[min_frame_index_3][i_atom] - reference_fitting_cog_3;
|
||||
}
|
||||
rot_v3.calc_optimal_rotation(tmp_reference_fitting_frame_1, tmp_reference_fitting_frame_3);
|
||||
} else {
|
||||
rot_v3.calc_optimal_rotation(tmp_reference_frame_1, tmp_reference_frame_3);
|
||||
}
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
// v3 = s_(m+1) - s_m
|
||||
v3[i_atom] = tmp_reference_frame_3[i_atom] - rot_v3.q.rotate(tmp_reference_frame_1[i_atom]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gspath::calc_value() {
|
||||
computeValue();
|
||||
x = s;
|
||||
}
|
||||
|
||||
void colvar::gspath::calc_gradients() {
|
||||
computeDerivatives();
|
||||
cvm::rvector tmp_atom_grad_v1, tmp_atom_grad_v2;
|
||||
// dS(v1, v2(r), v3) / dr = ∂S/∂v1 * dv1/dr + ∂S/∂v2 * dv2/dr
|
||||
// dv1/dr = [fitting matrix 1][-1, ..., -1]
|
||||
// dv2/dr = [fitting matrix 2][1, ..., 1]
|
||||
// ∂S/∂v1 = ± (∂f/∂v1) / (2M)
|
||||
// ∂S/∂v2 = ± (∂f/∂v2) / (2M)
|
||||
// dS(v1, v2(r), v3) / dr = -1.0 * ± (∂f/∂v1) / (2M) + ± (∂f/∂v2) / (2M)
|
||||
for (size_t i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
tmp_atom_grad_v1[0] = -1.0 * sign * 0.5 * dfdv1[i_atom][0] / M;
|
||||
tmp_atom_grad_v1[1] = -1.0 * sign * 0.5 * dfdv1[i_atom][1] / M;
|
||||
tmp_atom_grad_v1[2] = -1.0 * sign * 0.5 * dfdv1[i_atom][2] / M;
|
||||
tmp_atom_grad_v2[0] = sign * 0.5 * dfdv2[i_atom][0] / M;
|
||||
tmp_atom_grad_v2[1] = sign * 0.5 * dfdv2[i_atom][1] / M;
|
||||
tmp_atom_grad_v2[2] = sign * 0.5 * dfdv2[i_atom][2] / M;
|
||||
(*(comp_atoms[min_frame_index_1]))[i_atom].grad += tmp_atom_grad_v1;
|
||||
(*(comp_atoms[min_frame_index_2]))[i_atom].grad += tmp_atom_grad_v2;
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gspath::apply_force(colvarvalue const &force) {
|
||||
// The force applied to this CV is scalar type
|
||||
cvm::real const &F = force.real_value;
|
||||
(*(comp_atoms[min_frame_index_1])).apply_colvar_force(F);
|
||||
(*(comp_atoms[min_frame_index_2])).apply_colvar_force(F);
|
||||
}
|
||||
|
||||
colvar::gzpath::gzpath(std::string const &conf): CartesianBasedPath(conf) {
|
||||
function_type = "gzpath";
|
||||
get_keyval(conf, "useSecondClosestFrame", use_second_closest_frame, true);
|
||||
if (use_second_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the second closest frame to compute s_(m-1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the neighbouring frame to compute s_(m-1)\n"));
|
||||
}
|
||||
get_keyval(conf, "useThirdClosestFrame", use_third_closest_frame, false);
|
||||
if (use_third_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the third closest frame to compute s_(m+1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the neighbouring frame to compute s_(m+1)\n"));
|
||||
}
|
||||
bool b_use_z_square = false;
|
||||
get_keyval(conf, "useZsquare", b_use_z_square, false);
|
||||
if (b_use_z_square == true) {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the square of distance from current frame to path compute z\n"));
|
||||
}
|
||||
GeometricPathCV::GeometricPathBase<cvm::atom_pos, cvm::real, GeometricPathCV::path_sz::Z>::initialize(atoms->size(), cvm::atom_pos(), total_reference_frames, use_second_closest_frame, use_third_closest_frame, b_use_z_square);
|
||||
// Logging
|
||||
cvm::log(std::string("Geometric pathCV(z) is initialized.\n"));
|
||||
cvm::log(std::string("Geometric pathCV(z) loaded ") + cvm::to_str(reference_frames.size()) + std::string(" frames.\n"));
|
||||
}
|
||||
|
||||
void colvar::gzpath::updateReferenceDistances() {
|
||||
computeReferenceDistance(frame_distances);
|
||||
}
|
||||
|
||||
void colvar::gzpath::prepareVectors() {
|
||||
cvm::atom_pos reference_cog_1, reference_cog_2;
|
||||
size_t i_atom;
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
reference_cog_1 += reference_frames[min_frame_index_1][i_atom];
|
||||
reference_cog_2 += reference_frames[min_frame_index_2][i_atom];
|
||||
}
|
||||
reference_cog_1 /= reference_frames[min_frame_index_1].size();
|
||||
reference_cog_2 /= reference_frames[min_frame_index_2].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_1(reference_frames[min_frame_index_1].size());
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_2(reference_frames[min_frame_index_2].size());
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
tmp_reference_frame_1[i_atom] = reference_frames[min_frame_index_1][i_atom] - reference_cog_1;
|
||||
tmp_reference_frame_2[i_atom] = reference_frames[min_frame_index_2][i_atom] - reference_cog_2;
|
||||
}
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_1;
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_2;
|
||||
if (has_user_defined_fitting) {
|
||||
cvm::atom_pos reference_fitting_cog_1, reference_fitting_cog_2;
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_1].size(); ++i_atom) {
|
||||
reference_fitting_cog_1 += reference_fitting_frames[min_frame_index_1][i_atom];
|
||||
reference_fitting_cog_2 += reference_fitting_frames[min_frame_index_2][i_atom];
|
||||
}
|
||||
reference_fitting_cog_1 /= reference_fitting_frames[min_frame_index_1].size();
|
||||
reference_fitting_cog_2 /= reference_fitting_frames[min_frame_index_2].size();
|
||||
tmp_reference_fitting_frame_1.resize(reference_fitting_frames[min_frame_index_1].size());
|
||||
tmp_reference_fitting_frame_2.resize(reference_fitting_frames[min_frame_index_2].size());
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_1].size(); ++i_atom) {
|
||||
tmp_reference_fitting_frame_1[i_atom] = reference_fitting_frames[min_frame_index_1][i_atom] - reference_fitting_cog_1;
|
||||
tmp_reference_fitting_frame_2[i_atom] = reference_fitting_frames[min_frame_index_2][i_atom] - reference_fitting_cog_2;
|
||||
}
|
||||
rot_v4.calc_optimal_rotation(tmp_reference_fitting_frame_1, tmp_reference_fitting_frame_2);
|
||||
} else {
|
||||
rot_v4.calc_optimal_rotation(tmp_reference_frame_1, tmp_reference_frame_2);
|
||||
}
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
v1[i_atom] = reference_frames[min_frame_index_1][i_atom] - (*(comp_atoms[min_frame_index_1]))[i_atom].pos;
|
||||
v2[i_atom] = (*(comp_atoms[min_frame_index_2]))[i_atom].pos - reference_frames[min_frame_index_2][i_atom];
|
||||
// v4 only computes in gzpath
|
||||
// v4 = s_m - s_(m-1)
|
||||
v4[i_atom] = rot_v4.q.rotate(tmp_reference_frame_1[i_atom]) - tmp_reference_frame_2[i_atom];
|
||||
}
|
||||
if (min_frame_index_3 < 0 || min_frame_index_3 > M) {
|
||||
v3 = v4;
|
||||
} else {
|
||||
cvm::atom_pos reference_cog_3;
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
reference_cog_3 += reference_frames[min_frame_index_3][i_atom];
|
||||
}
|
||||
reference_cog_3 /= reference_frames[min_frame_index_3].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_frame_3(reference_frames[min_frame_index_3].size());
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
tmp_reference_frame_3[i_atom] = reference_frames[min_frame_index_3][i_atom] - reference_cog_3;
|
||||
}
|
||||
if (has_user_defined_fitting) {
|
||||
cvm::atom_pos reference_fitting_cog_3;
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_3].size(); ++i_atom) {
|
||||
reference_fitting_cog_3 += reference_fitting_frames[min_frame_index_3][i_atom];
|
||||
}
|
||||
reference_fitting_cog_3 /= reference_fitting_frames[min_frame_index_3].size();
|
||||
std::vector<cvm::atom_pos> tmp_reference_fitting_frame_3(reference_fitting_frames[min_frame_index_3].size());
|
||||
for (i_atom = 0; i_atom < reference_fitting_frames[min_frame_index_3].size(); ++i_atom) {
|
||||
tmp_reference_fitting_frame_3[i_atom] = reference_fitting_frames[min_frame_index_3][i_atom] - reference_fitting_cog_3;
|
||||
}
|
||||
rot_v3.calc_optimal_rotation(tmp_reference_fitting_frame_1, tmp_reference_fitting_frame_3);
|
||||
} else {
|
||||
rot_v3.calc_optimal_rotation(tmp_reference_frame_1, tmp_reference_frame_3);
|
||||
}
|
||||
for (i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
// v3 = s_(m+1) - s_m
|
||||
v3[i_atom] = tmp_reference_frame_3[i_atom] - rot_v3.q.rotate(tmp_reference_frame_1[i_atom]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gzpath::calc_value() {
|
||||
computeValue();
|
||||
x = z;
|
||||
}
|
||||
|
||||
void colvar::gzpath::calc_gradients() {
|
||||
computeDerivatives();
|
||||
cvm::rvector tmp_atom_grad_v1, tmp_atom_grad_v2;
|
||||
for (size_t i_atom = 0; i_atom < atoms->size(); ++i_atom) {
|
||||
tmp_atom_grad_v1 = -1.0 * dzdv1[i_atom];
|
||||
tmp_atom_grad_v2 = dzdv2[i_atom];
|
||||
(*(comp_atoms[min_frame_index_1]))[i_atom].grad += tmp_atom_grad_v1;
|
||||
(*(comp_atoms[min_frame_index_2]))[i_atom].grad += tmp_atom_grad_v2;
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gzpath::apply_force(colvarvalue const &force) {
|
||||
// The force applied to this CV is scalar type
|
||||
cvm::real const &F = force.real_value;
|
||||
(*(comp_atoms[min_frame_index_1])).apply_colvar_force(F);
|
||||
(*(comp_atoms[min_frame_index_2])).apply_colvar_force(F);
|
||||
}
|
||||
|
||||
colvar::linearCombination::linearCombination(std::string const &conf): cvc(conf) {
|
||||
GeometricPathCV::init_string_cv_map(string_cv_map);
|
||||
// Lookup all available sub-cvcs
|
||||
for (auto it_cv_map = string_cv_map.begin(); it_cv_map != string_cv_map.end(); ++it_cv_map) {
|
||||
if (key_lookup(conf, it_cv_map->first.c_str())) {
|
||||
std::vector<std::string> sub_cvc_confs;
|
||||
get_key_string_multi_value(conf, it_cv_map->first.c_str(), sub_cvc_confs);
|
||||
for (auto it_sub_cvc_conf = sub_cvc_confs.begin(); it_sub_cvc_conf != sub_cvc_confs.end(); ++it_sub_cvc_conf) {
|
||||
cv.push_back((it_cv_map->second)(*(it_sub_cvc_conf)));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sort all sub CVs by their names
|
||||
std::sort(cv.begin(), cv.end(), compareColvarComponent);
|
||||
for (auto it_sub_cv = cv.begin(); it_sub_cv != cv.end(); ++it_sub_cv) {
|
||||
for (auto it_atom_group = (*it_sub_cv)->atom_groups.begin(); it_atom_group != (*it_sub_cv)->atom_groups.end(); ++it_atom_group) {
|
||||
register_atom_group(*it_atom_group);
|
||||
}
|
||||
}
|
||||
x.type(cv[0]->value());
|
||||
x.reset();
|
||||
use_explicit_gradients = true;
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
if (!cv[i_cv]->is_enabled(f_cvc_explicit_gradient)) {
|
||||
use_explicit_gradients = false;
|
||||
}
|
||||
}
|
||||
if (!use_explicit_gradients) {
|
||||
disable(f_cvc_explicit_gradient);
|
||||
}
|
||||
}
|
||||
|
||||
cvm::real colvar::linearCombination::getPolynomialFactorOfCVGradient(size_t i_cv) const {
|
||||
cvm::real factor_polynomial = 1.0;
|
||||
if (cv[i_cv]->value().type() == colvarvalue::type_scalar) {
|
||||
factor_polynomial = cv[i_cv]->sup_coeff * cv[i_cv]->sup_np * cvm::pow(cv[i_cv]->value().real_value, cv[i_cv]->sup_np - 1);
|
||||
} else {
|
||||
factor_polynomial = cv[i_cv]->sup_coeff;
|
||||
}
|
||||
return factor_polynomial;
|
||||
}
|
||||
|
||||
colvar::linearCombination::~linearCombination() {
|
||||
for (auto it = cv.begin(); it != cv.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::linearCombination::calc_value() {
|
||||
x.reset();
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
cv[i_cv]->calc_value();
|
||||
colvarvalue current_cv_value(cv[i_cv]->value());
|
||||
// polynomial combination allowed
|
||||
if (current_cv_value.type() == colvarvalue::type_scalar) {
|
||||
x += cv[i_cv]->sup_coeff * (cvm::pow(current_cv_value.real_value, cv[i_cv]->sup_np));
|
||||
} else {
|
||||
x += cv[i_cv]->sup_coeff * current_cv_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::linearCombination::calc_gradients() {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
cv[i_cv]->calc_gradients();
|
||||
if ( cv[i_cv]->is_enabled(f_cvc_explicit_gradient) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable_com)) {
|
||||
cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
|
||||
for (size_t j_elem = 0; j_elem < cv[i_cv]->value().size(); ++j_elem) {
|
||||
for (size_t k_ag = 0 ; k_ag < cv[i_cv]->atom_groups.size(); ++k_ag) {
|
||||
for (size_t l_atom = 0; l_atom < (cv[i_cv]->atom_groups)[k_ag]->size(); ++l_atom) {
|
||||
(*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad = factor_polynomial * (*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::linearCombination::apply_force(colvarvalue const &force) {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// If this CV us explicit gradients, then atomic gradients is already calculated
|
||||
// We can apply the force to atom groups directly
|
||||
if ( cv[i_cv]->is_enabled(f_cvc_explicit_gradient) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable_com)
|
||||
) {
|
||||
for (size_t k_ag = 0 ; k_ag < cv[i_cv]->atom_groups.size(); ++k_ag) {
|
||||
(cv[i_cv]->atom_groups)[k_ag]->apply_colvar_force(force.real_value);
|
||||
}
|
||||
} else {
|
||||
// Compute factors for polynomial combinations
|
||||
cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
|
||||
colvarvalue cv_force = force.real_value * factor_polynomial;
|
||||
cv[i_cv]->apply_force(cv_force);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
colvar::CVBasedPath::CVBasedPath(std::string const &conf): cvc(conf) {
|
||||
GeometricPathCV::init_string_cv_map(string_cv_map);
|
||||
// Lookup all available sub-cvcs
|
||||
for (auto it_cv_map = string_cv_map.begin(); it_cv_map != string_cv_map.end(); ++it_cv_map) {
|
||||
if (key_lookup(conf, it_cv_map->first.c_str())) {
|
||||
std::vector<std::string> sub_cvc_confs;
|
||||
get_key_string_multi_value(conf, it_cv_map->first.c_str(), sub_cvc_confs);
|
||||
for (auto it_sub_cvc_conf = sub_cvc_confs.begin(); it_sub_cvc_conf != sub_cvc_confs.end(); ++it_sub_cvc_conf) {
|
||||
cv.push_back((it_cv_map->second)(*(it_sub_cvc_conf)));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sort all sub CVs by their names
|
||||
std::sort(cv.begin(), cv.end(), compareColvarComponent);
|
||||
// Register atom groups and determine the colvar type for reference
|
||||
std::vector<colvarvalue> tmp_cv;
|
||||
for (auto it_sub_cv = cv.begin(); it_sub_cv != cv.end(); ++it_sub_cv) {
|
||||
for (auto it_atom_group = (*it_sub_cv)->atom_groups.begin(); it_atom_group != (*it_sub_cv)->atom_groups.end(); ++it_atom_group) {
|
||||
register_atom_group(*it_atom_group);
|
||||
}
|
||||
colvarvalue tmp_i_cv((*it_sub_cv)->value());
|
||||
tmp_i_cv.reset();
|
||||
tmp_cv.push_back(tmp_i_cv);
|
||||
}
|
||||
// Read path file
|
||||
// Lookup all reference CV values
|
||||
std::string path_filename;
|
||||
get_keyval(conf, "pathFile", path_filename);
|
||||
cvm::log(std::string("Reading path file: ") + path_filename + std::string("\n"));
|
||||
std::ifstream ifs_path(path_filename);
|
||||
if (!ifs_path.is_open()) {
|
||||
cvm::error("Error: failed to open path file.\n");
|
||||
}
|
||||
std::string line;
|
||||
const std::string token(" ");
|
||||
total_reference_frames = 0;
|
||||
while (std::getline(ifs_path, line)) {
|
||||
std::vector<std::string> fields;
|
||||
split_string(line, token, fields);
|
||||
size_t num_value_required = 0;
|
||||
for (size_t i_cv = 0; i_cv < tmp_cv.size(); ++i_cv) {
|
||||
const size_t value_size = tmp_cv[i_cv].size();
|
||||
num_value_required += value_size;
|
||||
cvm::log(std::string("Reading CV ") + cv[i_cv]->name + std::string(" with ") + cvm::to_str(value_size) + std::string(" value(s)\n"));
|
||||
if (num_value_required <= fields.size()) {
|
||||
size_t start_index = num_value_required - value_size;
|
||||
for (size_t i = start_index; i < num_value_required; ++i) {
|
||||
tmp_cv[i_cv][i] = std::atof(fields[i].c_str());
|
||||
cvm::log(fields[i] + std::string(" "));
|
||||
}
|
||||
cvm::log(std::string("\n"));
|
||||
} else {
|
||||
cvm::error("Error: incorrect format of path file.\n");
|
||||
}
|
||||
}
|
||||
if (!fields.empty()) {
|
||||
ref_cv.push_back(tmp_cv);
|
||||
++total_reference_frames;
|
||||
}
|
||||
}
|
||||
x.type(colvarvalue::type_scalar);
|
||||
use_explicit_gradients = true;
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
if (!cv[i_cv]->is_enabled(f_cvc_explicit_gradient)) {
|
||||
use_explicit_gradients = false;
|
||||
}
|
||||
}
|
||||
if (!use_explicit_gradients) {
|
||||
disable(f_cvc_explicit_gradient);
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::CVBasedPath::computeReferenceDistance(std::vector<cvm::real>& result) {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
cv[i_cv]->calc_value();
|
||||
}
|
||||
for (size_t i_frame = 0; i_frame < ref_cv.size(); ++i_frame) {
|
||||
cvm::real rmsd_i = 0.0;
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
colvarvalue ref_cv_value(ref_cv[i_frame][i_cv]);
|
||||
colvarvalue current_cv_value(cv[i_cv]->value());
|
||||
// polynomial combination allowed
|
||||
if (current_cv_value.type() == colvarvalue::type_scalar) {
|
||||
// wrapping is already in dist2
|
||||
rmsd_i += cv[i_cv]->dist2(cv[i_cv]->sup_coeff * (cvm::pow(current_cv_value.real_value, cv[i_cv]->sup_np)), ref_cv_value.real_value);
|
||||
} else {
|
||||
rmsd_i += cv[i_cv]->dist2(cv[i_cv]->sup_coeff * current_cv_value, ref_cv_value);
|
||||
}
|
||||
}
|
||||
rmsd_i /= cvm::real(cv.size());
|
||||
rmsd_i = cvm::sqrt(rmsd_i);
|
||||
result[i_frame] = rmsd_i;
|
||||
}
|
||||
}
|
||||
|
||||
cvm::real colvar::CVBasedPath::getPolynomialFactorOfCVGradient(size_t i_cv) const {
|
||||
cvm::real factor_polynomial = 1.0;
|
||||
if (cv[i_cv]->value().type() == colvarvalue::type_scalar) {
|
||||
factor_polynomial = cv[i_cv]->sup_coeff * cv[i_cv]->sup_np * cvm::pow(cv[i_cv]->value().real_value, cv[i_cv]->sup_np - 1);
|
||||
} else {
|
||||
factor_polynomial = cv[i_cv]->sup_coeff;
|
||||
}
|
||||
return factor_polynomial;
|
||||
}
|
||||
|
||||
colvar::CVBasedPath::~CVBasedPath() {
|
||||
for (auto it = cv.begin(); it != cv.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
}
|
||||
|
||||
colvar::gspathCV::gspathCV(std::string const &conf): CVBasedPath(conf) {
|
||||
function_type = "gspathCV";
|
||||
cvm::log(std::string("Total number of frames: ") + cvm::to_str(total_reference_frames) + std::string("\n"));
|
||||
// Initialize variables for future calculation
|
||||
get_keyval(conf, "useSecondClosestFrame", use_second_closest_frame, true);
|
||||
if (use_second_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the second closest frame to compute s_(m-1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the neighbouring frame to compute s_(m-1)\n"));
|
||||
}
|
||||
get_keyval(conf, "useThirdClosestFrame", use_third_closest_frame, false);
|
||||
if (use_third_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the third closest frame to compute s_(m+1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path s(σ) will use the neighbouring frame to compute s_(m+1)\n"));
|
||||
}
|
||||
GeometricPathCV::GeometricPathBase<colvarvalue, cvm::real, GeometricPathCV::path_sz::S>::initialize(cv.size(), ref_cv[0], total_reference_frames, use_second_closest_frame, use_third_closest_frame);
|
||||
x.type(colvarvalue::type_scalar);
|
||||
use_explicit_gradients = true;
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
if (!cv[i_cv]->is_enabled(f_cvc_explicit_gradient)) {
|
||||
use_explicit_gradients = false;
|
||||
}
|
||||
}
|
||||
if (!use_explicit_gradients) {
|
||||
cvm::log("Geometric path s(σ) will use implicit gradients.\n");
|
||||
disable(f_cvc_explicit_gradient);
|
||||
}
|
||||
}
|
||||
|
||||
colvar::gspathCV::~gspathCV() {}
|
||||
|
||||
void colvar::gspathCV::updateReferenceDistances() {
|
||||
computeReferenceDistance(frame_distances);
|
||||
}
|
||||
|
||||
void colvar::gspathCV::prepareVectors() {
|
||||
// Compute v1, v2 and v3
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// values of sub-cvc are computed in update_distances
|
||||
// cv[i_cv]->calc_value();
|
||||
colvarvalue f1_ref_cv_i_value(ref_cv[min_frame_index_1][i_cv]);
|
||||
colvarvalue f2_ref_cv_i_value(ref_cv[min_frame_index_2][i_cv]);
|
||||
colvarvalue current_cv_value(cv[i_cv]->value());
|
||||
// polynomial combination allowed
|
||||
if (current_cv_value.type() == colvarvalue::type_scalar) {
|
||||
v1[i_cv] = f1_ref_cv_i_value.real_value - cv[i_cv]->sup_coeff * (cvm::pow(current_cv_value.real_value, cv[i_cv]->sup_np));
|
||||
v2[i_cv] = cv[i_cv]->sup_coeff * (cvm::pow(current_cv_value.real_value, cv[i_cv]->sup_np)) - f2_ref_cv_i_value.real_value;
|
||||
} else {
|
||||
v1[i_cv] = f1_ref_cv_i_value - cv[i_cv]->sup_coeff * current_cv_value;
|
||||
v2[i_cv] = cv[i_cv]->sup_coeff * current_cv_value - f2_ref_cv_i_value;
|
||||
}
|
||||
cv[i_cv]->wrap(v1[i_cv]);
|
||||
cv[i_cv]->wrap(v2[i_cv]);
|
||||
}
|
||||
if (min_frame_index_3 < 0 || min_frame_index_3 > M) {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
v3[i_cv] = ref_cv[min_frame_index_1][i_cv] - ref_cv[min_frame_index_2][i_cv];
|
||||
cv[i_cv]->wrap(v3[i_cv]);
|
||||
}
|
||||
} else {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
v3[i_cv] = ref_cv[min_frame_index_3][i_cv] - ref_cv[min_frame_index_1][i_cv];
|
||||
cv[i_cv]->wrap(v3[i_cv]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gspathCV::calc_value() {
|
||||
computeValue();
|
||||
x = s;
|
||||
}
|
||||
|
||||
void colvar::gspathCV::calc_gradients() {
|
||||
computeDerivatives();
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// No matter whether the i-th cv uses implicit gradient, compute it first.
|
||||
cv[i_cv]->calc_gradients();
|
||||
// If the gradient is not implicit, then add the gradients to its atom groups
|
||||
if ( cv[i_cv]->is_enabled(f_cvc_explicit_gradient) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable_com)) {
|
||||
// Temporary variables storing gradients
|
||||
colvarvalue tmp_cv_grad_v1(cv[i_cv]->value());
|
||||
colvarvalue tmp_cv_grad_v2(cv[i_cv]->value());
|
||||
// Compute factors for polynomial combinations
|
||||
cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
|
||||
// Loop over all elements of the corresponding colvar value
|
||||
for (size_t j_elem = 0; j_elem < cv[i_cv]->value().size(); ++j_elem) {
|
||||
// ds/dz, z = vector of CVs
|
||||
tmp_cv_grad_v1[j_elem] = -1.0 * sign * 0.5 * dfdv1[i_cv][j_elem] / M;
|
||||
tmp_cv_grad_v2[j_elem] = sign * 0.5 * dfdv2[i_cv][j_elem] / M;
|
||||
// Apply the gradients to the atom groups in i-th cv
|
||||
// Loop over all atom groups
|
||||
for (size_t k_ag = 0 ; k_ag < cv[i_cv]->atom_groups.size(); ++k_ag) {
|
||||
// Loop over all atoms in the k-th atom group
|
||||
for (size_t l_atom = 0; l_atom < (cv[i_cv]->atom_groups)[k_ag]->size(); ++l_atom) {
|
||||
// Chain rule
|
||||
(*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad = factor_polynomial * ((*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad * tmp_cv_grad_v1[j_elem] + (*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad * tmp_cv_grad_v2[j_elem]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gspathCV::apply_force(colvarvalue const &force) {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// If this CV us explicit gradients, then atomic gradients is already calculated
|
||||
// We can apply the force to atom groups directly
|
||||
if ( cv[i_cv]->is_enabled(f_cvc_explicit_gradient) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable_com)
|
||||
) {
|
||||
for (size_t k_ag = 0 ; k_ag < cv[i_cv]->atom_groups.size(); ++k_ag) {
|
||||
(cv[i_cv]->atom_groups)[k_ag]->apply_colvar_force(force.real_value);
|
||||
}
|
||||
} else {
|
||||
// Temporary variables storing gradients
|
||||
colvarvalue tmp_cv_grad_v1(cv[i_cv]->value());
|
||||
colvarvalue tmp_cv_grad_v2(cv[i_cv]->value());
|
||||
// Compute factors for polynomial combinations
|
||||
cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
|
||||
for (size_t j_elem = 0; j_elem < cv[i_cv]->value().size(); ++j_elem) {
|
||||
// ds/dz, z = vector of CVs
|
||||
tmp_cv_grad_v1[j_elem] = -1.0 * sign * 0.5 * dfdv1[i_cv][j_elem] / M;
|
||||
tmp_cv_grad_v2[j_elem] = sign * 0.5 * dfdv2[i_cv][j_elem] / M;
|
||||
}
|
||||
colvarvalue cv_force = force.real_value * factor_polynomial * (tmp_cv_grad_v1 + tmp_cv_grad_v2);
|
||||
cv[i_cv]->apply_force(cv_force);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
colvar::gzpathCV::gzpathCV(std::string const &conf): CVBasedPath(conf) {
|
||||
function_type = "gzpathCV";
|
||||
cvm::log(std::string("Total number of frames: ") + cvm::to_str(total_reference_frames) + std::string("\n"));
|
||||
// Initialize variables for future calculation
|
||||
M = cvm::real(total_reference_frames - 1);
|
||||
m = 1.0;
|
||||
get_keyval(conf, "useSecondClosestFrame", use_second_closest_frame, true);
|
||||
if (use_second_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the second closest frame to compute s_(m-1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the neighbouring frame to compute s_(m-1)\n"));
|
||||
}
|
||||
get_keyval(conf, "useThirdClosestFrame", use_third_closest_frame, false);
|
||||
if (use_third_closest_frame == true) {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the third closest frame to compute s_(m+1)\n"));
|
||||
} else {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the neighbouring frame to compute s_(m+1)\n"));
|
||||
}
|
||||
bool b_use_z_square = false;
|
||||
get_keyval(conf, "useZsquare", b_use_z_square, false);
|
||||
if (b_use_z_square == true) {
|
||||
cvm::log(std::string("Geometric path z(σ) will use the square of distance from current frame to path compute z\n"));
|
||||
}
|
||||
GeometricPathCV::GeometricPathBase<colvarvalue, cvm::real, GeometricPathCV::path_sz::Z>::initialize(cv.size(), ref_cv[0], total_reference_frames, use_second_closest_frame, use_third_closest_frame, b_use_z_square);
|
||||
x.type(colvarvalue::type_scalar);
|
||||
use_explicit_gradients = true;
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
if (!cv[i_cv]->is_enabled(f_cvc_explicit_gradient)) {
|
||||
use_explicit_gradients = false;
|
||||
}
|
||||
}
|
||||
if (!use_explicit_gradients) {
|
||||
cvm::log("Geometric path z(σ) will use implicit gradients.\n");
|
||||
disable(f_cvc_explicit_gradient);
|
||||
}
|
||||
}
|
||||
|
||||
colvar::gzpathCV::~gzpathCV() {
|
||||
}
|
||||
|
||||
void colvar::gzpathCV::updateReferenceDistances() {
|
||||
computeReferenceDistance(frame_distances);
|
||||
}
|
||||
|
||||
void colvar::gzpathCV::prepareVectors() {
|
||||
// Compute v1, v2 and v3
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// values of sub-cvc are computed in update_distances
|
||||
// cv[i_cv]->calc_value();
|
||||
colvarvalue f1_ref_cv_i_value(ref_cv[min_frame_index_1][i_cv]);
|
||||
colvarvalue f2_ref_cv_i_value(ref_cv[min_frame_index_2][i_cv]);
|
||||
colvarvalue current_cv_value(cv[i_cv]->value());
|
||||
// polynomial combination allowed
|
||||
if (current_cv_value.type() == colvarvalue::type_scalar) {
|
||||
v1[i_cv] = f1_ref_cv_i_value.real_value - cv[i_cv]->sup_coeff * (cvm::pow(current_cv_value.real_value, cv[i_cv]->sup_np));
|
||||
v2[i_cv] = cv[i_cv]->sup_coeff * (cvm::pow(current_cv_value.real_value, cv[i_cv]->sup_np)) - f2_ref_cv_i_value.real_value;
|
||||
} else {
|
||||
v1[i_cv] = f1_ref_cv_i_value - cv[i_cv]->sup_coeff * current_cv_value;
|
||||
v2[i_cv] = cv[i_cv]->sup_coeff * current_cv_value - f2_ref_cv_i_value;
|
||||
}
|
||||
v4[i_cv] = f1_ref_cv_i_value - f2_ref_cv_i_value;
|
||||
cv[i_cv]->wrap(v1[i_cv]);
|
||||
cv[i_cv]->wrap(v2[i_cv]);
|
||||
cv[i_cv]->wrap(v4[i_cv]);
|
||||
}
|
||||
if (min_frame_index_3 < 0 || min_frame_index_3 > M) {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
v3[i_cv] = ref_cv[min_frame_index_1][i_cv] - ref_cv[min_frame_index_2][i_cv];
|
||||
cv[i_cv]->wrap(v3[i_cv]);
|
||||
}
|
||||
} else {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
v3[i_cv] = ref_cv[min_frame_index_3][i_cv] - ref_cv[min_frame_index_1][i_cv];
|
||||
cv[i_cv]->wrap(v3[i_cv]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gzpathCV::calc_value() {
|
||||
computeValue();
|
||||
x = z;
|
||||
}
|
||||
|
||||
void colvar::gzpathCV::calc_gradients() {
|
||||
computeDerivatives();
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// No matter whether the i-th cv uses implicit gradient, compute it first.
|
||||
cv[i_cv]->calc_gradients();
|
||||
// If the gradient is not implicit, then add the gradients to its atom groups
|
||||
if ( cv[i_cv]->is_enabled(f_cvc_explicit_gradient) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable_com)) {
|
||||
// Temporary variables storing gradients
|
||||
colvarvalue tmp_cv_grad_v1 = -1.0 * dzdv1[i_cv];
|
||||
colvarvalue tmp_cv_grad_v2 = 1.0 * dzdv2[i_cv];
|
||||
// Compute factors for polynomial combinations
|
||||
cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
|
||||
for (size_t j_elem = 0; j_elem < cv[i_cv]->value().size(); ++j_elem) {
|
||||
// Apply the gradients to the atom groups in i-th cv
|
||||
// Loop over all atom groups
|
||||
for (size_t k_ag = 0 ; k_ag < cv[i_cv]->atom_groups.size(); ++k_ag) {
|
||||
// Loop over all atoms in the k-th atom group
|
||||
for (size_t l_atom = 0; l_atom < (cv[i_cv]->atom_groups)[k_ag]->size(); ++l_atom) {
|
||||
// Chain rule
|
||||
(*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad = factor_polynomial * ((*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad * tmp_cv_grad_v1[j_elem] + (*(cv[i_cv]->atom_groups)[k_ag])[l_atom].grad * tmp_cv_grad_v2[j_elem]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void colvar::gzpathCV::apply_force(colvarvalue const &force) {
|
||||
for (size_t i_cv = 0; i_cv < cv.size(); ++i_cv) {
|
||||
// If this CV us explicit gradients, then atomic gradients is already calculated
|
||||
// We can apply the force to atom groups directly
|
||||
if ( cv[i_cv]->is_enabled(f_cvc_explicit_gradient) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable) &&
|
||||
!cv[i_cv]->is_enabled(f_cvc_scalable_com)) {
|
||||
for (size_t k_ag = 0 ; k_ag < cv[i_cv]->atom_groups.size(); ++k_ag) {
|
||||
(cv[i_cv]->atom_groups)[k_ag]->apply_colvar_force(force.real_value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
colvarvalue tmp_cv_grad_v1 = -1.0 * dzdv1[i_cv];
|
||||
colvarvalue tmp_cv_grad_v2 = 1.0 * dzdv2[i_cv];
|
||||
// Temporary variables storing gradients
|
||||
// Compute factors for polynomial combinations
|
||||
cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
|
||||
colvarvalue cv_force = force.real_value * factor_polynomial * (tmp_cv_grad_v1 + tmp_cv_grad_v2);
|
||||
cv[i_cv]->apply_force(cv_force);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GeometricPathCV::init_string_cv_map(std::map<std::string, std::function<colvar::cvc* (const std::string& subcv_conf)>>& string_cv_map) {
|
||||
string_cv_map["distance"] = [](const std::string& conf){return new colvar::distance(conf);};
|
||||
string_cv_map["dihedral"] = [](const std::string& conf){return new colvar::dihedral(conf);};
|
||||
string_cv_map["angle"] = [](const std::string& conf){return new colvar::angle(conf);};
|
||||
string_cv_map["rmsd"] = [](const std::string& conf){return new colvar::rmsd(conf);};
|
||||
string_cv_map["gyration"] = [](const std::string& conf){return new colvar::gyration(conf);};
|
||||
string_cv_map["inertia"] = [](const std::string& conf){return new colvar::inertia(conf);};
|
||||
string_cv_map["inertiaZ"] = [](const std::string& conf){return new colvar::inertia_z(conf);};
|
||||
string_cv_map["tilt"] = [](const std::string& conf){return new colvar::tilt(conf);};
|
||||
string_cv_map["distanceZ"] = [](const std::string& conf){return new colvar::distance_z(conf);};
|
||||
string_cv_map["distanceXY"] = [](const std::string& conf){return new colvar::distance_xy(conf);};
|
||||
string_cv_map["polarTheta"] = [](const std::string& conf){return new colvar::polar_theta(conf);};
|
||||
string_cv_map["polarPhi"] = [](const std::string& conf){return new colvar::polar_phi(conf);};
|
||||
string_cv_map["distanceVec"] = [](const std::string& conf){return new colvar::distance_vec(conf);};
|
||||
string_cv_map["orientationAngle"] = [](const std::string& conf){return new colvar::orientation_angle(conf);};
|
||||
string_cv_map["distancePairs"] = [](const std::string& conf){return new colvar::distance_pairs(conf);};
|
||||
string_cv_map["dipoleMagnitude"] = [](const std::string& conf){return new colvar::dipole_magnitude(conf);};
|
||||
string_cv_map["coordNum"] = [](const std::string& conf){return new colvar::coordnum(conf);};
|
||||
string_cv_map["selfCoordNum"] = [](const std::string& conf){return new colvar::selfcoordnum(conf);};
|
||||
string_cv_map["dipoleAngle"] = [](const std::string& conf){return new colvar::dipole_angle(conf);};
|
||||
string_cv_map["orientation"] = [](const std::string& conf){return new colvar::orientation(conf);};
|
||||
string_cv_map["orientationProj"] = [](const std::string& conf){return new colvar::orientation_proj(conf);};
|
||||
string_cv_map["eigenvector"] = [](const std::string& conf){return new colvar::eigenvector(conf);};
|
||||
string_cv_map["cartesian"] = [](const std::string& conf){return new colvar::cartesian(conf);};
|
||||
string_cv_map["alpha"] = [](const std::string& conf){return new colvar::alpha_angles(conf);};
|
||||
string_cv_map["dihedralPC"] = [](const std::string& conf){return new colvar::dihedPC(conf);};
|
||||
string_cv_map["linearCombination"] = [](const std::string& conf){return new colvar::linearCombination(conf);};
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -7,6 +7,8 @@
|
||||
// If you wish to distribute your changes, please submit them to the
|
||||
// Colvars repository at GitHub.
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "colvarmodule.h"
|
||||
#include "colvarvalue.h"
|
||||
#include "colvarparse.h"
|
||||
|
||||
@ -109,7 +109,9 @@ cvm::real colvar_grid_scalar::entropy() const
|
||||
{
|
||||
cvm::real sum = 0.0;
|
||||
for (size_t i = 0; i < nt; i++) {
|
||||
sum += -1.0 * data[i] * cvm::logn(data[i]);
|
||||
if (data[i] >0) {
|
||||
sum += -1.0 * data[i] * cvm::logn(data[i]);
|
||||
}
|
||||
}
|
||||
cvm::real bin_volume = 1.0;
|
||||
for (size_t id = 0; id < widths.size(); id++) {
|
||||
|
||||
@ -557,11 +557,11 @@ public:
|
||||
data[i] *= a;
|
||||
}
|
||||
|
||||
/// \brief Assign all zero elements a scalar constant (fast loop)
|
||||
inline void remove_zeros(cvm::real const &a)
|
||||
/// \brief Assign values that are smaller than scalar constant the latter value (fast loop)
|
||||
inline void remove_small_values(cvm::real const &a)
|
||||
{
|
||||
for (size_t i = 0; i < nt; i++)
|
||||
if(data[i]==0) data[i] = a;
|
||||
if(data[i]<a) data[i] = a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
// If you wish to distribute your changes, please submit them to the
|
||||
// Colvars repository at GitHub.
|
||||
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
@ -58,6 +57,28 @@ bool colvarparse::get_key_string_value(std::string const &conf,
|
||||
return b_found_any;
|
||||
}
|
||||
|
||||
bool colvarparse::get_key_string_multi_value(std::string const &conf,
|
||||
char const *key, std::vector<std::string>& data)
|
||||
{
|
||||
bool b_found = false, b_found_any = false;
|
||||
size_t save_pos = 0, found_count = 0;
|
||||
|
||||
data.clear();
|
||||
|
||||
do {
|
||||
std::string data_this = "";
|
||||
b_found = key_lookup(conf, key, &data_this, &save_pos);
|
||||
if (b_found) {
|
||||
if (!b_found_any)
|
||||
b_found_any = true;
|
||||
found_count++;
|
||||
data.push_back(data_this);
|
||||
}
|
||||
} while (b_found);
|
||||
|
||||
return b_found_any;
|
||||
}
|
||||
|
||||
|
||||
template<typename TYPE>
|
||||
void colvarparse::mark_key_set_user(std::string const &key_str,
|
||||
@ -843,3 +864,18 @@ int colvarparse::check_braces(std::string const &conf,
|
||||
}
|
||||
return (brace_count != 0) ? INPUT_ERROR : COLVARS_OK;
|
||||
}
|
||||
|
||||
void colvarparse::split_string(const std::string& data, const std::string& delim, std::vector<std::string>& dest) {
|
||||
size_t index = 0, new_index = 0;
|
||||
std::string tmpstr;
|
||||
while (index != data.length()) {
|
||||
new_index = data.find(delim, index);
|
||||
if (new_index != std::string::npos) tmpstr = data.substr(index, new_index - index);
|
||||
else tmpstr = data.substr(index, data.length());
|
||||
if (!tmpstr.empty()) {
|
||||
dest.push_back(tmpstr);
|
||||
}
|
||||
if (new_index == std::string::npos) break;
|
||||
index = new_index + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,6 +212,10 @@ protected:
|
||||
bool get_key_string_value(std::string const &conf,
|
||||
char const *key, std::string &data);
|
||||
|
||||
/// Get multiple strings from repeated instances of a same keyword
|
||||
bool get_key_string_multi_value(std::string const &conf,
|
||||
char const *key, std::vector<std::string>& data);
|
||||
|
||||
/// Template for single-value keyword parsers
|
||||
template<typename TYPE>
|
||||
bool _get_keyval_scalar_(std::string const &conf,
|
||||
@ -322,6 +326,12 @@ public:
|
||||
/// from this position
|
||||
static int check_braces(std::string const &conf, size_t const start_pos);
|
||||
|
||||
/// \brief Split a string with a specified delimiter into a vector
|
||||
/// \param data The string to be splitted
|
||||
/// \param delim A delimiter
|
||||
/// \param dest A destination vector to store the splitted results
|
||||
static void split_string(const std::string& data, const std::string& delim, std::vector<std::string>& dest);
|
||||
|
||||
protected:
|
||||
|
||||
/// \brief List of legal keywords for this object: this is updated
|
||||
|
||||
@ -7,8 +7,14 @@
|
||||
// If you wish to distribute your changes, please submit them to the
|
||||
// Colvars repository at GitHub.
|
||||
|
||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <cerrno>
|
||||
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#include <omp.h>
|
||||
@ -704,6 +710,27 @@ std::ostream * colvarproxy_io::output_stream(std::string const &output_name,
|
||||
if (cvm::debug()) {
|
||||
cvm::log("Using colvarproxy::output_stream()\n");
|
||||
}
|
||||
|
||||
std::ostream *os = get_output_stream(output_name);
|
||||
if (os != NULL) return os;
|
||||
|
||||
if (!(mode & (std::ios_base::app | std::ios_base::ate))) {
|
||||
backup_file(output_name);
|
||||
}
|
||||
std::ofstream *osf = new std::ofstream(output_name.c_str(), mode);
|
||||
if (!osf->is_open()) {
|
||||
cvm::error("Error: cannot write to file/channel \""+output_name+"\".\n",
|
||||
FILE_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
output_stream_names.push_back(output_name);
|
||||
output_files.push_back(osf);
|
||||
return osf;
|
||||
}
|
||||
|
||||
|
||||
std::ostream *colvarproxy_io::get_output_stream(std::string const &output_name)
|
||||
{
|
||||
std::list<std::ostream *>::iterator osi = output_files.begin();
|
||||
std::list<std::string>::iterator osni = output_stream_names.begin();
|
||||
for ( ; osi != output_files.end(); osi++, osni++) {
|
||||
@ -711,21 +738,11 @@ std::ostream * colvarproxy_io::output_stream(std::string const &output_name,
|
||||
return *osi;
|
||||
}
|
||||
}
|
||||
if (!(mode & (std::ios_base::app | std::ios_base::ate))) {
|
||||
backup_file(output_name);
|
||||
}
|
||||
std::ofstream *os = new std::ofstream(output_name.c_str(), mode);
|
||||
if (!os->is_open()) {
|
||||
cvm::error("Error: cannot write to file/channel \""+output_name+"\".\n",
|
||||
FILE_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
output_stream_names.push_back(output_name);
|
||||
output_files.push_back(os);
|
||||
return os;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int colvarproxy_io::flush_output_stream(std::ostream *os)
|
||||
{
|
||||
std::list<std::ostream *>::iterator osi = output_files.begin();
|
||||
@ -761,10 +778,45 @@ int colvarproxy_io::close_output_stream(std::string const &output_name)
|
||||
|
||||
int colvarproxy_io::backup_file(char const *filename)
|
||||
{
|
||||
// TODO implement this using rename_file()
|
||||
return COLVARS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
int colvarproxy_io::remove_file(char const *filename)
|
||||
{
|
||||
if (std::remove(filename)) {
|
||||
if (errno != ENOENT) {
|
||||
return cvm::error("Error: in removing file \""+std::string(filename)+
|
||||
"\".\n.",
|
||||
FILE_ERROR);
|
||||
}
|
||||
}
|
||||
return COLVARS_OK;
|
||||
}
|
||||
|
||||
|
||||
int colvarproxy_io::rename_file(char const *filename, char const *newfilename)
|
||||
{
|
||||
int error_code = COLVARS_OK;
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
// On straight Windows, must remove the destination before renaming it
|
||||
error_code |= remove_file(newfilename);
|
||||
#endif
|
||||
int rename_exit_code = 0;
|
||||
while ((rename_exit_code = std::rename(filename, newfilename)) != 0) {
|
||||
if (errno == EINTR) continue;
|
||||
// Call log() instead of error to allow the next try
|
||||
cvm::log("Error: in renaming file \""+std::string(filename)+"\" to \""+
|
||||
std::string(newfilename)+"\".\n.");
|
||||
error_code |= FILE_ERROR;
|
||||
if (errno == EXDEV) continue;
|
||||
break;
|
||||
}
|
||||
return rename_exit_code ? error_code : COLVARS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
colvarproxy::colvarproxy()
|
||||
{
|
||||
@ -826,4 +878,3 @@ int colvarproxy::get_version_from_string(char const *version_string)
|
||||
is >> newint;
|
||||
return newint;
|
||||
}
|
||||
|
||||
|
||||
@ -571,7 +571,10 @@ public:
|
||||
/// if this is not open already, then open it
|
||||
virtual std::ostream *output_stream(std::string const &output_name,
|
||||
std::ios_base::openmode mode =
|
||||
std::ios_base::out);
|
||||
std::ios_base::out);
|
||||
|
||||
/// Returns a reference to output_name if it exists, NULL otherwise
|
||||
virtual std::ostream *get_output_stream(std::string const &output_name);
|
||||
|
||||
/// \brief Flushes the given output channel
|
||||
virtual int flush_output_stream(std::ostream *os);
|
||||
@ -588,6 +591,25 @@ public:
|
||||
return backup_file(filename.c_str());
|
||||
}
|
||||
|
||||
/// Remove the given file
|
||||
int remove_file(char const *filename);
|
||||
|
||||
/// Remove the given file
|
||||
inline int remove_file(std::string const &filename)
|
||||
{
|
||||
return remove_file(filename.c_str());
|
||||
}
|
||||
|
||||
/// Rename the given file
|
||||
int rename_file(char const *filename, char const *newfilename);
|
||||
|
||||
/// Rename the given file
|
||||
inline int rename_file(std::string const &filename,
|
||||
std::string const &newfilename)
|
||||
{
|
||||
return rename_file(filename.c_str(), newfilename.c_str());
|
||||
}
|
||||
|
||||
/// \brief Prefix of the input state file
|
||||
inline std::string & input_prefix()
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef COLVARS_VERSION
|
||||
#define COLVARS_VERSION "2019-04-26"
|
||||
#define COLVARS_VERSION "2019-08-01"
|
||||
// This file is part of the Collective Variables module (Colvars).
|
||||
// The original version of Colvars and its updates are located at:
|
||||
// https://github.com/colvars/colvars
|
||||
|
||||
@ -208,6 +208,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
MPI_Comm_size(world,&nmpi);
|
||||
if (nmpi > 0) {
|
||||
|
||||
#if defined(MPI_VERSION) && (MPI_VERSION > 2)
|
||||
// Check for IBM Spectrum MPI
|
||||
|
||||
int len;
|
||||
@ -226,6 +227,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
if (me == 0)
|
||||
error->warning(FLERR,"The Spectrum MPI '-gpu' flag is not set. Disabling CUDA-aware MPI");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cuda_aware_flag == 1 && have_cuda_aware == 0) {
|
||||
if (me == 0)
|
||||
@ -234,10 +236,10 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
cuda_aware_flag = 0;
|
||||
} else if (have_cuda_aware == -1) { // maybe we are dealing with MPICH, MVAPICH2 or some derivative?
|
||||
// MVAPICH2
|
||||
#if (defined MPICH) && (defined MVAPICH2_VERSION)
|
||||
#if defined(MPICH) && defined(MVAPICH2_VERSION)
|
||||
char* str;
|
||||
cuda_aware_flag = 0;
|
||||
if (str = getenv("MV2_ENABLE_CUDA")
|
||||
if ((str = getenv("MV2_ENABLE_CUDA")))
|
||||
if ((strcmp(str,"1") == 0))
|
||||
cuda_aware_flag = 1;
|
||||
|
||||
@ -245,7 +247,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
if (me == 0)
|
||||
error->warning(FLERR,"MVAPICH2 'MV2_ENABLE_CUDA' environment variable is not set. Disabling CUDA-aware MPI");
|
||||
// pure MPICH or some unsupported MPICH derivative
|
||||
#elif (defined MPICH) && !(defined MVAPICH2_VERSION)
|
||||
#elif defined(MPICH) && !defined(MVAPICH2_VERSION)
|
||||
if (me == 0)
|
||||
error->warning(FLERR,"Detected MPICH. Disabling CUDA-aware MPI");
|
||||
cuda_aware_flag = 0;
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
#include "finish.h"
|
||||
#include "timer.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -70,6 +71,10 @@ void Temper::command(int narg, char **arg)
|
||||
nevery = force->inumeric(FLERR,arg[1]);
|
||||
double temp = force->numeric(FLERR,arg[2]);
|
||||
|
||||
// ignore temper command, if walltime limit was already reached
|
||||
|
||||
if (timer->is_timeout()) return;
|
||||
|
||||
for (whichfix = 0; whichfix < modify->nfix; whichfix++)
|
||||
if (strcmp(arg[3],modify->fix[whichfix]->id) == 0) break;
|
||||
if (whichfix == modify->nfix)
|
||||
@ -94,39 +99,18 @@ void Temper::command(int narg, char **arg)
|
||||
// fix style must be appropriate for temperature control, i.e. it needs
|
||||
// to provide a working Fix::reset_target() and must not change the volume.
|
||||
|
||||
if ((strcmp(modify->fix[whichfix]->style,"nvt") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/asphere") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/asphere/omp") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/body") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/eff") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/intel") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/kk") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/kk/host") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/kk/device") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/omp") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/sphere") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"nvt/sphere/omp") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"langevin") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"langevin/drude") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"langevin/eff") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"gld") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"gle") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"rigid/nvt") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"rigid/nvt/small") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"rigid/nvt/omp") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"rigid/nvt/small/omp") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/berendsen") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/berendsen/cuda") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/csvr") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/csld") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/rescale") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/rescale/cuda") != 0) &&
|
||||
(strcmp(modify->fix[whichfix]->style,"temp/rescale/eff") != 0))
|
||||
if ((!utils::strmatch(modify->fix[whichfix]->style,"^nvt")) &&
|
||||
(!utils::strmatch(modify->fix[whichfix]->style,"^langevin")) &&
|
||||
(!utils::strmatch(modify->fix[whichfix]->style,"^gl[de]$")) &&
|
||||
(!utils::strmatch(modify->fix[whichfix]->style,"^rigid/nvt")) &&
|
||||
(!utils::strmatch(modify->fix[whichfix]->style,"^temp/")))
|
||||
error->universe_all(FLERR,"Tempering temperature fix is not supported");
|
||||
|
||||
// setup for long tempering run
|
||||
|
||||
update->whichflag = 1;
|
||||
timer->init_timeout();
|
||||
|
||||
update->nsteps = nsteps;
|
||||
update->beginstep = update->firststep = update->ntimestep;
|
||||
update->endstep = update->laststep = update->firststep + nsteps;
|
||||
@ -233,7 +217,9 @@ void Temper::command(int narg, char **arg)
|
||||
|
||||
// run for nevery timesteps
|
||||
|
||||
timer->init_timeout();
|
||||
update->integrate->run(nevery);
|
||||
if (timer->is_timeout()) break;
|
||||
|
||||
// compute PE
|
||||
// notify compute it will be called at next swap
|
||||
|
||||
@ -59,6 +59,9 @@ enum{NOBIAS,BIAS};
|
||||
enum{NONE,XYZ,XY,YZ,XZ};
|
||||
enum{ISO,ANISO,TRICLINIC};
|
||||
|
||||
// NB: Keep error and warning messages less than 255 chars long.
|
||||
const int MAX_MESSAGE_LENGTH = 256;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
NVT,NPH,NPT integrators for improved Nose-Hoover equations of motion
|
||||
---------------------------------------------------------------------- */
|
||||
@ -630,24 +633,32 @@ int FixBocs::read_F_table( char *filename, int p_basis_type )
|
||||
double **data = (double **) calloc(N_columns,sizeof(double *));
|
||||
char * line = (char *) calloc(200,sizeof(char));
|
||||
|
||||
bool badInput = false;
|
||||
char badDataMsg[MAX_MESSAGE_LENGTH];
|
||||
fpi = fopen(filename,"r");
|
||||
if (fpi)
|
||||
{
|
||||
while (fgets(line,199,fpi)) { ++n_entries; }
|
||||
fclose(fpi);
|
||||
|
||||
for (i = 0; i < N_columns; ++i)
|
||||
{
|
||||
data[i] = (double *) calloc(n_entries,sizeof(double));
|
||||
}
|
||||
} else {
|
||||
char errmsg[128];
|
||||
snprintf(errmsg,128,"Unable to open file: %s\n",filename);
|
||||
error->all(FLERR,errmsg);
|
||||
}
|
||||
|
||||
n_entries = 0;
|
||||
fpi = fopen(filename,"r");
|
||||
if (fpi) {
|
||||
// Don't need to re-open the file to make a second pass through it
|
||||
// simply rewind to beginning
|
||||
rewind(fpi);
|
||||
|
||||
double stdVolumeInterval = 0.0;
|
||||
double currVolumeInterval = 0.0;
|
||||
// When comparing doubles/floats, we need an Epsilon.
|
||||
// The literature indicates getting this value right in the
|
||||
// general case can be pretty complicated. I don't think it
|
||||
// needs to be complicated here, though. At least based on the
|
||||
// sample data I've seen where the volume values are fairly
|
||||
// large.
|
||||
const double volumeIntervalTolerance = 0.001;
|
||||
n_entries = 0;
|
||||
while( fgets(line,199,fpi)) {
|
||||
++n_entries;
|
||||
test_sscanf = sscanf(line," %f , %f ",&f1, &f2);
|
||||
@ -655,19 +666,47 @@ int FixBocs::read_F_table( char *filename, int p_basis_type )
|
||||
{
|
||||
data[0][n_entries-1] = (double) f1;
|
||||
data[1][n_entries-1] = (double) f2;
|
||||
if (n_entries == 2) {
|
||||
stdVolumeInterval = data[0][n_entries-1] - data[0][n_entries-2];
|
||||
}
|
||||
else if (n_entries > 2) {
|
||||
currVolumeInterval = data[0][n_entries-1] - data[0][n_entries-2];
|
||||
if (fabs(currVolumeInterval - stdVolumeInterval) > volumeIntervalTolerance) {
|
||||
snprintf(badDataMsg,MAX_MESSAGE_LENGTH,
|
||||
"BAD VOLUME INTERVAL: spline analysis requires uniform"
|
||||
" volume distribution, found inconsistent volume"
|
||||
" differential, line %d of file %s\n\tline: %s",
|
||||
n_entries,filename,line);
|
||||
error->message(FLERR,badDataMsg);
|
||||
badInput = true;
|
||||
}
|
||||
}
|
||||
// no else -- first entry is simply ignored
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr,"WARNING: did not find 2 comma separated values in "
|
||||
"line %d of file %s\n\tline: %s",n_entries,filename,line);
|
||||
snprintf(badDataMsg,MAX_MESSAGE_LENGTH,
|
||||
"BAD INPUT FORMAT: did not find 2 comma separated numeric"
|
||||
" values in line %d of file %s\n\tline: %s",
|
||||
n_entries,filename,line);
|
||||
error->message(FLERR,badDataMsg);
|
||||
badInput = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
char errmsg[128];
|
||||
snprintf(errmsg,128,"Unable to open file: %s\n",filename);
|
||||
fclose(fpi);
|
||||
}
|
||||
else {
|
||||
char errmsg[MAX_MESSAGE_LENGTH];
|
||||
snprintf(errmsg,MAX_MESSAGE_LENGTH,"Unable to open file: %s\n",filename);
|
||||
error->all(FLERR,errmsg);
|
||||
}
|
||||
|
||||
if (badInput) {
|
||||
char errmsg[MAX_MESSAGE_LENGTH];
|
||||
snprintf(errmsg,MAX_MESSAGE_LENGTH,
|
||||
"Bad volume / pressure-correction data: %s\nSee details above",filename);
|
||||
error->all(FLERR,errmsg);
|
||||
}
|
||||
fclose(fpi);
|
||||
|
||||
if (p_basis_type == 1)
|
||||
{
|
||||
@ -691,9 +730,10 @@ int FixBocs::read_F_table( char *filename, int p_basis_type )
|
||||
}
|
||||
else
|
||||
{
|
||||
char * errmsg = (char *) calloc(70,sizeof(char));
|
||||
sprintf(errmsg,"ERROR: invalid p_basis_type value "
|
||||
"of %d in read_F_table",p_basis_type);
|
||||
char errmsg[MAX_MESSAGE_LENGTH];
|
||||
snprintf(errmsg, MAX_MESSAGE_LENGTH,
|
||||
"ERROR: invalid p_basis_type value of %d in read_F_table",
|
||||
p_basis_type);
|
||||
error->all(FLERR,errmsg);
|
||||
}
|
||||
// cleanup
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef COLVARPROXY_VERSION
|
||||
#define COLVARPROXY_VERSION "2019-04-09"
|
||||
#define COLVARPROXY_VERSION "2019-08-01"
|
||||
// This file is part of the Collective Variables module (Colvars).
|
||||
// The original version of Colvars and its updates are located at:
|
||||
// https://github.com/colvars/colvars
|
||||
|
||||
@ -352,15 +352,15 @@ void FixIntel::init()
|
||||
if (_offload_balance != 0.0) off_mode = 1;
|
||||
if (_precision_mode == PREC_MODE_SINGLE) {
|
||||
_single_buffers->zero_ev();
|
||||
_single_buffers->grow_ncache(off_mode,_nthreads);
|
||||
_single_buffers->grow_ncache(off_mode, comm->nthreads);
|
||||
_single_buffers->free_list_ptrs();
|
||||
} else if (_precision_mode == PREC_MODE_MIXED) {
|
||||
_mixed_buffers->zero_ev();
|
||||
_mixed_buffers->grow_ncache(off_mode,_nthreads);
|
||||
_mixed_buffers->grow_ncache(off_mode, comm->nthreads);
|
||||
_mixed_buffers->free_list_ptrs();
|
||||
} else {
|
||||
_double_buffers->zero_ev();
|
||||
_double_buffers->grow_ncache(off_mode,_nthreads);
|
||||
_double_buffers->grow_ncache(off_mode, comm->nthreads);
|
||||
_double_buffers->free_list_ptrs();
|
||||
}
|
||||
|
||||
|
||||
@ -2223,7 +2223,9 @@ public:
|
||||
}
|
||||
|
||||
VEC_INLINE static ivec unpackloepi32(const fvec &a) {
|
||||
return reinterpret_cast<const int*>(&a.val_)[0];
|
||||
union { int i; flt_t f; } atype;
|
||||
atype.f = a.val_;
|
||||
return ivec(atype.i);
|
||||
}
|
||||
|
||||
VEC_INLINE static fvec mask_sincos(
|
||||
|
||||
@ -451,7 +451,6 @@ void PairEAMIntel::eval(const int offload, const int vflag,
|
||||
|
||||
if (tid == 0)
|
||||
comm->forward_comm_pair(this);
|
||||
if (NEWTON_PAIR) memset(f + minlocal, 0, f_stride * sizeof(FORCE_T));
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp barrier
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -34,9 +34,10 @@ class PairILPGrapheneHBN : public Pair {
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
void init_style();
|
||||
void ILP_neigh();
|
||||
void calc_normal();
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
void calc_FRep(int, int);
|
||||
void calc_FvdW(int, int);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
|
||||
protected:
|
||||
@ -74,7 +75,6 @@ class PairILPGrapheneHBN : public Pair {
|
||||
|
||||
void read_file( char * );
|
||||
void allocate();
|
||||
void ILP_neigh();
|
||||
|
||||
/* ----Calculate the long-range cutoff term */
|
||||
inline double calc_Tap(double r_ij, double Rcut) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -34,9 +34,10 @@ class PairKolmogorovCrespiFull : public Pair {
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
void init_style();
|
||||
void KC_neigh();
|
||||
void calc_normal();
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
void calc_FRep(int, int);
|
||||
void calc_FvdW(int, int);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
|
||||
protected:
|
||||
@ -75,7 +76,6 @@ class PairKolmogorovCrespiFull : public Pair {
|
||||
|
||||
void read_file( char * );
|
||||
void allocate();
|
||||
void KC_neigh();
|
||||
|
||||
|
||||
/* ----Calculate the long-range cutoff term */
|
||||
|
||||
@ -71,6 +71,9 @@ void TemperGrem::command(int narg, char **arg)
|
||||
nevery = force->inumeric(FLERR,arg[1]);
|
||||
double lambda = force->numeric(FLERR,arg[2]);
|
||||
|
||||
// ignore temper command, if walltime limit was already reached
|
||||
if (timer->is_timeout()) return;
|
||||
|
||||
// Get and check if gREM fix exists
|
||||
for (whichfix = 0; whichfix < modify->nfix; whichfix++)
|
||||
if (strcmp(arg[3],modify->fix[whichfix]->id) == 0) break;
|
||||
@ -127,6 +130,8 @@ void TemperGrem::command(int narg, char **arg)
|
||||
// setup for long tempering run
|
||||
|
||||
update->whichflag = 1;
|
||||
timer->init_timeout();
|
||||
|
||||
update->nsteps = nsteps;
|
||||
update->beginstep = update->firststep = update->ntimestep;
|
||||
update->endstep = update->laststep = update->firststep + nsteps;
|
||||
@ -234,7 +239,9 @@ void TemperGrem::command(int narg, char **arg)
|
||||
|
||||
// run for nevery timesteps
|
||||
|
||||
timer->init_timeout();
|
||||
update->integrate->run(nevery);
|
||||
if (timer->is_timeout()) break;
|
||||
|
||||
// compute PE
|
||||
// notify compute it will be called at next swap
|
||||
@ -242,7 +249,6 @@ void TemperGrem::command(int narg, char **arg)
|
||||
pe = pe_compute->compute_scalar();
|
||||
pe_compute->addstep(update->ntimestep + nevery);
|
||||
|
||||
|
||||
// which = which of 2 kinds of swaps to do (0,1)
|
||||
|
||||
if (!ranswap) which = iswap % 2;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "finish.h"
|
||||
#include "timer.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -73,6 +74,10 @@ void TemperNPT::command(int narg, char **arg)
|
||||
double temp = force->numeric(FLERR,arg[2]);
|
||||
double press_set = force->numeric(FLERR,arg[6]);
|
||||
|
||||
// ignore temper command, if walltime limit was already reached
|
||||
|
||||
if (timer->is_timeout()) return;
|
||||
|
||||
for (whichfix = 0; whichfix < modify->nfix; whichfix++)
|
||||
if (strcmp(arg[3],modify->fix[whichfix]->id) == 0) break;
|
||||
if (whichfix == modify->nfix)
|
||||
@ -97,13 +102,15 @@ void TemperNPT::command(int narg, char **arg)
|
||||
// change the volume. This currently only applies to fix npt and
|
||||
// fix rigid/npt variants
|
||||
|
||||
if ((strncmp(modify->fix[whichfix]->style,"npt",3) != 0)
|
||||
&& (strncmp(modify->fix[whichfix]->style,"rigid/npt",9) != 0))
|
||||
if ( (!utils::strmatch(modify->fix[whichfix]->style,"^npt")) &&
|
||||
(!utils::strmatch(modify->fix[whichfix]->style,"^rigid/npt")) )
|
||||
error->universe_all(FLERR,"Tempering temperature and pressure fix is not supported");
|
||||
|
||||
// setup for long tempering run
|
||||
|
||||
update->whichflag = 1;
|
||||
timer->init_timeout();
|
||||
|
||||
update->nsteps = nsteps;
|
||||
update->beginstep = update->firststep = update->ntimestep;
|
||||
update->endstep = update->laststep = update->firststep + nsteps;
|
||||
@ -211,7 +218,9 @@ void TemperNPT::command(int narg, char **arg)
|
||||
|
||||
// run for nevery timesteps
|
||||
|
||||
timer->init_timeout();
|
||||
update->integrate->run(nevery);
|
||||
if (timer->is_timeout()) break;
|
||||
|
||||
// compute PE
|
||||
// notify compute it will be called at next swap
|
||||
|
||||
@ -31,7 +31,7 @@ class ThrData {
|
||||
|
||||
public:
|
||||
ThrData(int tid, class Timer *t);
|
||||
~ThrData() { delete _timer; _timer = nullptr; };
|
||||
~ThrData() { delete _timer; _timer = NULL; };
|
||||
|
||||
void check_tid(int); // thread id consistency check
|
||||
int get_tid() const { return _tid; }; // our thread id.
|
||||
@ -136,7 +136,7 @@ class ThrData {
|
||||
|
||||
// disabled default methods
|
||||
private:
|
||||
ThrData() : _tid(-1), _timer(nullptr) {};
|
||||
ThrData() : _tid(-1), _timer(NULL) {};
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -42,5 +42,3 @@ action fix_phonon.cpp fft3d_wrap.h
|
||||
action fix_phonon.h fft3d_wrap.h
|
||||
action dynamical_matrix.cpp
|
||||
action dynamical_matrix.h
|
||||
action third_order.cpp
|
||||
action third_order.h
|
||||
|
||||
@ -15,6 +15,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
#include "ptm_deformation_gradient.h"
|
||||
#include "ptm_fundamental_mappings.h"
|
||||
#include "ptm_alt_templates.h"
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
namespace ptm {
|
||||
|
||||
@ -19,6 +19,10 @@
|
||||
#include "output.h"
|
||||
#include "input.h"
|
||||
|
||||
#if defined(LAMMPS_EXCEPTIONS)
|
||||
#include "update.h"
|
||||
#endif
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
// helper function to truncate a string to a segment starting with "src/";
|
||||
|
||||
@ -354,10 +354,15 @@ void Info::command(int narg, char **arg)
|
||||
|
||||
if (flags & COMM) {
|
||||
int major,minor,len;
|
||||
#if (defined(MPI_VERSION) && (MPI_VERSION > 2)) || defined(MPI_STUBS)
|
||||
char version[MPI_MAX_LIBRARY_VERSION_STRING];
|
||||
MPI_Get_library_version(version,&len);
|
||||
#else
|
||||
char version[] = "Undetected MPI implementation";
|
||||
len = strlen(version);
|
||||
#endif
|
||||
|
||||
MPI_Get_version(&major,&minor);
|
||||
MPI_Get_library_version(version,&len);
|
||||
if (len > 80) {
|
||||
char *ptr = strchr(version+80,'\n');
|
||||
if (ptr) *ptr = '\0';
|
||||
|
||||
@ -38,6 +38,10 @@
|
||||
#include "force.h"
|
||||
#include "info.h"
|
||||
|
||||
#if defined(LAMMPS_EXCEPTIONS)
|
||||
#include "exceptions.h"
|
||||
#endif
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@ -806,7 +810,10 @@ void lammps_gather_atoms(void *ptr, char * /*name */,
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
lmp->error->all(FLERR,"Library function lammps_gather_atoms() not compatible with -DLAMMPS_BIGBIG");
|
||||
{
|
||||
lmp->error->all(FLERR,"Library function lammps_gather_atoms() "
|
||||
"is not compatible with -DLAMMPS_BIGBIG");
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
#else
|
||||
@ -944,7 +951,10 @@ void lammps_gather_atoms_concat(void *ptr, char * /*name */,
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
lmp->error->all(FLERR,"Library function lammps_gather_atoms_concat() not compatible with -DLAMMPS_BIGBIG");
|
||||
{
|
||||
lmp->error->all(FLERR,"Library function lammps_gather_atoms_concat() "
|
||||
"is not compatible with -DLAMMPS_BIGBIG");
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
#else
|
||||
@ -1101,7 +1111,10 @@ void lammps_gather_atoms_subset(void *ptr, char * /*name */,
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
lmp->error->all(FLERR,"Library function lammps_gather_atoms_subset() not compatible with -DLAMMPS_BIGBIG");
|
||||
{
|
||||
lmp->error->all(FLERR,"Library function lammps_gather_atoms_subset() "
|
||||
"is not compatible with -DLAMMPS_BIGBIG");
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
#else
|
||||
@ -1247,7 +1260,10 @@ void lammps_scatter_atoms(void *ptr, char * /*name */,
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
lmp->error->all(FLERR,"Library function lammps_scatter_atoms() not compatible with -DLAMMPS_BIGBIG");
|
||||
{
|
||||
lmp->error->all(FLERR,"Library function lammps_scatter_atoms() "
|
||||
"is not compatible with -DLAMMPS_BIGBIG");
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
#else
|
||||
@ -1373,7 +1389,10 @@ void lammps_scatter_atoms_subset(void *ptr, char * /*name */,
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
lmp->error->all(FLERR,"Library function lammps_scatter_atoms_subset() not compatible with -DLAMMPS_BIGBIG");
|
||||
{
|
||||
lmp->error->all(FLERR,"Library function lammps_scatter_atoms_subset() "
|
||||
"is not compatible with -DLAMMPS_BIGBIG");
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
#else
|
||||
|
||||
@ -23,6 +23,10 @@
|
||||
#include <fftw3.h>
|
||||
#endif
|
||||
|
||||
#if defined(LAMMPS_EXCEPTIONS)
|
||||
#include "exceptions.h"
|
||||
#endif
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -1 +1 @@
|
||||
#define LAMMPS_VERSION "31 Jul 2019"
|
||||
#define LAMMPS_VERSION "2 Aug 2019"
|
||||
|
||||
Reference in New Issue
Block a user