From b7057a9da5c5b610c36422d26e2f6518a53e4aaf Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 3 Sep 2024 17:11:28 -0400 Subject: [PATCH] set links --- docs/plugin.md | 2 +- docs/systems/bond_order_system.md | 6 +++--- docs/systems/system.md | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/plugin.md b/docs/plugin.md index 1c4909a4..bf3266d5 100644 --- a/docs/plugin.md +++ b/docs/plugin.md @@ -1,7 +1,7 @@ # Plugins One can follow a simple example under `plugin_example/` directory to add their own format by creating and installing plugins. -It's critical to add the {class}`Format` class to `entry_points['dpdata.plugins']` in `pyproject.toml`: +It's critical to add the {class}`Format ` class to `entry_points['dpdata.plugins']` in `pyproject.toml`: ```toml [project.entry-points.'dpdata.plugins'] diff --git a/docs/systems/bond_order_system.md b/docs/systems/bond_order_system.md index 90160bdc..8d92d724 100644 --- a/docs/systems/bond_order_system.md +++ b/docs/systems/bond_order_system.md @@ -1,6 +1,6 @@ ## BondOrderSystem -A new class {class}`BondOrderSystem` which inherits from class {class}`System` is introduced in dpdata. This new class contains information of chemical bonds and formal charges (stored in `BondOrderSystem.data['bonds']`, `BondOrderSystem.data['formal_charges']`). Now BondOrderSystem can only read from .mol/.sdf formats, because of its dependency on rdkit (which means rdkit must be installed if you want to use this function). Other formats, such as pdb, must be converted to .mol/.sdf format (maybe with software like open babel). +A new class {class}`BondOrderSystem ` which inherits from class {class}`System ` is introduced in dpdata. This new class contains information of chemical bonds and formal charges (stored in `BondOrderSystem.data['bonds']`, `BondOrderSystem.data['formal_charges']`). Now BondOrderSystem can only read from .mol/.sdf formats, because of its dependency on rdkit (which means rdkit must be installed if you want to use this function). Other formats, such as pdb, must be converted to .mol/.sdf format (maybe with software like open babel). ```python import dpdata @@ -12,7 +12,7 @@ system_2 = dpdata.BondOrderSystem( ) # read from .sdf file ``` In sdf file, all molecules must be of the same topology (i.e. conformers of the same molecular configuration). -`BondOrderSystem` also supports initialize from a {class}`rdkit.Chem.rdchem.Mol` object directly. +`BondOrderSystem ` also supports initialize from a {class}`rdkit.Chem.rdchem.Mol` object directly. ```python from rdkit import Chem from rdkit.Chem import AllChem @@ -25,7 +25,7 @@ system = dpdata.BondOrderSystem(rdkit_mol=mol) ``` ### Bond Order Assignment -The {class}`BondOrderSystem` implements a more robust sanitize procedure for rdkit Mol, as defined in {class}`dpdata.rdkit.santizie.Sanitizer`. This class defines 3 level of sanitization process by: low, medium and high. (default is medium). +The {class}`BondOrderSystem ` implements a more robust sanitize procedure for rdkit Mol, as defined in {class}`dpdata.rdkit.santizie.Sanitizer`. This class defines 3 level of sanitization process by: low, medium and high. (default is medium). + low: use `rdkit.Chem.SanitizeMol()` function to sanitize molecule. + medium: before using rdkit, the programm will first assign formal charge of each atom to avoid inappropriate valence exceptions. However, this mode requires the rightness of the bond order information in the given molecule. + high: the program will try to fix inappropriate bond orders in aromatic hetreocycles, phosphate, sulfate, carboxyl, nitro, nitrine, guanidine groups. If this procedure fails to sanitize the given molecule, the program will then try to call `obabel` to pre-process the mol and repeat the sanitization procedure. **That is to say, if you wan't to use this level of sanitization, please ensure `obabel` is installed in the environment.** diff --git a/docs/systems/system.md b/docs/systems/system.md index 2ee2cfe1..7d4173eb 100644 --- a/docs/systems/system.md +++ b/docs/systems/system.md @@ -20,20 +20,20 @@ or let dpdata infer the format (`vasp/poscar`) of the file from the file name ex d_poscar = dpdata.System("my.POSCAR") ``` The number of atoms, atom types, coordinates are loaded from the `POSCAR` and stored to a data {class}`System` called `d_poscar`. -A data {class}`System` (a concept used by [deepmd-kit](https://github.com/deepmodeling/deepmd-kit)) contains frames that has the same number of atoms of the same type. The order of the atoms should be consistent among the frames in one {class}`System`. +A data {class}`System ` (a concept used by [deepmd-kit](https://github.com/deepmodeling/deepmd-kit)) contains frames that has the same number of atoms of the same type. The order of the atoms should be consistent among the frames in one {class}`System `. It is noted that `POSCAR` only contains one frame. If the multiple frames stored in, for example, a `OUTCAR` is wanted, ```python d_outcar = dpdata.LabeledSystem("OUTCAR") ``` -The labels provided in the `OUTCAR`, i.e. energies, forces and virials (if any), are loaded by {class}`LabeledSystem`. It is noted that the forces of atoms are always assumed to exist. {class}`LabeledSystem` is a derived class of {class}`System`. +The labels provided in the `OUTCAR`, i.e. energies, forces and virials (if any), are loaded by {class}`LabeledSystem `. It is noted that the forces of atoms are always assumed to exist. {class}`LabeledSystem ` is a derived class of {class}`System `. -The {class}`System` or {class}`LabeledSystem` can be constructed from the following file formats with the `format key` in the table passed to argument `fmt`: +The {class}`System ` or {class}`LabeledSystem ` can be constructed from the following file formats with the `format key` in the table passed to argument `fmt`: ### Access data -These properties stored in {class}`System` and {class}`LabeledSystem` can be accessed by operator `[]` with the key of the property supplied, for example +These properties stored in {class}`System ` and {class}`LabeledSystem ` can be accessed by operator `[]` with the key of the property supplied, for example ```python coords = d_outcar["coords"] ``` @@ -52,7 +52,7 @@ Available properties are (nframe: number of frames in the system, natoms: total ### Dump data -The data stored in {class}`System` or {class}`LabeledSystem` can be dumped in 'lammps/lmp' or 'vasp/poscar' format, for example: +The data stored in {class}`System ` or {class}`LabeledSystem ` can be dumped in 'lammps/lmp' or 'vasp/poscar' format, for example: ```python d_outcar.to("lammps/lmp", "conf.lmp", frame_idx=0) ```