-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new feature DFTB+ #511
new feature DFTB+ #511
Conversation
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## devel #511 +/- ##
==========================================
+ Coverage 82.77% 82.95% +0.17%
==========================================
Files 71 73 +2
Lines 6428 6493 +65
==========================================
+ Hits 5321 5386 +65
Misses 1107 1107
☔ View full report in Codecov by Sentry. |
dpdata/dftb_plus/inout.py
Outdated
energy = float(s[2]) | ||
|
||
symbols = np.array(symbols) | ||
forces = -np.array(forces) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that DFTB+ outputs forces instead of gradients, so forces should not multiply by -1.
(need check)
dpdata/dftb_plus/inout.py
Outdated
import numpy as np | ||
|
||
|
||
def read_dftb_plus(fn: str) -> Tuple[str, np.ndarray, float, np.ndarray]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DFTB+ has input and output files separately, so I suggest not merging them into one file. Instead, pass a directory or two file arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide doc for this format.
tests/dftb_plus/dftb_pin.hsd
Outdated
Geometry = GenFormat { | ||
4 C | ||
N H | ||
1 1 1.014150 0.112320 0.047370 | ||
2 2 3.909390 0.037985 -0.101159 | ||
3 2 0.702550 -0.851820 -0.060860 | ||
4 2 0.702550 0.603740 -0.789160 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From dftb+ documentation
The second line contains the chemical symbols of the elements present separated by one or more spaces. The following n lines contain a list of the atoms. The first number is the atom number in the structure (this is currently ignored by the program). The second number is the chemical type from the list of symbols on line 2. Then follow the coordinates. For S and C format, these are x, y, z in Å, but for F they are fractions of the three lattice vectors.
So the unit is Angstrom
… rename dftb_plus to dftbplus
|
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update dftb+ format to readme:
Lines 54 to 89 in 85a3b5e
| Software| format | multi frames | labeled | class | format key | | |
| ------- | :--- | :---: | :---: | :--- | :--- | | |
| vasp | poscar | False | False | System | 'vasp/poscar' | | |
| vasp | outcar | True | True | LabeledSystem | 'vasp/outcar' | | |
| vasp | xml | True | True | LabeledSystem | 'vasp/xml' | | |
| lammps | lmp | False | False | System | 'lammps/lmp' | | |
| lammps | dump | True | False | System | 'lammps/dump' | | |
| deepmd | raw | True | False | System | 'deepmd/raw' | | |
| deepmd | npy | True | False | System | 'deepmd/npy' | | |
| deepmd | raw | True | True | LabeledSystem | 'deepmd/raw' | | |
| deepmd | npy | True | True | LabeledSystem | 'deepmd/npy' | | |
| deepmd | npy | True | True | MultiSystems | 'deepmd/npy/mixed' | | |
| deepmd | npy | True | False | MultiSystems | 'deepmd/npy/mixed' | | |
| gaussian| log | False | True | LabeledSystem | 'gaussian/log'| | |
| gaussian| log | True | True | LabeledSystem | 'gaussian/md' | | |
| siesta | output | False | True | LabeledSystem | 'siesta/output'| | |
| siesta | aimd_output | True | True | LabeledSystem | 'siesta/aimd_output' | | |
| cp2k | output | False | True | LabeledSystem | 'cp2k/output' | | |
| cp2k | aimd_output | True | True | LabeledSystem | 'cp2k/aimd_output' | | |
| QE | log | False | True | LabeledSystem | 'qe/pw/scf' | | |
| QE | log | True | False | System | 'qe/cp/traj' | | |
| QE | log | True | True | LabeledSystem | 'qe/cp/traj' | | |
| Fhi-aims| output | True | True | LabeledSystem | 'fhi_aims/md' | | |
| Fhi-aims| output | False | True | LabeledSystem | 'fhi_aims/scf' | | |
|quip/gap|xyz|True|True|MultiSystems|'quip/gap/xyz'| | |
| PWmat | atom.config | False | False | System | 'pwmat/atom.config' | | |
| PWmat | movement | True | True | LabeledSystem | 'pwmat/movement' | | |
| PWmat | OUT.MLMD | True | True | LabeledSystem | 'pwmat/out.mlmd' | | |
| Amber | multi | True | True | LabeledSystem | 'amber/md' | | |
| Amber/sqm | sqm.out | False | False | System | 'sqm/out' | | |
| Gromacs | gro | True | False | System | 'gromacs/gro' | | |
| ABACUS | STRU | False | False | System | 'abacus/stru' | | |
| ABACUS | STRU | False | True | LabeledSystem | 'abacus/scf' | | |
| ABACUS | cif | True | True | LabeledSystem | 'abacus/md' | | |
| ABACUS | STRU | True | True | LabeledSystem | 'abacus/relax' | | |
| ase | structure | True | True | MultiSystems | 'ase/structure' | |
No description provided.