CPMD: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
(Added "module load StdEnv/2020" since the module is only available under "StdEnv/2020")
 
(17 intermediate revisions by 4 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
[[Category:Software]]
[[Category:Software]][[Category:ComputationalChemistry]][[Category:BiomolecularSimulation]]


[https://www.cpmd.org/wordpress/ CPMD] is a plane wave/pseudopotential DFT code for ab initio molecular dynamics simulations.
<!--T:13-->
[https://www.cpmd.org/wordpress/ CPMD] is a plane wave/pseudo-potential DFT code for ab initio molecular dynamics simulations.


<!--T:2-->
= License limitations = <!--T:2-->
= License limitations =


Before you can start using [http://cpmd.org CPMD], you have to register and accept the [http://cpmd.org/download/cpmd-download-1/accept-license CPMD license terms] and then [[Technical_support | send us a support request]] stating that you have in fact registered and accepted CPMD license terms. Afterwards, we will get in touch with the CPMD admins to confirm your registration, and then will grant you access to the CPMD software.
<!--T:3-->
In the past, access to CPMD required registration and confirmation with the developers, but registration on their website is no longer needed. However, the modules installed on our clusters are still protected by a POSIX group.  


<!--T:47-->
Before you can start using [http://cpmd.org CPMD] on our clusters, [[Technical_support | send us a support request]] and ask to be added to the POSIX group that will allow you to access the software.


<!--T:3-->
= Module = <!--T:14-->
= Module =


<!--T:15-->
You can access CPMD by loading a [[Utiliser des modules/en|module]].   
You can access CPMD by loading a [[Utiliser des modules/en|module]].   


<!--T:16-->
<source lang="bash">
<source lang="bash">
module load StdEnv/2020
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3
</source>
</source>


= Local installation of CPMD =
= Local installation of CPMD = <!--T:17-->


It has been our experience, however, lately that a response from CPMD admins can take weeks or even months. If you are a registered CPMD user, you will have access to the CPMD source files, and therefore can build the software yourself in your home directory using our software build environment called EasyBuild with the exact same recipe that we would use for a central installation.
<!--T:18-->
It has recently been our experience that a response from CPMD admins can unfortunately take weeks or even months. If you are a registered CPMD user, you have access to the CPMD source files and can therefore build the software yourself in your /home directory using our software environment called EasyBuild, with the exact same recipe that we would use for a central installation.


<!--T:4-->
<!--T:4-->
Below are instructions on how to build CPMD 4.3 under your account on a cluster of your choice:
Below are instructions on how to build CPMD 4.3 under your account on the cluster of your choice:


<!--T:5-->
<!--T:5-->
Create a local directory, first, like so
Create a local directory like so
  $ mkdir -p ~/.local/easybuild/sources/c/CPMD
  $ mkdir -p ~/.local/easybuild/sources/c/CPMD


<!--T:6-->
<!--T:6-->
Place all the CPMD source tarballs and patches into that directory
Place all the CPMD source tarballs and patches into that directory.
<pre>
<pre>
$ ls -al ~/.local/easybuild/sources/c/CPMD
$ ls -al ~/.local/easybuild/sources/c/CPMD
Line 49: Line 55:


<!--T:7-->
<!--T:7-->
Then run the EasyBuild command
Then run the EasyBuild command.
  $ eb CPMD-4.3-iomkl-2020a.eb --rebuild
  $ eb CPMD-4.3-iomkl-2020a.eb --rebuild


<!--T:8-->
<!--T:8-->
The <code>--rebuild</code> option forces EasyBuild to ignore CPMD 4.3 installed in a central location and proceed instead with the installation into your home directory.
The <code>--rebuild</code> option forces EasyBuild to ignore CPMD 4.3 installed in a central location and proceed instead with the installation in your /home directory.


<!--T:9-->
<!--T:9-->
Line 59: Line 65:


<!--T:10-->
<!--T:10-->
Now, when you type <code>module load cpmd</code>, the software installed into your home directory will get picked up.
Now, when you type <code>module load cpmd</code>, the software installed in your /home directory will get picked up.


<!--T:11-->
<!--T:11-->
<pre>
<pre>
$ module load cpmd
$ module load StdEnv/2020
$ module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3
$ which cpmd.x
$ which cpmd.x
~/.local/easybuild/software/2020/avx2/MPI/intel2020/openmpi4/cpmd/4.3/bin/cpmd.x
~/.local/easybuild/software/2020/avx2/MPI/intel2020/openmpi4/cpmd/4.3/bin/cpmd.x
Line 71: Line 78:
You can use it now as usual in your submission script.
You can use it now as usual in your submission script.


=Example of job script =
=Example of a job script = <!--T:19-->


To run a job, you will need to set an input file and access to [https://www.cpmd.org/wordpress/index.php/documentation/pseudo-potentials/ pseudo-potential] that are available for download from CPMD website after authentication {only for registered users}.
<!--T:20-->
To run a job, you will need to set an input file and access to the pseudo-potentials.


<!--T:21-->
If the input file and the pseudo-potentials are in the same directory, the command to run the program in parallel is:
If the input file and the pseudo-potentials are in the same directory, the command to run the program in parallel is:


<code>srun cpmd.x <input files> > <output file></code>
<!--T:22-->
<code>srun cpmd.x <input files> > <output file></code> (as in the script 1)


It is also possible to put the pseudo potential on another directory and run the code as follow:
<!--T:23-->
It is also possible to put the pseudo-potentials in another directory with


<code>srun cpmd.x <input files> <path to pseudo potentials location> > <output file></code>
<!--T:24-->
<code>srun cpmd.x <input files> <path to pseudo potentials location> > <output file></code> (as in script 2)


<!--T:25-->
<tabs>
<tabs>
<tab name="INPUT">
<tab name="INPUT">
{{File
{{File
Line 95: Line 107:
&END
&END


<!--T:26-->
&CPMD
&CPMD
  OPTIMIZE WAVEFUNCTION
  OPTIMIZE WAVEFUNCTION
Line 113: Line 126:
&END  
&END  


<!--T:27-->
&DFT
&DFT
  FUNCTIONAL LDA
  FUNCTIONAL LDA
&END   
&END   


<!--T:28-->
&ATOMS
&ATOMS
*H_MT_LDA.psp
*H_MT_LDA.psp
Line 127: Line 142:
</tab>
</tab>


<!--T:29-->
<tab name="Script 1">
<tab name="Script 1">
{{File
{{File
Line 133: Line 149:
   |contents=
   |contents=
#!/bin/bash
#!/bin/bash
<!--T:30-->
#SBATCH --account=def-someacct
#SBATCH --account=def-someacct
#SBATCH --nodes=1
#SBATCH --nodes=1
Line 139: Line 157:
#SBATCH --time=0-1:00
#SBATCH --time=0-1:00


<!--T:31-->
# Load the modules:
# Load the modules:


module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3
<!--T:32-->
module load StdEnv/2020
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3


<!--T:33-->
echo "Starting run at: `date`"
echo "Starting run at: `date`"


<!--T:34-->
CPMD_INPUT="1-h2-wave.inp"
CPMD_INPUT="1-h2-wave.inp"
CPMD_OUTPUT="1-h2-wave_output.txt"
CPMD_OUTPUT="1-h2-wave_output.txt"


<!--T:35-->
srun cpmd.x ${CPMD_INPUT} > ${CPMD_OUTPUT}
srun cpmd.x ${CPMD_INPUT} > ${CPMD_OUTPUT}


<!--T:36-->
echo "Program finished with exit code $? at: `date`"
echo "Program finished with exit code $? at: `date`"
}}
}}
</tab>
</tab>


<!--T:37-->
<tab name="Script 2">
<tab name="Script 2">
{{File
{{File
Line 161: Line 187:
#!/bin/bash
#!/bin/bash


<!--T:38-->
#SBATCH --account=def-someacct
#SBATCH --account=def-someacct
#SBATCH --nodes=1
#SBATCH --nodes=1
Line 167: Line 194:
#SBATCH --time=0-1:00
#SBATCH --time=0-1:00


<!--T:39-->
# Load the modules:
# Load the modules:


module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3
<!--T:40-->
module load StdEnv/2020
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3


<!--T:41-->
echo "Starting run at: `date`"
echo "Starting run at: `date`"


<!--T:42-->
CPMD_INPUT="1-h2-wave.inp"
CPMD_INPUT="1-h2-wave.inp"
CPMD_OUTPUT="1-h2-wave_output.txt"
CPMD_OUTPUT="1-h2-wave_output.txt"
PP_PATH=<path to the location of pseudo-potentials>
PP_PATH=<path to the location of pseudo-potentials>


<!--T:43-->
srun cpmd.x ${CPMD_INPUT} ${PP_PATH} > ${CPMD_OUTPUT}
srun cpmd.x ${CPMD_INPUT} ${PP_PATH} > ${CPMD_OUTPUT}


<!--T:44-->
echo "Program finished with exit code $? at: `date`"
echo "Program finished with exit code $? at: `date`"
}}
}}
</tab>
</tab>
</tabs>
</tabs>
=Related link = <!--T:45-->
<!--T:46-->
* CPMD [https://www.cpmd.org/wordpress/ home page].


</translate>
</translate>

Latest revision as of 18:07, 16 April 2024

Other languages:

CPMD is a plane wave/pseudo-potential DFT code for ab initio molecular dynamics simulations.

License limitations[edit]

In the past, access to CPMD required registration and confirmation with the developers, but registration on their website is no longer needed. However, the modules installed on our clusters are still protected by a POSIX group.

Before you can start using CPMD on our clusters, send us a support request and ask to be added to the POSIX group that will allow you to access the software.

Module[edit]

You can access CPMD by loading a module.

module load StdEnv/2020
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3

Local installation of CPMD[edit]

It has recently been our experience that a response from CPMD admins can unfortunately take weeks or even months. If you are a registered CPMD user, you have access to the CPMD source files and can therefore build the software yourself in your /home directory using our software environment called EasyBuild, with the exact same recipe that we would use for a central installation.

Below are instructions on how to build CPMD 4.3 under your account on the cluster of your choice:

Create a local directory like so

$ mkdir -p ~/.local/easybuild/sources/c/CPMD

Place all the CPMD source tarballs and patches into that directory.

$ ls -al ~/.local/easybuild/sources/c/CPMD
cpmd2cube.tar.gz
cpmd2xyz-scripts.tar.gz
cpmd-v4.3.tar.gz
fourier.tar.gz
patch.to.4612
patch.to.4615
patch.to.4616
patch.to.4621
patch.to.4624
patch.to.4627

Then run the EasyBuild command.

$ eb CPMD-4.3-iomkl-2020a.eb --rebuild

The --rebuild option forces EasyBuild to ignore CPMD 4.3 installed in a central location and proceed instead with the installation in your /home directory.

Once the software is installed, log out and log back in.

Now, when you type module load cpmd, the software installed in your /home directory will get picked up.

$ module load StdEnv/2020
$ module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3
$ which cpmd.x
~/.local/easybuild/software/2020/avx2/MPI/intel2020/openmpi4/cpmd/4.3/bin/cpmd.x

You can use it now as usual in your submission script.

Example of a job script[edit]

To run a job, you will need to set an input file and access to the pseudo-potentials.

If the input file and the pseudo-potentials are in the same directory, the command to run the program in parallel is:

srun cpmd.x <input files> > <output file> (as in the script 1)

It is also possible to put the pseudo-potentials in another directory with

srun cpmd.x <input files> <path to pseudo potentials location> > <output file> (as in script 2)

File : 1-h2-wave.inp

&INFO
isolated hydrogen molecule.
single point calculation.
&END

&CPMD
 OPTIMIZE WAVEFUNCTION
 CONVERGENCE ORBITALS
  1.0d-7
 CENTER MOLECULE ON
 PRINT FORCES ON
&END
  
&SYSTEM
 SYMMETRY
  1
 ANGSTROM
 CELL
  8.00 1.0 1.0  0.0  0.0  0.0
 CUTOFF
  70.0
&END 

&DFT
 FUNCTIONAL LDA
&END  

&ATOMS
*H_MT_LDA.psp
 LMAX=S
  2
 4.371   4.000   4.000
 3.629   4.000   4.000
&END


File : run-cpmd.sh

#!/bin/bash

#SBATCH --account=def-someacct
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --mem-per-cpu=2500M
#SBATCH --time=0-1:00

# Load the modules:

module load StdEnv/2020
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3

echo "Starting run at: `date`"

CPMD_INPUT="1-h2-wave.inp"
CPMD_OUTPUT="1-h2-wave_output.txt"

srun cpmd.x ${CPMD_INPUT} > ${CPMD_OUTPUT}

echo "Program finished with exit code $? at: `date`"


File : run-cpmd.sh

#!/bin/bash

#SBATCH --account=def-someacct
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --mem-per-cpu=2500M
#SBATCH --time=0-1:00

# Load the modules:

module load StdEnv/2020
module load intel/2020.1.217 openmpi/4.0.3 cpmd/4.3

echo "Starting run at: `date`"

CPMD_INPUT="1-h2-wave.inp"
CPMD_OUTPUT="1-h2-wave_output.txt"
PP_PATH=<path to the location of pseudo-potentials>

srun cpmd.x ${CPMD_INPUT} ${PP_PATH} > ${CPMD_OUTPUT}

echo "Program finished with exit code $? at: `date`"


Related link[edit]