-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibefp.html
479 lines (475 loc) · 19.6 KB
/
libefp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<!DOCTYPE html>
<html>
<!-- General information and directives of this page. -->
<head>
<title>Carlos H. Borca - Resources - LibEFP</title>
<link href="styles/main.css" rel="stylesheet" type="text/css"/>
</head>
<!-- Links menu in english. -->
<ul class="nav">
<li><a href="index.html"/>Main</a></li>
<li><a href="about.html"/>About</a></li>
<li><a href="research.html"/>Research</a></li>
<li><a href="people.html"/>People</a></li>
<li><a href="publications.html"/>Publications</a></li>
<li><a href="events.html"/>Events</a></li>
<li><a href="outreach.html"/>Outreach</a></li>
<li><a href="resources.html"/><b>Resources</b></a></li>
<li><a href="libpfe.html"/>Español</a></li>
</ul>
<!-- Title and stylish image background. -->
<div>
<img style="border: 0px solid; width: 100%; height: auto;"
title="Header"
src="design/header.png"
alt="" hspace="0" vspace="0"/>
</div>
<!-- This is where the content of the page starts. -->
<div class="resources" align="justify">
<center><h1>Resources: <font color="gray">LibEFP</font></h1></center>
</div>
<!-- Resources menu in english. -->
<ul class="resources">
<li><a href="libefp.html"/><b>LibEFP</b></a></li>
<!-- <li><a href="gromacs.html"/>GROMACS</a></li> -->
<li><a href="octopus.html"/>Octopus</a></li>
<!-- <li><a href="q-chem.html"/>Q-Chem</a></li> -->
<!-- <li><a href="gamess.html"/>GAMESS</a></li> -->
<!-- <li><a href="psi4.html"/>Psi4</a></li> -->
<!-- <li><a href="mopac.html"/>MOPAC2016</a></li> -->
</ul>
<div class="resources" align="justify">
<h2>Contents</h2>
<ol><li><a href="libefp.html#What"/>What is LibEFP?</a></li>
<li><a href="libefp.html#LibEFP">LibEFP Web Page</a></li>
<li><a href="libefp.html#How">How to compile LibEFP 1.5.0?</a>
<ol><li><a href="libefp.html#Ubuntu">On Ubuntu 18.04 LTS</a>
<ol><li><a href="libefp.html#Ubuntu-Preparing">Preparing the operative system</a></li>
<li><a href="libefp.html#Ubuntu-Installing">Installing required basic software and libraries</a></li>
<li><a href="libefp.html#Ubuntu-Cleaning">Cleaning unused libraries</a></li>
<li><a href="libefp.html#Ubuntu-Cloning">Cloning the GitHub repository</a></li>
<li><a href="libefp.html#Ubuntu-Contents">Contents of the <em class="code">config.inc</em> file</a></li>
<li><a href="libefp.html#Ubuntu-Compilation">Compilation</a></li>
<li><a href="libefp.html#Ubuntu-Paths">Creating paths for LibEFP</a></li>
</ol>
</li>
<li><a href="libefp.html#RCAC">On Clusters of the Rosen Center for Advanced Computing (RCAC) at Purdue University</a>
<ol><li><a href="libefp.html#RCAC-Cloning">Cloning the GitHub repository</a></li>
<li><a href="libefp.html#RCAC-Contents">Contents of the <em class="code">config.inc</em> file</a></li>
<li><a href="libefp.html#RCAC-Loading">Loading required modules (Developers subversion on RCAC's Carter)</a></li>
<li><a href="libefp.html#RCAC-Compilation">Compilation</a></li>
</ol>
</li>
</ol>
</li>
<li><a href="libefp.html#Run">How to run LibEFP?</a>
<ol><li><a href="libefp.html#Run-Input">LibEFP/EFPMD input template</a></li>
<li><a href="libefp.html#Run-PBS">LibEFP/EFPMD PBS file template to run in the RCAC clusters at Purdue University</a></li>
</ol>
</li>
</ol>
<h2><a name="What">What is LibEFP?</a></h2>
<p>
LibEFP is a full implementation of the Effective Fragment Potential (EFP) method (EFP can be viewed as an advanced first-principles-based force-field, see <a href="http://dx.doi.org/10.1002/jcc.23375"/>Kaliman et al., JCC, 2013</a>). LibEFP facilitates extension of unique electronic structure methodologies designed for accurate simulations in the gas phase to condensed phases via QM/EFP. LibEFP is designed to give developers of quantum chemistry software an easy way to add EFP support to their favorite package.
</p>
<h2><a name="LibEFP">LibEFP Web Page</a></h2>
<p>
To find more detailed information about LibEFP, go to: <a href="http://www.libefp.org/"/>libefp - The Effective Fragment Potential method implementation</a>
</p>
<h2><a name="How">How to compile LibEFP 1.5.0?</a></h2>
<h3><a name="Ubuntu">On Ubuntu 18.04 LTS</a></h3>
<p>
This is an effective method to compile LibEFP on <a href="http://www.ubuntu.com/desktop"/>Ubuntu Desktop 18.04 LTS</a>. This set of instructions asumes you start with a fresh installation of Ubuntu Desktop 18.04 LTS. Consequently, some of the steps described here, such as the installation of libraries, may not be required for your system. This procedure was last tested on June 1st, 2018:
</p>
<h4><a name="Ubuntu-Preparing">Preparing the operative system</a></h4>
<p>
Make sure your system is up-to-date.
</p>
<div class="code">
sudo apt update<br>
sudo apt upgrade<br>
sudo apt dist-upgrade<br>
</div>
<h4><a name="Ubuntu-Installing">Installing required basic software and libraries</a></h4>
<p>
Install compilers.
</p>
<div class="code">
sudo apt install build-essential<br>
sudo apt install gfortran<br>
</div>
<p>
Install Math Libraries.
</p>
<div class="code">
sudo apt install libatlas-base-dev<br>
sudo apt install libblas-dev<br>
sudo apt install liblapack-dev<br>
</div>
<p>
Install MPI.
</p>
<div class="code">
sudo apt install mpich<br>
sudo apt install mpich-doc<br>
</div>
<p>
Install Git.
</p>
<div class="code">
sudo apt install git<br>
</div>
<h4><a name="Ubuntu-Cleaning">Cleaning unused libraries</a></h4>
<p>
Clean after yourself (optional).
</p>
<div class="code">
sudo apt autoremove<br>
sudo apt autoclean<br>
sudo apt clean<br>
</div>
<h4><a name="Ubuntu-Cloning">Cloning the GitHub repository</a></h4>
<p>
First, go to the directory where you want to download the source code, for example:
</p>
<div class="code">
cd ~/Gits/
</div>
<p>
To compile LibEFP 1.5.0, you need to get the files for installation. This can be done using Git.
</p>
<div class="code">
git clone <a href="https://github.com/libefp/libefp"/>git://github.com/libefp/libefp.git</a>
</div>
<p>
This will create a directory named <em class="code">libefp</em> in your present working directory. You may want to rename it to include the version and other details of the code you are to compile:
</p>
<div class="code">
mv libefp libefp-1.5.0-2018.06.01
</div>
</p>
To explore the contents of the code go to the directory you just renamed.
</p>
<div class="code">
cd ~/Gits/libefp-1.5.0-2018.06.01/
</div>
<h4><a name="Ubuntu-Contents">Contents of the <em class="code">config.inc</em> file</a></h4>
<p>
You also need a configuration file. This <em class="code">config.inc</em> file contains a set of instructions for the system to recognize the compilers, installation directory, and other options.
</p>
<p>
Several templates can be found in the <em class="code">config/</em> directory.
</p>
<p>
This is an example of the configuration file, based on <em class="code">gcc-netlib-openmpi.inc</em>:
</p>
<div class="code">
# C compiler<br>
CC= mpicc<br>
<br>
# Fortran compiler<br>
FC= gfortran<br>
<br>
# install prefix<br>
PREFIX= /home/carlosborca/libefp<br>
<br>
# fragment library path<br>
FRAGLIB= $(PREFIX)/fraglib-installed<br>
<br>
# additional link libraries<br>
MYLIBS= -lblas -llapack -lgfortran<br>
<br>
# additional linker flags<br>
MYLDFLAGS=<br>
<br>
# additional C flags<br>
MYCFLAGS= -DEFP_USE_MPI -std=c99 -O3 -g -fopenmp<br>
<br>
# additional Fortran flags<br>
MYFFLAGS= -g<br>
</div>
<h4><a name="Ubuntu-Compilation">Compilation</a></h4>
<p>
Compilation should be straightforward now. First you will run the <em class="code">make</em> command. This will verify that all things are in order and try compilation of the whole package (if you only need the library, not the Molecular Dynamics engine <em class="code">EFPMD</em>, you can use <em class="code">make libefp</em>, instead).
</p>
<div class="code">
make
</div>
<p>
If <em class="code">make</em> did not result in error, you may now check that the compiled code is running properly. That is done by executing a series of preloaded test calculations that run through a script called with the <em class="code">make check</em> commands. You should at least perform the first one:
</p>
<div class="code">
make check
</div>
<p>
To test OpenMP parallel code (Parallelization between cores):
</p>
<div class="code">
make checkomp
</div>
<p>
To test MPI parallel code (Parallelization between nodes):
</p>
<div class="code">
make checkmpi
</div>
<p>
Finally, to install the program in the <em class="code">$(PREFIX)</em> directory, run the <em class="code">make install</em> command.
</p>
<div class="code">
make install
</div>
<h4><a name="Ubuntu-Paths">Creating paths for LibEFP</a></h4>
<p>
If you installed the library in directory different than the default, you may need to create paths for LibEFP binaries on your <em class="code">.bashrc</em> (optional).
</p>
<div class="code">
export PATH="/home/carlosborca/libefp/bin:$PATH"
</div>
<h3><a name="RCAC">On Clusters of the Rosen Center for Advanced Computing at Purdue University</a></h3>
<h4><a name="RCAC-Cloning">Cloning the GitHub repository</a></h4>
<p>
First, go to the LibEFP directory inside the Apps directory of the Slipchenko Group:
</p>
<div class="code">
cd /group/lslipche/apps/libefp/
</div>
<p>
To compile LibEFP 1.4.2, you need to get the files for installation. This can be done using Git.
</p>
<div class="code">
git clone <a href="https://github.com/libefp/libefp"/>git://github.com/libefp/libefp.git</a>
</div>
<p>
This will create a directory named <em class="code">libefp</em> in your present working directory. You may want to rename it to include the version and other details of the compilation you are about to execute:
</p>
<div class="code">
mv libefp libefp-1.4.2-beta-2017.05.23
</div>
</p>
To explore the contents of the code go to the directory you just renamed.
</p>
<div class="code">
cd /group/lslipche/apps/libefp/libefp-1.4.2-beta-2017.05.23/
</div>
<h4><a name="RCAC-Contents">Contents of the <em class="code">config.inc</em> file</a></h4>
<p>
You also need a configuration file. This <em class="code">config.inc</em> file contains all the instructions for the system to recognize the compilers, installation directory, and other options.
</p>
<p>
An example of such file is given below:
</p>
<div class="code">
# C compiler<br>
CC= mpicc<br>
<br>
# Fortran compiler<br>
FC= ifort<br>
<br>
# install prefix<br>
PREFIX= /group/lslipche/apps/libefp/libefp-1.4.2-beta-2017.05.23<br>
<br>
# fragment library path<br>
FRAGLIB= $(PREFIX)/fraglib-installed<br>
<br>
# additional link libraries<br>
MYLIBS= -lifcore<br>
<br>
# additional linker flags<br>
MYLDFLAGS=<br>
<br>
# additional C flags<br>
MYCFLAGS= -DWITH_MPI -std=c99 -O3 -g -mkl=sequential -fopenmp<br>
<br>
# additional Fortran flags<br>
MYFFLAGS= -g<br>
<br>
# ar command<br>
AR= ar rc<br>
<br>
# ranlib command<br>
RANLIB= ranlib<br>
<br>
# rm command<br>
RM= rm -f<br>
<br>
# tags program<br>
CTAGS= ctags<br>
<br>
# tags file<br>
TAGS= tags<br>
</div>
<h4><a name="RCAC-Loading">Loading required modules (Developers subversion on RCAC's Carter)</a></h4>
</p>
If compiling on RCAC's Carter, you need to load the environmental variables for the Intel Compiler suite and OpenMPI. You can do that with the following commands:
</p>
<div class="code">
module load intel<br>
module load openmpi<br>
</div>
<h4><a name="RCAC-Compilation">Compilation</a></h4>
<p>
Compilation should be now straightforward. First you will run the <em class="code">make</em> command. This will verify that all things are in order for compilation of the whole package (if you only need the library you can use <em class="code">make libefp</em>, instead.).
</p>
<div class="code">
make
</div>
<p>
If <em class="code">make</em> did not result in error, you may now check that the program is running properly. That is done by executing a series of preloaded calculations that run through a script called with the <em class="code">make check</em> commands. You should at least perform the first one:
</p>
<div class="code">
make check
</div>
<p>
To test OpenMP parallel code (Parallelization between cores):
</p>
<div class="code">
make check-omp
</div>
<p>
To test MPI parallel code (Parallelization between nodes):
</p>
<div class="code">
make check-mpi
</div>
<p>
Finally, to compile the whole program, run the <em class="code">make install</em> command.
</p>
<div class="code">
make install
</div>
<h2><a name="Run">How to run LibEFP?</a></h2>
<p>
If the library has been already compiled properly, to run a LibEFP job the user will need and input file and a parameters file <em class="code">.efp</em>.
</p>
<p>
With the parameters file located in the same directory as the input file, LibEFP jobs can be run using the command:
</p>
<div class="code">
libefp LibEFP_INPUT_NAME.in > LibEFP_OUTPUT_NAME.out
</div>
<p>
EFP-MD jobs can be run with the command:
</p>
<div class="code">
efpmd EFPMD_INPUT_NAME.in > EFPMD_OUTPUT_NAME.out
</div>
<p>
More options can be found below.
</p>
<h3><a name="Run-Input">LibEFP/EFPMD input template</a></h3>
<p>
A short example of an NPT EFP-MD run input file:
</p>
<div class="code">
run_type md<br>
ensemble npt<br>
time_step 2<br>
print_step 1<br>
velocitize true<br>
pressure 1.0<br>
coord points<br>
terms elec pol disp xr<br>
elec_damp overlap<br>
disp_damp overlap<br>
pol_damp tt<br>
enable_pbc true<br>
periodic_box 30.0 30.0 30.0<br>
enable_cutoff true<br>
swf_cutoff 10<br>
max_steps 250000<br>
userlib_path .<br>
temperature 300<br>
<br>
fragment water<br>
-0.533 -2.036 -1.134<br>
0.341 -1.814 -1.517<br>
-0.337 -2.300 -0.211<br>
<br>
fragment water<br>
-0.398 1.367 -1.467<br>
0.387 0.828 -1.697<br>
-0.112 1.901 -0.696<br>
<br>
fragment water<br>
2.127 0.178 0.834<br>
1.680 1.046 0.921<br>
1.483 -0.381 0.351<br>
<br>
fragment water<br>
-1.318 0.502 1.736<br>
-0.520 0.717 2.262<br>
-1.006 -0.146 1.070<br>
</div>
<h3><a name="Run-PBS">LibEFP/EFPMD PBS file template to run in the RCAC clusters at Purdue University</a></h3>
<p>
Several versions of LibEFP are already properly compiled in the RCAC clusters. To run a LibEFP job through the PBS queueing service the user can use the following template:
</p>
<div class="code">
#!/bin/bash -l<br>
# FILENAME: EFPMD_JOB_NAME.pbs<br>
<br>
# SHORT NAME OF THE JOB<br>
#PBS -N EFPMD_JOB_NAME<br>
<br>
# DECLARE THIS AS A NON-RERUNABLE JOB<br>
#PBS -r n<br>
<br>
# NAME OF THE QUEUE IN USE<br>
#PBS -q yourqueue<br>
<br>
# USER EMAIL FOR JOB STATUS UPDATES<br>
#PBS -M [email protected]<br>
<br>
# SEND UPDATES WHEN ABORTING AND EXITING<br>
#PBS -m ae<br>
<br>
# AMOUNT OF RESERVED TIME IN THE COMMUNITY CLUSTER (ONE WEEK = 168 HOURS)<br>
#PBS -l walltime=24:00:00<br>
<br>
# AMOUNT OF NODES AND PROCESSORS PER NODE REQUESTED<br>
#PBS -l nodes=4:ppn=16<br>
<br>
# AMOUNT OF MEMORY (FOR ALL THE PROCESSORS) REQUESTED. OPTIONAL.<br>
#PBS -l mem=128000MB<br>
<br>
# LOAD INTEL AND OPENMPI LIBRARIES<br>
module load intel<br>
module load openmpi<br>
<br>
# STORE PBS VARIABLES TO A FILE<br>
cat $PBS_NODEFILE | uniq > pbsnodefile.$PBS_JOBID<br>
<br>
# ENABLE PARALLEL COMPUTATION UP TO THE DESIRED NUMBER OF PARALLEL THREADS<br>
export OMP_NUM_THREADS=16<br>
<br>
# CHANGE TO THE DIRECTORY FROM WHICH YOU ORIGINALLY SUBMITTED THIS JOB<br>
cd $PBS_O_WORKDIR<br>
<br>
# EXECUTE 'EFPMD_JOB_NAME_EFPMD.in' WITH LIBEFP 1.3.1 WITH OUTPUT TO 'EFPMD_JOB_NAME.out'<br>
mpirun -np 4 -machinefile pbsnodefile.$PBS_JOBID /group/lslipche/apps/libefp/libefp-1.3.1-beta-2015.11.13/bin/efpmd EFPMD_JOB_NAME.in > EFPMD_JOB_NAME.out<br>
<br>
# PROCESS 'EFPMD_JOB_NAME_EFPMD.out' TO PRODUCE THE TRAJECTORY FILE 'EFPMD_JOB_NAME.xyz'<br>
/group/lslipche/apps/libefp/libefp-1.3.1-beta-2015.11.13/bin/trajectory.pl EFPMD_JOB_NAME.out > EFPMD_JOB_NAME.xyz<br>
</div>
</div>
<!-- This is where the content of the page ends. -->
<!-- Copyright information. -->
<div class="bottom">
<img style="border: 0px solid; width: 100%; height: auto;"
title="Bottom"
src="main/bottom.png"
alt="" hspace="0" vspace="0"/>
</div>
<footer>
<center>© 2025 Carlos H. Borca</center>
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-76513146-1', 'auto');
ga('send', 'pageview');
</script>
</html>