stjames 0.0.58__tar.gz → 0.0.59__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of stjames might be problematic. Click here for more details.
- {stjames-0.0.58/stjames.egg-info → stjames-0.0.59}/PKG-INFO +1 -1
- {stjames-0.0.58 → stjames-0.0.59}/pyproject.toml +1 -1
- {stjames-0.0.58 → stjames-0.0.59}/stjames/atomium_stjames/mmcif.py +10 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/atomium_stjames/pdb.py +4 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/pdb.py +9 -4
- {stjames-0.0.58 → stjames-0.0.59/stjames.egg-info}/PKG-INFO +1 -1
- {stjames-0.0.58 → stjames-0.0.59}/LICENSE +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/README.md +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/setup.cfg +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/__init__.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/_deprecated_solvent_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/atom.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/atomium_stjames/__init__.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/atomium_stjames/data.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/atomium_stjames/utilities.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/base.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/basis_set.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/calculation.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/compute_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/constraint.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/correction.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/__init__.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/bragg_radii.json +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/elements.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/isotopes.json +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/nist_isotopes.json +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/read_nist_isotopes.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/data/symbol_element.json +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/diis_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/grid_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/int_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/message.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/method.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/mode.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/molecule.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/opt_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/periodic_cell.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/py.typed +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/scf_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/solvent.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/status.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/task.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/thermochem_settings.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/types.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/__init__.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/admet.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/basic_calculation.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/bde.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/conformer.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/conformer_search.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/descriptors.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/docking.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/electronic_properties.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/fukui.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/hydrogen_bond_basicity.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/irc.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/molecular_dynamics.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/multistage_opt.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/pka.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/redox_potential.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/scan.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/spin_states.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/tautomer.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames/workflows/workflow.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames.egg-info/SOURCES.txt +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames.egg-info/dependency_links.txt +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames.egg-info/requires.txt +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/stjames.egg-info/top_level.txt +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/tests/test_constraints.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/tests/test_from_extxyz.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/tests/test_molecule.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/tests/test_pdb.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/tests/test_rounding.py +0 -0
- {stjames-0.0.58 → stjames-0.0.59}/tests/test_settings.py +0 -0
|
@@ -606,6 +606,16 @@ def atom_dict_to_atom_dict(d: dict[str, Any], aniso_dict: dict[int, Any]) -> dic
|
|
|
606
606
|
for key in ["x", "y", "z", "charge", "bvalue", "occupancy"]:
|
|
607
607
|
if atom[key] is not None:
|
|
608
608
|
atom[key] = float(atom[key])
|
|
609
|
+
if atom["charge"] == 0:
|
|
610
|
+
atom["charge"] = None
|
|
611
|
+
if not atom["is_hetatm"]:
|
|
612
|
+
atom["is_hetatm"] = None
|
|
613
|
+
if not atom["alt_loc"]:
|
|
614
|
+
atom["alt_loc"] = None
|
|
615
|
+
if atom["occupancy"] == 1:
|
|
616
|
+
atom["occupancy"] = None
|
|
617
|
+
if atom["name"] == atom["element"]:
|
|
618
|
+
atom["name"] = None
|
|
609
619
|
return atom
|
|
610
620
|
|
|
611
621
|
|
|
@@ -557,6 +557,10 @@ def atom_line_to_dict(line: str, aniso_dict: dict[Any, Any]) -> dict[str, Any]:
|
|
|
557
557
|
a["is_hetatm"] = None
|
|
558
558
|
if not a["alt_loc"]:
|
|
559
559
|
a["alt_loc"] = None
|
|
560
|
+
if a["occupancy"] == 1:
|
|
561
|
+
a["occupancy"] = None
|
|
562
|
+
if a["name"] == a["element"]:
|
|
563
|
+
a["name"] = None
|
|
560
564
|
return a
|
|
561
565
|
|
|
562
566
|
|
|
@@ -22,7 +22,7 @@ class PDBAtom(BaseModel):
|
|
|
22
22
|
y: float
|
|
23
23
|
z: float
|
|
24
24
|
element: str
|
|
25
|
-
name: str
|
|
25
|
+
name: str | None = None
|
|
26
26
|
charge: float | None = None
|
|
27
27
|
occupancy: float | None = None
|
|
28
28
|
alt_loc: str | None = None
|
|
@@ -413,12 +413,15 @@ def _format_atom_line(
|
|
|
413
413
|
else:
|
|
414
414
|
chg = " "
|
|
415
415
|
|
|
416
|
+
atom_name = atom.name if atom.name else atom.element
|
|
417
|
+
occupancy = atom.occupancy if atom.occupancy else 1.0
|
|
418
|
+
|
|
416
419
|
# Construct the line.
|
|
417
420
|
# Use exact spacing & field widths to match PDB guidelines.
|
|
418
421
|
line = (
|
|
419
422
|
f"{record_type}"
|
|
420
423
|
f"{serial:5d} " # atom serial number (columns 7-11)
|
|
421
|
-
f"{
|
|
424
|
+
f"{atom_name:<4}" # atom name (columns 13-16, left-justified in this snippet)
|
|
422
425
|
f"{alt_loc_char}" # altLoc (column 17)
|
|
423
426
|
f"{residue_name:>3}" # residue name (columns 18-20)
|
|
424
427
|
f" {chain_char}" # chain ID (column 22)
|
|
@@ -427,7 +430,7 @@ def _format_atom_line(
|
|
|
427
430
|
f"{atom.x:8.3f}" # x (columns 31-38)
|
|
428
431
|
f"{atom.y:8.3f}" # y (columns 39-46)
|
|
429
432
|
f"{atom.z:8.3f}" # z (columns 47-54)
|
|
430
|
-
f"{
|
|
433
|
+
f"{occupancy:6.2f}" # occupancy (columns 55-60)
|
|
431
434
|
f"{atom.bvalue:6.2f}" # temp factor (columns 61-66)
|
|
432
435
|
f" " # columns 67-76 (padding)
|
|
433
436
|
f"{atom.element:>2}" # element (columns 77-78)
|
|
@@ -468,6 +471,8 @@ def _format_anisou_line(
|
|
|
468
471
|
else:
|
|
469
472
|
chg = " "
|
|
470
473
|
|
|
474
|
+
atom_name = atom.name if atom.name else atom.element
|
|
475
|
+
|
|
471
476
|
if atom.anisotropy:
|
|
472
477
|
aniso_lines = (
|
|
473
478
|
f"{_float_to_pdb_string(atom.anisotropy[0]):>7}" # x (columns 29-35)
|
|
@@ -493,7 +498,7 @@ def _format_anisou_line(
|
|
|
493
498
|
line = (
|
|
494
499
|
f"{record_type}"
|
|
495
500
|
f"{serial:5d} " # atom serial number (columns 7-11)
|
|
496
|
-
f"{
|
|
501
|
+
f"{atom_name:<4}" # atom name (columns 13-16, left-justified in this snippet)
|
|
497
502
|
f"{alt_loc_char}" # altLoc (column 17)
|
|
498
503
|
f"{residue_name:>3}" # residue name (columns 18-20)
|
|
499
504
|
f" {chain_char}" # chain ID (column 22)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|