Skip to content

Instantly share code, notes, and snippets.

@kaityo256
Last active October 8, 2024 01:48
Show Gist options
  • Save kaityo256/f10236ec035ff539cbe87cab854ae6c6 to your computer and use it in GitHub Desktop.
Save kaityo256/f10236ec035ff539cbe87cab854ae6c6 to your computer and use it in GitHub Desktop.
LAMMPSのBondのサンプルファイル
LAMMPS data file
2 atoms
1 bonds
1 atom types
1 bond types
-10 10 xlo xhi
-10 10 ylo yhi
-10 10 zlo zhi
Masses
1 1.0
Atoms
1 1 1 -1.0 0.0 0.0
2 1 1 1.0 0.0 0.0
Velocities
1 0 1 0
2 0 -1 0
Bonds
1 1 1 2
units lj
atom_style bond
boundary p p p
timestep 0.001
read_data bond.atoms
mass 1 1.0
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
bond_style harmonic
bond_coeff 1 100 1.0
fix 1 all nve
dump id all atom 5 bond.lammpstrj
run 1000
@kaityo256
Copy link
Author

bond.inputとbond.atomsを同じディレクトリに置いた状態で以下を実行。

$ /home/apps/lammps/lmp_mpi_bond <bond.input
LAMMPS (27 Jun 2024 - Development - patch_27Jun2024-956-g6e791034f9-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
  using 1 OpenMP thread(s) per MPI task
Reading data file ...
  orthogonal box = (-10 -10 -10) to (10 10 10)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  2 atoms
  reading velocities ...
  2 velocities
  scanning bonds ...
  1 = max bonds/atom
  orthogonal box = (-10 -10 -10) to (10 10 10)
  1 by 1 by 1 MPI processor grid
  reading bonds ...
  1 bonds
Finding 1-2 1-3 1-4 neighbors ...
  special bond factors lj:    0        0        0       
  special bond factors coul:  0        0        0       
     1 = 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.000 seconds
  read_data CPU = 0.004 seconds

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

Your simulation uses code contributions which should be cited:
- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419
The log file lists these citations in BibTeX format.

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
  update: every = 1 steps, delay = 0 steps, check = yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 2.8
  ghost atom cutoff = 2.8
  binsize = 1.4, bins = 15 15 15
  1 neighbor lists, perpetual/occasional/extra = 1 0 0
  (1) pair lj/cut, perpetual
      attributes: half, newton on
      pair build: half/bin/newton
      stencil: half/bin/3d
      bin: standard
Setting up Verlet run ...
  Unit style    : lj
  Current step  : 0
  Time step     : 0.001
Per MPI rank memory allocation (min/avg/max) = 4.091 | 4.091 | 4.091 Mbytes
   Step          Temp          E_pair         E_mol          TotEng         Press     
         0   0.66666667     0              50             50.5          -0.016583333  
      1000   32.41142       0              26.189063      50.497628     -0.0063444776 
Loop time of 0.0143863 on 1 procs for 1000 steps with 2 atoms

Performance: 6005726.711 tau/day, 69510.726 timesteps/s, 139.021 katom-step/s
64.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    | 0.0011783  | 0.0011783  | 0.0011783  |   0.0 |  8.19
Bond    | 0.0012407  | 0.0012407  | 0.0012407  |   0.0 |  8.62
Neigh   | 0.000776   | 0.000776   | 0.000776   |   0.0 |  5.39
Comm    | 0.002358   | 0.002358   | 0.002358   |   0.0 | 16.39
Output  | 0.0026793  | 0.0026793  | 0.0026793  |   0.0 | 18.62
Modify  | 0.0024021  | 0.0024021  | 0.0024021  |   0.0 | 16.70
Other   |            | 0.003752   |            |       | 26.08

Nlocal:              2 ave           2 max           2 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:              0 ave           0 max           0 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

Total # of neighbors = 0
Ave neighs/atom = 0
Ave special neighs/atom = 1
Neighbor list builds = 47
Dangerous builds = 0
Total wall time: 0:00:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment