cspy-reoptimize command
The cspy-reoptimize command can be used to reoptimize crystal structures in a SQLite3 database after running cspy-csp
cspy-reoptimize [-h] [-x XYZ_FILES [XYZ_FILES ...]] [-c CHARGES] [-m MULTIPOLES] [-a AXIS]
[-p {fit,fit_boron,w99,fit_water_X,Day_halobenzenes,w99_orig_Halogens,w99_orig_H,w99rev_6311,w99rev_6311_s,w99rev_631,w99rev_pcm_6311,w99_s_cl,w99sp,w99rev_pcm_6311_and_Halides,isoPAHAP,PAHAP}]
[--cutoff CUTOFF] [-r] [-mq] [--log-level LOG_LEVEL] [--keep-files]
database_files [database_files ...]
positional arguments
database_files- Database files containing crystals for optimization
options
-xXYZ_FILES,--xyz-filesXYZ_FILES- Xyz files containing molecules for generation-mMULTIPOLES,--multipolesMULTIPOLES- RankN multipole file-aAXIS,--axisAXIS- Axis filename for structure minimization-pPOTENTIAL,--potentialPOTENTIAL- intermolecular potential name (default:fit)--cutoffCUTOFF- dmacrys real space/repulsion-dispersion cutoff (default:calculate)-r,--restart-minimize- Reminimize the structure from generated structure-mq,--minimize-unique- Only minimize the unique structures--log-levelLOG_LEVEL- Log level (default:INFO)--keep-files- Keep DMACRYS and NEIGHCRYS files which, for each structure, are stored in a new directory in the pwd.
Note
The source code for the command does not exist in the cspy.apps module. It can be located in the cspy.distributed module.
The current implementation of the cspy-reoptimize command allows the user to reoptimize the crystal structures in the SQL database
using DMACRYS, PMIN and dftb+.
In a similar fashion to the cspy-csp command, re-optimization steps can be specified by using a cspy.toml file as follows:
[[csp_minimization_step]]
kind = "dmacrys"
electrostatics = "multipoles"
Similarly, if we wanted to run a dftb+ calculation:
[[csp_minimization_step]]
kind = "dftb"
[dftb]
max_steps = 2500
max_force = 0.00058
kpoint_spacing = 0.05
scc_tol = 1e-5
timeout = 3600
single_point = false # Bool to control whether we run a single-point energy calculation
atomic_pos_opt = true # Bool to control whether we run a geometry optimisation on the atomic positions
lattice_and_atoms_opt = false # Bool to control whether we run a geometry optimisation on the atomic positions and lattice parameters
Please note that there are a number of different keywords that can be specified under the [dftb] header. The defaults for these can be found in cspy/configuration.py
Note
As of V1.1, The cspy-reoptimize command no longer expects the same inputs as the cspy-csp command. i.e. the user does not need to specify an axis file,
xyz files, dmacrys charges file and a dmacrys multipoles file if they are running a dftb calculation. For more information, please see the worked
example below.
Example Usage
Please consult the following link to the acetic acid worked example - Step 6: Reoptimize the final crystal structures (optional).