xiaoqiugood的个人博客分享 http://blog.sciencenet.cn/u/xiaoqiugood

博文

CASTEP-Basic settings 再认识

已有 13526 次阅读 2013-10-9 01:35 |个人分类:软件安装及编译|系统分类:科研笔记| settings

1.per script

#!perl

#

# Purpose: This script builds a 'correct' methane molecule from scratch


use strict;

use warnings;

use MaterialsScript qw(:all);


#Utility function to create an atom of a specific type in a doc

#  Optionally creates a bond to that atom

sub CreateAtom {

   # Bond information ($bondTo, $bondType) is optional

   my ($doc, $element, $pos, $bondTo, $bondType) = @_;

 

   my $newAtom = $doc->CreateAtom($element, $pos);

 

   # Only build the bond if the bond information is present

   if($bondTo && $bondType) {

       $doc->CreateBond($newAtom, $bondTo, $bondType);

   }

 

   return $newAtom;

}


my $doc = Documents->New("Methane.xsd");


#To demonstrate Forcite Minimization put the H atoms in a planar cross

my $centralC = CreateAtom($doc, "C", Point(X => 1, Y => 1, Z => 1));

CreateAtom($doc, "H", Point(X => 1, Y => 0, Z => 1), $centralC, "Single");

CreateAtom($doc, "H", Point(X => 2, Y => 1, Z => 1), $centralC, "Single");

CreateAtom($doc, "H", Point(X => 1, Y => 2, Z => 1), $centralC, "Single");

CreateAtom($doc, "H", Point(X => 0, Y => 1, Z => 1), $centralC, "Single");


#Minimize the structure

Modules->Forcite->GeometryOptimization->Run($doc);


$doc->Save;


2.CASTEP Energy taskobject = module->EnergyDescription

Computes the single point energy of a structure using the CASTEP server.

Applies toReturn type

A task object

Using the CASTEP Energy task

Refer to the top-level CASTEP documentation for more details about CASTEP calculations and their settings.

Configuration

Use ChangeSettings on the CASTEP module, or pass the settings into the Run function. The Energy settings are applicable to all CASTEP tasks. The following settings are specific to the Energy task and fall into 12 categories:

<!--<variables start here>--><!--<variables end here>-->
SettingDefaultValuesDescription
Basic settings
TheoryLevelGGALDA
GGA
HF
HF-LDA
sX
sX-LDA
PBE0
B3LYP
The exchange-correlation functional theory level.
NonLocalFunctionalPBEPBE
RPBE
PW91
WC
PBESOL
The GGA density functional to use.
LocalFunctionalCA-PZCA-PZThe LDA density functional to use.
SpinPolarizedNoNo
Yes
If "Yes" different wavefunctions for different spins will be used. If "No" the same orbitals for alpha and beta spins are used.
UseFormalSpinYesNo
Yes
If "Yes" the initial value for the number of unpaired electrons for each atom will be taken from the formal spin specified for each atom.
UseLDAUNoNo
Yes
If "Yes" the LDA+U formalism will be used.
UseDFTDNoNo
Yes
If "Yes" the DFT-D correction will be used.
DFTDMethodTSOBS
TS
Grimme
The preferred DFT-D correction method to use (if the method is not supported by the exchange-correlation functional default method for the functional will be used).
UseCoreHolesNoNo
Yes
If "Yes" core holes will be included in the calculation.
Charge0−9999 to 9999The total charge on the unit cell.
QualityMediumExpress
Coarse
Medium
Fine
Ultra-fine
The overall quality of the calculation. This should be the first setting modified as changing the quality will modify all quality dependent settings.
UseInsulatorDerivationNoNo
Yes
Use coarser setting for insulators.
SCFMinimizationAlgorithmDensity MixingDensity Mixing
All Bands/EDFT
The electronic minimization method to be used for the SCF calculation.
UseBasisCorrectionSmartSmart
Always
Never
The finite basis set correction used in the evaluation of energy and stress. If "Smart" the correction is only applied when stress is required.
Smearing0.10.01 to 10.0The electronic broadening width to use in a variable occupancy calculation.
PseudopotentialsUltrasoftUltrasoft
Norm-conserving
On the fly
The type of pseudopotential to be used. "Ultrasoft" is preferred, "Norm-conserving" may be computationally expensive, and "On the fly" is required for calculation of NMR properties.
InitialSpin0−9999 to 9999The initial value for the number of unpaired electrons in a spin-polarized calculation. This starting value will be subsequently optimized during the calculation.
OptimizeTotalSpinYesNo
Yes
If "Yes" the total spin will be varied for the current SCF state with variable occupancy.
FixOccupancyYesNo
Yes
If "Yes" the electronic occupation numbers will be fixed during electronic minimization. Only the lowest occupied states will be included in the calculation.
DensityMixingSchemePulayLinear
Kerker
Pulay
Broyden
The method used for mixing the input densities and output densities from the current iteration to obtain the input density for the next iteration in the solution for the SCF.
EmptyBands200 to 9999The number of additional bands to be included in an electronic minimization as a percentage of the number of occupied bands.
AdjustSymmetryNoNo
Yes
If "Yes" the symmetry of the system will be increased or decreased automatically according to the type of calculation.
K-mesh setup
KPointOverallQualityMediumGamma
Coarse
Medium
Fine
Quality of k-point grid, combined with derivation rules.
KPointDerivationQualityQuality
Separation
Gamma
ustomGrid
How the k-point grid is derived.
KPointQualityMediumCoarse
Medium
Fine
Quality of k-point grid.
KPointSeparation0.050.001 to 10.0k-point separation (1/Å).
OriginA0.0−0.5 to 0.5k-point grid offset along a-axis.
OriginC0.0−0.5 to 0.5k-point grid offset along c-axis.
OriginB0.0−0.5 to 0.5k-point grid offset along b-axis.
ParameterA41 to 50k-point grid parameter along a-axis.
ParameterB41 to 50k-point grid parameter along b-axis.
ParameterC41 to 50k-point grid parameter along c-axis.
Detailed electronic settings
EnergyCutoffQualityMediumCoarse
Medium
Fine
Ultra-fine
The precision used for the plane wave basis set.
UseCustomEnergyCutoffNoNo
Yes
If "Yes" a custom value for the EnergyCutoff can be used.
EnergyCutoff250.010.0 to 99999.0A custom value for the plane-wave energy cutoff for wavefunction basis. Only available when UseCustomEnergyCutoff => "Yes".
MaximumSCFCycles1001 to 9999The maximum number of SCF cycles.
EnergyTolerancesScopeAtomAtom
Cell
If "Atom" energy convergence tolerances are used per atom, otherwise the energy convergence tolerances per cell are used.
SCFConvergence2.0E-6>1.0E-14The SCF convergence tolerance per atom, used only if EnergyTolerancesScope => "Atom".
SCFConvergencePerCell0.0001>1.0E-14The SCF convergence tolerance per cell, used only EnergyTolerancesScope => "Cell".
ElectronicConvergenceWindow32 to 5Convergence tolerance window for SCF.
PseudopotentialRepresentationReciprocal SpaceReciprocal Space
Real Space
The representation of pseudopotentials.
RealSpaceTransformEnergy250.010.0 to 99999.0The energy cutoff for real-space transformation of pseudopotentials.
UseCustomRealSpaceTransformEnergyNoNo
Yes
If "Yes" a value for the cutoff of the real space transformation energy can be specified by RealSpaceTransformEnergy.
RealSpaceQualityMediumCoarse
Medium
Fine
The tolerance for the transformation.
FFTQualityStandardStandard
Fine
Precise
The quality of the FFT grid.
FFTFineGrid1.0≤4.0The quality of the augmented FFT grid.
BasisSetCorrectionModeAutomaticAutomatic
Manual
The method for calculating the finite basis set correction.
NumBasisPoints32 to 9The number of energy points to use in evaluating the energy derivative required for the finite basis set correction. A converged SCF energy will be evaluated at each point.
BasisSetEnergyDerivative0.0≤0.0The value of the energy derivative required for the finite basis set correction when BasisSetCorrectionMode => "Manual".
TotalSpinOptimizationDelay61 to 99The number of SCF iterations for which the total electronic spin will remain fixed before being allowed to vary.
ImposeRealSpaceTransformToleranceYesNo
Yes
If "Yes" the real space pseudopotential transformation will have the quality set by RealSpaceQuality imposed.
DIISHistory201 to 50The number of previous iterations to be considered in the DIIS for the Pulay or Broyden density mixing method. Only used when DensityMixingScheme => "Broyden" or "Pulay".
DensityMixingAmplitude0.50.001 to 1.0The amplitude of the output density to mix with the input density to obtain input for the next iteration.
DensityMixingCutoff1.50.01 to 100.0Density mixing is reduced for Fourier coefficients at reciprocal lattice vectors less than this value.
SpinMixingCutoff1.50.01 to 100.0Spin mixing is reduced for Fourier coefficients at reciprocal lattice vectors less than about this value. Only used when DensityMixingScheme => "Broyden", "Kerker", or "Pulay".
SpinMixingAmplitude2.00.001 to 10.0The amplitude of the output spin density to mix with the input spin density to obtain input for the next iteration. Only used when SpinPolarized => "Yes".
RuntimeOptimizationDefaultDefault
Memory
Speed
The strategy used to balance memory use and speed during the calculation.
General property calculations
CalculateChargeNoneNone
Mulliken
Hirshfeld
Calculate and assign Mulliken or Hirshfeld atomic charges.
CalculateSpinNoneNone
Mulliken
Hirshfeld
Calculate and assign Mulliken or Hirshfeld spins.
CalculateBondOrderNoneNone
Mulliken
Calculate and assign Mulliken bond orders.
CalculateStressNoNo
Yes
Calculates the stress tensor.
BondPopulationCutoff3.0>0.01The maximum interatomic distance, in Å, to be considered in the bond population calculations.
General K-mesh setup for property calculations
PropertiesKPointQualityMediumCoarse
Medium
Fine
Quality of k(q)-point grid to be used for all properties calculations requested (BandStructure, PhononDispersion, DOS, CalculatePhononDOS, Optics, CoreLevelSpectrum).
PropertiesKPointSeparation0.050.001 to 10.0k(q)-point separation (1/Å) to be used for all properties calculations requested (BandStructure, PhononDispersion, DOS, CalculatePhononDOS, Optics, CoreLevelSpectrum).
Phonon calculation properties
CalculatePolarizabilityNoneNone
Crystal
Molecule
Linear
Calculate Polarizability.
CalculatePhononDOSNoneNone
Full
Partial
Calculate and plot phonon Full/Partial DOS.
CalculatePhononDispersionNoneNone
Dispersion
DispersionAndDos
Calculate and plot phonon dispersion.
CalculateThermodynamicsNoneNone
Full
Calculate and plot thermodynamic properties with the Debye temperature.
PolarizabilityConvergence1.0E-5>1.0E-9The convergence criterion, in Å3, for the second-order response to the electric fields during a polarizability run.
PhononMethodLinear responseLinear response
Finite displacement
The technique to be used to calculate phonon frequencies.
PhononRcut5.00.0 to 100.0The real space cutoff radius, in Å, for dynamical matrix calculations.
PhononUseInterpolationYesNo
Yes
If "Yes" the real space dynamical matrix will be calculated using the Monkhorst-Pack mesh defined by the separation parameter.
PhononInterpolationSpacing0.050.01 to 10.0The q-point separation parameter, in Å-1, which represents the average distance between Monkhorst-Pack mesh q-points used in the real space dynamical matrix calculations.
PhononDOSCalcLOTOYesNo
Yes
If "Yes" a non-analytical correction to the dynamical matrix will be applied. The LO-TO phonon frequency splitting at the G-point will be calculated for phonon DOS calculations.
PhononDOSConvergence1.0E-5>1.0E-9The convergence criterion, in eV Å-2, for the electronic eigenvalues during a phonon DOS run.
PhononDispCalcLOTOYesNo
Yes
If "Yes" a non-analytical correction to the dynamical matrix will be applied. The LO-TO phonon frequency splitting at the G-point will be calculated for phonon dispersion calculations.
PhononDispConvergence1.0E-5>1.0E-9The convergence criterion, in eV Å-2, for the electronic eigenvalues during a phonon dispersion run.
ImportHessianNoNo
Yes
Imports the Hessian (Dynamical matrix for G-point).
PhononDOSNormalization11
3N
The normalization style for phonon DOS.
PhononDOSInterpolationBroadening0.050.001 to 100The instrumental broadening effects (in THz).
PhononDOSIntegrationMethodSmearingSmearing
Interpolation
The preferred method for DOS generation.
PhononDOSSmearingWidth0.10.001 to 100The width of Gaussian smearing (in THz).
PhononDOSInterpolationAccuracyCoarseCoarse
Medium
Fine
The required interpolation accuracy.
PhononUnitsTHzmeV
THz
cm-1
The frequency units to be used for the phonon dispersion graph.
PhononDispersionLineStyleLinePoints
Line
The line style for phonon dispersion graphs.
StartTemperature5.0>0.1The lower limit for the temperature scale for plotting thermodynamics.
EndTemperature1000.0>0.1The upper limit for the temperature scale for plotting thermodynamics.
DOS and band structure properties
CalculateBandStructureNoneNone
Dispersion
DispersionAndDos
Calculate and plot dispersion.
BandStructureNumExtraBands120 to 999The number of additional bands to use in eigenvalue calculation.
BandStructureEnergyTolerance1.0E-5>1.0E-8The convergence criterion for electronic eigenvalues during the band structure calculation.
BandStructureUseNewXCNoNo
Yes
If "Yes" a different exchange-correlation functional is used for the band structure calculation.
BandStructureTheoryLevelGGALDA
GGA
HF
HF-LDA
sX
sX-LDA
PBE0
B3LYP
The exchange-correlation functional theory level to use for the band structure calculation.
BandStructureLocalFunctionalCA-PZCA-PZThe LDA density functional to use for the band structure calculation.
BandStructureNonLocalFunctionalPBEPBE
RPBE
PW91
WC
PBESOL
The GGA density functional to use for the band structure calculation.
BandStructureLineStyleLinePoints
Line
The line style for band graphs.
CalculateDOSNoneNone
Full
Partial
Calculate and plot Full/Partial DOS.
DOSNumExtraBands120 to 999The number of additional bands to use in eigenvalue calculation.
DOSEnergyTolerance1.0E-5>1.0E-8The convergence criterion for electronic eigenvalues during the DOS calculation.
DOSUseNewXCNoNo
Yes
If "Yes" a different exchange-correlation functional is used for the band structure calculation.
DOSTheoryLevelGGALDA
GGA
HF
HF-LDA
sX
sX-LDA
PBE0
B3LYP
The exchange-correlation functional theory level to use for the DOS calculation.
DOSLocalFunctionalCA-PZCA-PZThe LDA density functional to use for the DOS calculation.
DOSNonLocalFunctionalPBEPBE
RPBE
PW91
WC
PBESOL
The GGA density functional to use for the DOS calculation.
DOSInterpolationBroadening0.050.0 to 100The instrumental broadening effects (in eV).
DOSPreferredIntegrationMethodSmearingSmearing
Interpolation
The preferred method for DOS generation.
DOSSpinDisplayTotalTotal
Alpha
Beta
Alpha and Beta
Spin
Total and Spin
The type of DOS to plot.
DOSorTOSDOSDOS
Integrated DOS
Whether to plot DOS or Integrated DOS (Number of States).
DOSSmearingWidth0.20.005 to 100The width of Gaussian smearing (in eV).
DOSInterpolationAccuracyCoarseCoarse
Medium
Fine
The required interpolation accuracy.
PartialSYesNo
Yes
If "Yes" includes the S angular momentum term of the partial DOS.
PartialPYesNo
Yes
If "Yes" includes the P angular momentum term of the partial DOS.
PartialDYesNo
Yes
If "Yes" includes the D angular momentum term of the partial DOS.
PartialFYesNo
Yes
If "Yes" includes the F angular momentum term of the partial DOS.
PartialSumYesNo
Yes
If "Yes" includes the sum of angular momentum terms of the partial DOS.
NMR properties
CalculateNMRNoneNone
Crystal
Molecule
Calculate and assign NMR shielding and electric field gradients.
NMRCalculationShielding and EFGShielding
EFG
Shielding and EFG
The type of NMR properties calculated.
NMRMaxSteps2501 to 999The maximum number of conjugate gradient steps taken for each electronic band in the electronic minimizer during an NMR calculation.
Optical properties
CalculateOpticsNoneNone
Full
Calculate and plot various optical properties.
OpticsNumExtraBands121 to 999The number of additional bands to use in eigenvalue calculation.
OpticalEnergyTolerance1.0E-5>1.0E-8The convergence criterion for electronic eigenvalues during the optical properties calculation.
OpticsUseNewXCNoNo
Yes
If "Yes" a different exchange-correlation functional is used for the optical properties calculation.
OpticsTheoryLevelGGALDA
GGA
HF
HF-LDA
sX
sX-LDA
PBE0
B3LYP
The exchange-correlation functional theory level to use for the optical properties calculation.
OpticsNonLocalFunctionalPBEPBE
RPBE
PW91
WC
PBESOL
The GGA density functional to use for the optical properties calculation.
OpticsLocalFunctionalCA-PZCA-PZThe LDA density functional to use for the optical properties calculation.
ScissorsOperator0.0>0.0The scissors operator to be used in plotting the band structure for insulators.
OpticsSmearing0.5>0.0001The Gaussian broadening to be used for calculating the dielectric function.
OpticsGeometryPolarizedPolarized
Unpolarized
Polycrystalline
the type of optical properties calculation.
PlasmaFrequency0.0>0.0The Omg plasma value required to calculate the Drude term.
DrudeDamping0.050.0001 to 10The lifetime broadening value required to calculate the Drude term.
OpticsUnitseVeV
nm
cm-1
The frequency units used for the display of optical properties.
Polarization11.0
First coordinate of the polarization (or incident direction) vector.
Polarization20.0
Second coordinate of the polarization (or incident direction) vector.
Polarization30.0
Third coordinate of the polarization (or incident direction) vector.
Core Level Spectroscopy properties
CalculateCoreLevelSpectrumNoneNone
Absorption
Emission
Calculate and plot core level spectra of the chosen type.
EELSEmax250.0 to 100.0The energy limit above the Fermi level for which core level spectra will be calculated.
EELSEnergyTolerance1.0E-5>1.0E-8The convergence criterion for electronic eigenvalues during the core level spectra calculation.
EELSSpectrum1s1s
2s
...
4d
The core level.
EELSUseSpinOrbitYesNo
Yes
If "Yes" spin-orbit splitting for the core level is added to the spectrum.
EELSBroadening0.20.02 to 10.0The Gaussian broadening from the instrument to be used.
EELSUseLifetimeYesNo
Yes
If "Yes" lifetime broadening effects will be taken into account.
EELSCalculationUnpolarizedPolarized
Unpolarized
The polarization of the incident radiation for the core level spectroscopy calculation.
EELSPolarization11.0
The direction of the polarization of the incident radiation in fractional (lattice) coordinates. Only available when EELSCalculation => "Polarized".
EELSPolarization20.0
The direction of the polarization of the incident radiation in fractional (lattice) coordinates. Only available when EELSCalculation => "Polarized".
EELSPolarization30.0
The direction of the polarization of the incident radiation in fractional (lattice) coordinates. Only available when EELSCalculation => "Polarized".
Raman properties
CalculateRamanNoneNone
Activity
Intensity
Calculate and plot Raman intensity.
RamanUnitscm-1meV
THz
cm-1
The units for the X axis of the spectrum.
RamanSmearing10.00.1 to 100.0The Gaussian broadening to be used in cm-1.
RamanWaveLength514.50.001 to 1000000.The incident light wavelength in nm when CalculateRaman => "Intensity".
RamanTemperature10.00.1 to 10000.0The temperature in K when CalculateRaman => "Activity".
RamanInverseEnergyNoNo
Yes
If "Yes" the values on the X axis (energy) will decrease from right to left.
RamanInverseIntensityNoNo
Yes
If "Yes" the values on the Y axis (intensity) will decrease from bottom to top.
Import fields
CalculateChargeDensityNoneNone
Field
FieldAndIsosurface
Calculate Charge Density and import results.
CalculateSpinDensityNoneNone
Field
FieldAndIsosurface
Calculate Spin Density and import results.
CalculateDensityDifferenceNoneNone
Field
FieldAndIsosurface
Calculate Density Difference and import results.
CalculatePotentialNoneNone
Field
FieldAndIsosurface
Calculate Potential and import results.
CalculateSTMprofileNoneNone
Field
FieldAndIsosurface
Calculate STM profile and import results.
CalculateELFNoneNone
Field
FieldAndIsosurface
Calculate ELF and import results.
Import Fermi Surface
ImportFermiSurfaceNoNo
Yes
If "Yes" all the sheets of Fermi surface will be imported in the document.
Running

The calculation is started using the Run function on this task.

Examples

The following example shows how to run an Energy calculation on the document NaCl.xsd with coarse quality.

my $doc = $Documents{"NaCl.xsd"}; my $outputData = Modules->CASTEP->Energy->Run($doc, Settings(Quality => "Coarse" ) ); See also

Run
Modules collection
CASTEP module




https://blog.sciencenet.cn/blog-567091-731234.html

上一篇:朝花夕拾之VASP:赝势及其POTCAR建立 > or >>
下一篇:Phonopy test:反铁磁、铁磁、虚频、k-mesh密度
收藏 IP: 128.84.126.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-9-15 23:20

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部