Commit e91d8e6
abacus/stru: return spins only when atomic magnetic moment is specified (#800)
The old version will induce a bug that dpdata will always store the spin
information, and when dpdata save it to lammps format, the spin
information will also be written, which is invalid for a non-spin lammps
job.
Now, the spin information is saved to dpdata only when the magnetic
moment of one atom is specified, which is necessary for a spin job.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Spin data is now processed to include only explicitly defined moments,
ensuring accurate output.
- **Documentation**
- User-facing documentation has been updated to clarify when spin
information appears.
- **Tests**
- Test entries for atomic positions have been streamlined by removing
redundant markers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: root <pxlxingliang>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 94d318b commit e91d8e6
2 files changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
| |||
390 | 391 | | |
391 | 392 | | |
392 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
393 | 397 | | |
394 | 398 | | |
395 | 399 | | |
| |||
409 | 413 | | |
410 | 414 | | |
411 | 415 | | |
412 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
413 | 421 | | |
414 | 422 | | |
415 | 423 | | |
| |||
438 | 446 | | |
439 | 447 | | |
440 | 448 | | |
441 | | - | |
| 449 | + | |
442 | 450 | | |
443 | 451 | | |
444 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
445 | 456 | | |
446 | 457 | | |
447 | 458 | | |
| |||
472 | 483 | | |
473 | 484 | | |
474 | 485 | | |
475 | | - | |
476 | 486 | | |
| 487 | + | |
| 488 | + | |
477 | 489 | | |
478 | 490 | | |
479 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments