Crystal17

Software computing electronic wave function and properties of periodic systems

Introduction

CRYSTAL is a program designed for use in modeling crystalline solids. The program will compute the electronic structure of periodic structures using one of a number of different approximations including Hartree-Fock, Density Functional Theory or one of a number of hybrid approximations such as global, range-separated or double-hybrids. The program is also quite versatile and capable of modeling the physical and chemical properties not just of crystalline solids but also of nanotubes, surfaces, molecules and polymers. See the Main Website for additional details. 

License

Crystal is a licensed software. The license file is installed on all nodes of the partition mendoza_q. Currently only members of Professor Jose Mendoza Cortes' research group have access to this software.

Currently, there are two major releases of Crystal available at the RCC, Crystal14, and Crystal17.

Usage of Crystal14 at the RCC

The installed package contains 5 utilities: the serial version crystal, properties, parallel version Pcrystal, Pproperties, and the massively parallel version MPPcrystal.
There is one version currently available, 1_0_4d. To use these utilities, first include the bin directory to you PATH variable:

If you use version 1_0_4d

$ export PATH=/gpfs/research/mendozagroup/crystal/2014/v1_0_4d/bin/Linux-ifort_XE_emt64/v1.0.4/:$PATH

Next check if they are available by a command like the following:

$ which Pcrystal

If not found, then something is wrong. If it is working, then it is better to include this line to your .bashrc file for future use.

To submit a crystal job, You need first provide an input data file. For Pcrystal and MPPcrystal, the input file has be to called INPUT. Since there will be many temporary data/filescreated when the programming is running, it is better to create a scratch directory, run the code in the scratch directory, and copy the useful output to user's home directory upon a successful run.

Note. To run the parallel version of Crystal14, you need to load the intel-openmpi module.

If you use version 1_0_4d

$ module load intel/15
$ module load intel-openmpi

Here is a sample input data file test00.d12:

TEST00 - CO MOLECULE - NO BIPOLAR EXPANSION
MOLECULE
1
2
6   0.      0.      0.
8  0.8   0.5   0.4
END
6 4
0 0 3 2. 1.
72. 0.15
13 0.53
3.5 0.44
0 1 2 4. 1.
1.1 0.049 0.51
0.29 0.96 0.61
0 2 1 0. 1.
0.4 1.
0 3 1 0. 1.
0.6 1.
8 4
0 0 3 2. 1.
131. .15
24. .53
6.4 .44
0 1 2 6. 1.
1.9 0.049 0.51
0.49 0.96 0.61
0 2 1 0. 1.
0.7 1.
0 3 1 0. 1.
0.8 1.
99 0
END
NOBIPOLA
TOLINTEG
20 20 20 20 20
TOLDEE
7
FMIXING
10
NODIRECT
END

Here is an example SLURM submit script slurm.sub asking for 4 compute nodes and 64 cores in total:

#!/bin/bash
#SBATCH -J crys14
#SBATCH -o crys14-%J.o
#SBATCH -N 4
#SBATCH --ntasks-per-node=16
#SBATCH -p mendoza_q
#SBATCH -t 4:00:00
#SBATCH --mail-type=ALL

export JOB=test00
export DIR=$SLURM_SUBMIT_DIR
export scratch=/gpfs/research/mendozagroup/scratch/crystal/$USER/v1_0_4

echo "submit directory: "
echo $SLURM_SUBMIT_DIR

module purge  
module load intel/15
module load intel-openmpi

# remove the following line if already in your .bashrc file
#export PATH=/gpfs/research/mendozagroup/crystal/v1_0_3/crystal14-1.0.3/bin/Linux-ifort_emt64/v1.0.3:$PATH
export PATH=/gpfs/research/mendozagroup/crystal/v1_0_4/bin/Linux-ifort_XE_emt64/v1.0.4:$PATH

mkdir  -p $scratch/$JOB
# the following line need be modified according to where your input is located
cp $DIR/../test_cases/inputs/${JOB}.d12  $scratch/$JOB/INPUT
cd $scratch/$JOB
touch hostfile
rm    hostfile
for i in `scontrol show hostnames $SLURM_JOB_NODELIST`
do
   echo "$i slots=16" >> hostfile
done

# in the following, -np parameters should be equal to those specified above.
mpirun -np 64 -machinefile hostfile Pcrystal 2>&1 > $DIR/${JOB}.out
cp fort.9  ${DIR}/${JOB}.f9

# uncomment the next 5 lines if you want to remove the scratch directory
#if [ $? -eq 0 ]
#then
#    cd ${DIR}
#    rm -rf $scratch/${JOB} 
#fi 

Upon a successful run, you will see things similar to the following in the SLURM output file crys14-$JOBID.o:

          64 PROCESSORS WORKING


 *******************************************************************************
 *                                                                             *
 *                               CRYSTAL14                                     *
 *                      public : 1.0.4 - Feb 23rd, 2016                        *
 *                       HTTP://WWW.CRYSTAL.UNITO.IT                           *
 *                                                                             *
 *                              MAIN AUTHORS                                   *
 ....
 .... skipped many things here
 .... near the end
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT TOTENY      TELAPSE       10.39 TCPU        5.66
CYC   9 ETOT(AU) -1.107649354541E+02 DETOT -4.46E-09 tst  5.98E-10 PX  2.50E-04

 == SCF ENDED - CONVERGENCE ON ENERGY      E(AU) -1.1076493545406E+02 CYCLES   9

 TOTAL ENERGY(HF)(AU)(   9) -1.1076493545406E+02 DE-4.5E-09 tst 6.0E-10 PX 2.5E-04
 EIGENVECTORS IN FORTRAN UNIT 10
 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT END         TELAPSE       11.51 TCPU        5.69
 EEEEEEEEEE TERMINATION  DATE 12 05 2016 TIME 16:36:53.0
NODE    0 CPU TIME =         5.693
    TOTAL CPU TIME =       336.350

Example Input Data

Crystal developers have provided some test input data, to copy them to your own directory, use things like

 cd $HOME
 mkdir -p  crystal14
 cp -r /gpfs/research/mendozagroup/crystal/v1_0_4/test_cases  ~/crystal14/

Usage of Crystal17 at the RCC

The usage of Crystal17 is essentially the same as Crystal14, you only need to set environment as the following

If you use version 1.0.1

export PATH=/gpfs/research/mendozagroup/crystal/2017/v1_0_1_amended/ifort14/bin/Linux-ifort14_XE_emt64/v1.0.1:$PATH

module purge
module load intel/16
modula load intel-openmpi

If you use version 1.0.2

export PATH=/gpfs/research/mendozagroup/crystal/2017/v1_0_2/ifort14/bin/Linux-ifort14_XE_emt64/v1.0.2:$PATH

module purge
module load intel/16
modula load intel-openmpi

An example of Crystal17

The submit script BG_test.sh

#!/bin/bash
#SBATCH -J BG_Test
#SBATCH -o BG_Test-%J.o
#SBATCH -N 1
#SBATCH -n 4
#SBATCH -p backfill
#SBATCH -t 04:00:00

cat $SLURM_JOB_NODELIST

export JOB=BG_Test
export DIR=$SLURM_SUBMIT_DIR
export PATH=/gpfs/research/mendozagroup/crystal/2017/v1_0_1_amended/ifort14/bin/Linux-ifort14_XE_emt64/v1.0.1:$PATH
export scratch=/gpfs/research/mendozagroup/scratch/crystal/${USER}/crys17

echo "submit directory: "
echo $SLURM_SUBMIT_DIR

module purge
module load intel/16
module load intel-openmpi

rm -fr  $scratch/$JOB
mkdir  -p $scratch/$JOB
# the following line need be modified according to where your input is located
cp $DIR/${JOB}.d12 $scratch/$JOB/INPUT
#cp $DIR/${JOB}.f9  $scratch/$JOB/fort.9
cd $scratch/$JOB

which Pcrystal

srun Pcrystal >& $DIR/${JOB}.out
cp fort.9  ${DIR}/${JOB}.f9

The input data file  BG_test.d12

Crystal17 Test Cakculations BLG-1V 
CRYSTAL
0 0 0
191
4.99095 3.45003
3
 6 0.16872 0.33745 0.00000
 6 0.33333 0.66667 0.00000
23 0.00000 0.00000 0.50000
END
23 14
0 0 8 2.0 1.0
    232340.65058 0.00023072410092
    34828.841170 0.00178881789620
    7926.5448691 0.00929924901310
    2243.7733046 0.03776146334700
    730.59322944 0.12255909662000
    262.32219631 0.28963508811000
    101.70403805 0.41004702955000
    40.064784617 0.21113610858000
0 0 4 2.0 1.0
    255.24014968 -0.02445811633800
    78.804646961 -0.11527205366000
    12.340598946 0.55174749453000
    5.1742019219 0.54504528489000
0 0 2 2.0 1.0
    7.6513894469 -0.22967638286000
    1.2639759898 0.71683769077000
0 0 1 2.0 1.0
    2.0363959000 1.00000000000000
0 0 1 0.0 1.0
    0.5857304500 1.00000000000000
0 0 1 0.0 1.0
    0.2750729900 1.00000000000000
0 2 6 6.0 1.0
    1184.2369151 0.00244498267290
    280.23075192 0.01964345446600
    89.643627137 0.09079694919000
    33.242411253 0.25650768222000
    13.144514452 0.40815393750000
    5.2948534140 0.23860378268000
0 2 3 6.0 1.0
    20.175586851 -0.02824148902300
    2.7605865197 0.55574635619000
    1.1008900902 0.99319919270000
0 2 1 0.0 1.0
    0.7153797600 1.00000000000000
0 2 1 0.0 1.0
    0.2384599200 1.00000000000000
0 3 4 3.0 1.0
    43.861134864 0.01148717423800
    12.516021891 0.06824715397700
    4.3313854957 0.21837784195000
    1.6138855773 0.39245212296000
0 3 1 0.0 1.0
    0.5790593700 1.00000000000000
0 3 1 0.0 1.0
    0.2143837300 1.00000000000000
0 4 1 0.0 1.0
    0.8310000000 1.00000000000000
28 14
0 0 8 2.0 1.0
    351535.72935 0.00022529386884
    52695.809283 0.00174686162230
    11992.468293 0.00908499921360
    3394.5776689 0.03694074844700
    1105.3594585 0.12032819950000
    397.14677769 0.28596715057000
    154.27542974 0.40983020196000
    61.018723780 0.21620642851000
0 0 4 2.0 1.0
    384.45559739 -0.02465127926800
    119.04879199 -0.11658505277000
    19.137012223 0.54864126676000
    8.1526718562 0.52640051122000
0 0 2 2.0 1.0
    12.579408642 -0.22797884293000
    2.0870866081 0.70703738215000
0 0 1 2.0 1.0
    2.9480296700 1.00000000000000
0 0 1 0.0 1.0
    0.87308901 1.00000000000000
0 0 1 0.0 1.0
    0.16787354 1.00000000000000
0 2 6 6.0 1.0
    1883.0907486 0.00237482584430
    445.95155320 0.01928945717200
    143.08430815 0.09071821150700
    53.372920722 0.26181414117000
    21.321919357 0.42309149832000
    8.6643561994 0.24641686015000
0 2 3 6.0 1.0
    34.144255211 -0.02967712916300
    4.7122455921 0.55616824096000
    1.8709231845 0.96357766460000
0 2 1 0.0 1
    1.0453650800 1.00000000000000
0 2 1 0.0 1.0
    0.4276468400 1.00000000000000
0 3 4 8.0 1
    74.591603465 0.01207745467200
    21.590632752 0.07463726215400
    7.6246142580 0.23236775502000
    2.8632206762 0.39042651680000
0 3 1 0.0 1
    1.0075942000 1.00000000000000
0 3 1 0.0 1
    0.3167209900 1.00000000000000
0 4 1 0.0 1.0
    2.1740000000 1.00000000000000
24 14
0 0 8 2.0 1.0
    254477.80704 0.00023386945693
    38131.797054 0.00181426018000
    8675.2930607 0.00943639257210
    2455.0099848 0.03834363936700
    799.16217787 0.12459194837000
    286.90021489 0.29489696029000
    111.25413232 0.41846149607000
    43.864152636 0.21633763420000
0 0 4 2.0 1.0
    279.32669173 -0.02345090811100
    86.274732376 -0.11080370027000
    13.555756113 0.53028965842000
    5.6978112751 0.51603516947000
0 0 2 2.0 1.0
    8.5636582615 -0.38109545675000
    1.3988296768 1.19915914360000
0 0 1 2.0 1.0
    1.5142137900 1.00000000000000
0 0 1 0.0 1.0
    0.5047379300 1.00000000000000
0 0 1 0.0 1.0
    0.1505787700 1.00000000000000
0 2 6 6.0 1.0
    1306.4398864 0.00242773261850
    309.25311441 0.01954404101700
    98.996273963 0.09065179455300
    36.756916451 0.25699279154000
    14.566657077 0.40935504891000
    5.8739937432 0.23729388849000
0 2 3 6.0 1.0
    22.890999695 -0.02816602661300
    3.0855001822 0.56034120148000
    1.2132329118 0.98119019650000
0 2 1 0.0 1.0
    0.4593168100 1.00000000000000
0 2 1 0.0 1.0
    0.2296584050 1.0000000000000
0 3 4 4.0 1.0
    43.720074476 0.01362296402600
    12.391242652 0.07893518013300
    4.2639442006 0.23833840000000
    1.5525221790 0.39526851122000
0 3 1 0.0 1.0
    1.1288617700 1.00000000000000
0 3 1 0.0 1.0
    0.5172623600 1.00000000000000
0 4 1 0.0 1.0
    1.1470000000 1.00000000000000
27 14
0 0 8 2.0 1.0
    325817.01553 0.00022568462484
    48839.636453 0.00174993975330
    11114.937307 0.00910031340970
    3146.1603642 0.03699625683700
    1024.4378465 0.12044269621000
    368.02508816 0.28598731649000
    142.91229205 0.40908312004000
    56.482649209 0.21500145739000
0 0 4 2.0 1.0
    356.40298318 -0.02476705967800
    110.31165215 -0.11702139134000
    17.659634834 0.55215522200000
    7.5059030479 0.53246877060000
0 0 2 2.0 1.0
    11.501807176 -0.22942470077000
    1.9081994606 0.71180933514000
0 0 1 2.0 1.0
    2.6083233500 1.00000000000000
0 0 1 0.0 1.0
    0.7955677300 1.00000000000000
0 0 1 0.0 1.0
    0.1356673700 1.00000000000000
0 2 6 6.0 1.0
    1731.1369144 0.00239057676850
    409.91750438 0.01938299996700
    131.45648578 0.09090544850900
    48.987439714 0.26146681577000
    19.537078992 0.42157264570000
    7.9287281634 0.24571813557000
0 2 3 6.0 1.0
    31.076017584 -0.02943806997300
    4.2835180697 0.55615568168000
    1.7022921563 0.96772195064000
0 2 1 0.0 1.0
    1.1628100700 1.00000000000000
0 2 1 0.0 1.0
    0.7018644100 1.00000000000000
0 3 4 7.0 1.0
    68.140745239 0.01198384536000
    19.685241019 0.07368854047500
    6.9322128825 0.23085496779000
    2.6025125694 0.39281059225000
0 3 1 0.0 1.0
    0.9207081800 1.00000000000000
0 3 1 0.0 1.0
    0.2922317400 1.00000000000000
0 4 1 0.0 1.0
    1.9030000000 1.00000000000000
26 14
0 0 8 2.0 1.0
    300784.84637 0.00022806273096
    45088.970557 0.00176817887610
    10262.516317 0.00919270834900
    2905.2897293 0.03735549580700
    946.11487137 0.12151108426000
    339.87832894 0.28818881468000
    131.94425588 0.41126612677000
    52.111494077 0.21518583573000
0 0 4 2.0 1.0
    329.48839267 -0.02474521647700
    101.92332739 -0.11683089050000
    16.240462745 0.55293621136000
    6.8840675801 0.53601640182000
0 0 2 2.0 1.0
    10.470693782 -0.22912708577000
    1.7360039648 0.71159319984000
0 0 1 2.0 1.0
    1.7565166800 1.00000000000000
0 0 1 0.0 1.0
    0.77548354 1.00000000000000
0 0 1 0.0 1.0
    0.1058918100 1.00000000000000
0 2 6 6.0 1.0
    1585.3959970 0.00237939601790
    375.38006499 0.01925315475500
    120.31816501 0.09002183653600
    44.788749031 0.25798172356000
    17.829278584 0.41492649744000
    7.2247153786 0.24207474784000
0 2 3 6.0 1.0
    28.143219756 -0.02904175515200
    3.8743241412 0.55312260343000
    1.5410752281 0.96771136842000
0 2 1 0.0 1.0
    0.9336590800 1.00000000000000
0 2 1 0.0 1.0
    0.1999999900 1.00000000000000
0 3 4 6.0 1.0
    61.996675034 0.01197197225500
    17.873732552 0.07321013541000
    6.2744782934 0.23103094314000
    2.3552337175 0.39910706494000
0 3 1 0.0 1.0
    0.8417158200 1.00000000000000
0 3 1 0.0 1.0
    0.2611100300 1.00000000000000
0 4 1 0.0 1.0
    1.5980000000 1.00000000000000
6 8
0 0 6 2.0 1.0
        13575.349682 0.00022245814352
        2035.2333680 0.00172327382520
        463.22562359 0.00892557153140
        131.20019598 0.03572798450200
        42.853015891 0.11076259931000
        15.584185766 0.24295627626000
0 0 2 2.0 1.0
        6.2067138508 0.41440263448000
        2.5764896527 0.23744968655000
0 0 1 0.0 1.0
        0.4941102000 1.00000000000000
0 0 1 0.0 1.0
        0.1644071000 1.00000000000000
0 2 4 2.0 1.0
        34.697232244 0.00533336578050
        7.9582622826 0.03586410909200
        2.3780826883 0.14215873329000
        0.8143320818 0.34270471845000
0 2 1 0.0 1.0
        0.5662417100 1.00000000000000
0 2 1 0.0 1.0
        0.2673545000 1.00000000000000
0 3 1 0.0 1.0
        0.8791584200 1.00000000000000
99 0
END
DFT
SPIN
B3LYP
LGRID
END
TOLINTEG
7 7 7 7 14
TOLDEE
7
SHRINK
0 30 
15 15 15
SCFDIR
BIPOSIZE
110000000
EXCHSIZE
110000000
ATOMSPIN
1
9 1
SPINLOCK
3
4
MAXCYCLE
800
FMIXING
80
ANDERSON
PPAN
GRIMME
1.05 20. 25.
2
23 10.80 1.562
6   1.75 1.452
END

Upon a successful run, you will have an output file BG_test.out similar to the following 

 PROCESS            0  OF            4  WORKING
 PROCESS            1  OF            4  WORKING
 PROCESS            3  OF            4  WORKING
 PROCESS            2  OF            4  WORKING


 *******************************************************************************
 *                                                                             *
 *                               CRYSTAL17                                     *
 *                      public : 1.0.1 - Jun 21st, 2017                        *
 *                       HTTP://WWW.CRYSTAL.UNITO.IT                           *
 *                                                                             *
 *                              MAIN AUTHORS                                   *
 *                                                                             *
 *                                                                             *
 *  R. DOVESI(1,11), V.R. SAUNDERS(2), C. ROETTI(1,11), R. ORLANDO(1,11),      *
 *  C.M. ZICOVICH-WILSON(1,3), F. PASCALE(4), B. CIVALLERI(1,11),              *
 *  K. DOLL(5), N.M. HARRISON(2,6), I.J. BUSH(7), Ph. D'ARCO(8),               *
 *  M. LLUNELL(9), M. CAUSA'(10), Y. NOEL(8), L. MASCHIO(1,11), A. ERBA(1,11)  *
 *  M. RE'RAT(14), S. CASASSA(1,11)                                            *
 *                                                                             *


..... skipped many lines

 OVERLAP POPULATION CONDENSED TO ATOMS FOR FIRST   6 NEIGHBORS

 ATOM A   1 C    ATOM B     CELL      R(AB)/AU R(AB)/ANG    OVPOP(AB)
                  7 C    (  0  1  0)     2.689     1.423    -0.022
                  5 C    (  0  0  0)     2.756     1.459     0.012
                  9 V    (  0  0  0)     4.269     2.259     0.003
                  3 C    (  1  1  0)     4.658     2.465     0.000
                  8 C    (  0  0  0)     4.716     2.496    -0.003
                  3 C    (  0  0  0)     4.774     2.526     0.004

 ATOM A   7 C    ATOM B     CELL      R(AB)/AU R(AB)/ANG    OVPOP(AB)
                  1 C    (  0 -1  0)     2.689     1.423    -0.022
                  2 C    (  0  0  0)     4.716     2.496    -0.003
                  8 C    (  1  0  0)     5.445     2.882     0.002
                  9 V    (  0  0  0)     6.346     3.358    -0.002
                  7 C    (  0  0 -1)     6.520     3.450     0.004
                  1 C    (  0 -1 -1)     7.052     3.732    -0.001

 ATOM A   9 V    ATOM B     CELL      R(AB)/AU R(AB)/ANG    OVPOP(AB)
                  1 C    (  0  0  0)     4.269     2.259     0.003
                  7 C    (  0  0  0)     6.346     3.358    -0.002
                  9 V    (  0  0 -1)     6.520     3.450    -0.003
                  1 C    ( -1 -1  0)     7.884     4.172    -0.000
                  9 V    ( -1 -1  0)     9.432     4.991     0.000
                  1 C    (  0  0 -1)    10.160     5.377    -0.000
 EIGENVECTORS IN FORTRAN UNIT 10

TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT END         TELAPSE      771.47 TCPU      754.58
 EEEEEEEEEE TERMINATION  DATE 02 10 2017 TIME 13:47:10.6
NODE    0 CPU TIME =       754.578
NODE    1 CPU TIME =       756.583
NODE    2 CPU TIME =       756.196
NODE    3 CPU TIME =       756.438
    TOTAL CPU TIME =      3023.795

Crgra2006

The package CrGraph processes data written by CRYSTAL09 in fortranunit 25, to give graphic outputs in postscript language. The paper sizeis A4 (210x297 mm), in portrait mode. The maximum size of the plot is 180x270mm.

Three scripts are supplied:

maps06 to draw contour maps 
bands06 to plot band structures 
doss06 to plot total and projected density of states

To use these utilities at RCC, you need to define some environmental variables first,

If you use bash,

# if you use version 1_0_3
$ cp  /gpfs/research/mendozagroup/crystal/v1_0_3/crystal14-1.0.3/cry14.bashrc  ~/.cry14.bashrc
# if you use version 1_0_4
$ cp /gpfs/research/mendozagroup/crystal/v1_0_4/cry14.bashrc  ~/.cry14.bashrc
$ source  ~/.cry14.bashrc

If you use Cshell,

# if you use version 1_0_3
$ cp /gpfs/research/mendozagroup/crystal/v1_0_3/crystal14-1.0.3/cry14.cshrc  ~/.cry14.cshrc
# if you use version 1_0_4
$ cp /gpfs/research/mendozagroup/crystal/v1_0_4/cry14.cshrc  ~/.cry14.cshrc 
$ source ~/.cry14.cshrc

To test if your environment is properly set up,

$ which band06

You should see

/gpfs/research/mendozagroup/crystal/v1_0_3/crystal14-1.0.3/crgra2006/band06

or

/gpfs/research/mendozagroup/crystal/v1_0_4/crgra2006/band06