mdinterface 1.5.2__tar.gz → 1.5.3__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.
Files changed (94) hide show
  1. {mdinterface-1.5.2/mdinterface.egg-info → mdinterface-1.5.3}/PKG-INFO +9 -11
  2. {mdinterface-1.5.2 → mdinterface-1.5.3}/README.md +4 -6
  3. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/__init__.py +2 -2
  4. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/builder.py +1 -1
  5. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/core/specie.py +3 -2
  6. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/io/lammpswriter.py +6 -5
  7. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/map.py +9 -19
  8. {mdinterface-1.5.2 → mdinterface-1.5.3/mdinterface.egg-info}/PKG-INFO +9 -11
  9. {mdinterface-1.5.2 → mdinterface-1.5.3}/pyproject.toml +4 -4
  10. {mdinterface-1.5.2 → mdinterface-1.5.3}/LICENSE +0 -0
  11. {mdinterface-1.5.2 → mdinterface-1.5.3}/MANIFEST.in +0 -0
  12. {mdinterface-1.5.2 → mdinterface-1.5.3}/assets/mdinterface.png +0 -0
  13. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/api/database.md +0 -0
  14. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/api/externals.md +0 -0
  15. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/api/io.md +0 -0
  16. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/api/polymer.md +0 -0
  17. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/api/simcell.md +0 -0
  18. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/api/specie.md +0 -0
  19. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/assets/mdinterface.png +0 -0
  20. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/guide/database.md +0 -0
  21. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/guide/logging.md +0 -0
  22. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/guide/polymer.md +0 -0
  23. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/guide/simcell.md +0 -0
  24. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/guide/specie.md +0 -0
  25. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/index.md +0 -0
  26. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/installation.md +0 -0
  27. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/quickstart.md +0 -0
  28. {mdinterface-1.5.2 → mdinterface-1.5.3}/docs/requirements.txt +0 -0
  29. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/electrode_interface.py +0 -0
  30. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/legacy/make_POSCAR.py +0 -0
  31. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/legacy/make_box.py +0 -0
  32. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/legacy/make_polymer.py +0 -0
  33. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/legacy/make_solvent_box.py +0 -0
  34. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/legacy/make_specie_ligpargen_resp.py +0 -0
  35. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/multilayer.py +0 -0
  36. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/multisolvent_box.py +0 -0
  37. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/polymer/polymer_piperion.py +0 -0
  38. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/sandwich_from_traj.py +0 -0
  39. {mdinterface-1.5.2 → mdinterface-1.5.3}/examples/solvent_box.py +0 -0
  40. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/__init__.py +0 -0
  41. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/box.py +0 -0
  42. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/continuum2sim.py +0 -0
  43. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/polymerize.py +0 -0
  44. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/snippets.py +0 -0
  45. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/build/solvent.py +0 -0
  46. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/config.py +0 -0
  47. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/core/__init__.py +0 -0
  48. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/core/polymer.py +0 -0
  49. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/core/topology.py +0 -0
  50. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/database/__init__.py +0 -0
  51. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/database/graphene.py +0 -0
  52. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/database/ions.py +0 -0
  53. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/database/metals.py +0 -0
  54. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/database/molecules.py +0 -0
  55. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/database/nobles.py +0 -0
  56. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/__init__.py +0 -0
  57. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/aimd.py +0 -0
  58. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/ase.py +0 -0
  59. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/ligpargen.py +0 -0
  60. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/obabel.py +0 -0
  61. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/optimization.py +0 -0
  62. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/externals/pyscf.py +0 -0
  63. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/io/__init__.py +0 -0
  64. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/io/gromacswriter.py +0 -0
  65. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/io/packmol.py +0 -0
  66. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/io/read.py +0 -0
  67. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/read/cp2ktraj.py +0 -0
  68. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/read/lammpstraj.py +0 -0
  69. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/read/read.py +0 -0
  70. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/read/trajectory.py +0 -0
  71. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/read/xyztraj.py +0 -0
  72. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/simulationbox.py +0 -0
  73. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/__init__.py +0 -0
  74. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/auxiliary.py +0 -0
  75. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/draw.py +0 -0
  76. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/graphs.py +0 -0
  77. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/logger.py +0 -0
  78. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/poisson.py +0 -0
  79. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/rings.py +0 -0
  80. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface/utils/units.py +0 -0
  81. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface.egg-info/SOURCES.txt +0 -0
  82. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface.egg-info/dependency_links.txt +0 -0
  83. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface.egg-info/requires.txt +0 -0
  84. {mdinterface-1.5.2 → mdinterface-1.5.3}/mdinterface.egg-info/top_level.txt +0 -0
  85. {mdinterface-1.5.2 → mdinterface-1.5.3}/requirements.txt +0 -0
  86. {mdinterface-1.5.2 → mdinterface-1.5.3}/setup.cfg +0 -0
  87. {mdinterface-1.5.2 → mdinterface-1.5.3}/setup.py +0 -0
  88. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/__init__.py +0 -0
  89. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/test_auxiliary.py +0 -0
  90. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/test_builder.py +0 -0
  91. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/test_database.py +0 -0
  92. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/test_solvent.py +0 -0
  93. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/test_specie.py +0 -0
  94. {mdinterface-1.5.2 → mdinterface-1.5.3}/tests/test_topology.py +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mdinterface
3
- Version: 1.5.2
3
+ Version: 1.5.3
4
4
  Summary: Build Interface Systems for Molecular Dynamics Simulations
5
5
  Author-email: Fabrice Roncoroni <fabrice.roncoroni@gmail.com>
6
6
  License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://gitlab.com/roncofaber/mdinterface
8
- Project-URL: Repository, https://gitlab.com/roncofaber/mdinterface.git
9
- Project-URL: Documentation, https://gitlab.com/roncofaber/mdinterface
10
- Project-URL: Bug Tracker, https://gitlab.com/roncofaber/mdinterface/-/issues
7
+ Project-URL: Homepage, https://github.com/roncofaber/mdinterface
8
+ Project-URL: Repository, https://github.com/roncofaber/mdinterface.git
9
+ Project-URL: Documentation, https://roncofaber.github.io/mdinterface
10
+ Project-URL: Bug Tracker, https://github.com/roncofaber/mdinterface/issues
11
11
  Keywords: molecular dynamics,simulation,interface,chemistry,materials science
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Science/Research
@@ -41,12 +41,10 @@ Requires-Dist: pymbxas; extra == "all"
41
41
  Requires-Dist: fairchem-core; extra == "all"
42
42
  Dynamic: license-file
43
43
 
44
- <div style="display: flex; align-items: center;">
45
- <img src="./assets/mdinterface.png" alt="Logo" width="80" style="margin-right: 10px;">
46
- <div style="display: flex; flex-direction: column;">
47
- <h1 style="margin: 0;">mdinterface: Build Interface Systems for Molecular Dynamics Simulations</h1>
48
- </div>
49
- </div>
44
+ <h1>
45
+ <img src="./assets/mdinterface.png" alt="Logo" width="60" style="vertical-align: middle; margin-right: 10px;">
46
+ mdinterface: Build Interface Systems for Molecular Dynamics Simulations
47
+ </h1>
50
48
 
51
49
  [![PyPI version](https://badge.fury.io/py/mdinterface.svg?icon=si%3Apython)](https://pypi.org/project/mdinterface/) [![GitHub version](https://badge.fury.io/gh/roncofaber%2Fmdinterface.svg?icon=si%3Agithub)](https://github.com/roncofaber/mdinterface) [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://roncofaber.github.io/mdinterface)
52
50
 
@@ -1,9 +1,7 @@
1
- <div style="display: flex; align-items: center;">
2
- <img src="./assets/mdinterface.png" alt="Logo" width="80" style="margin-right: 10px;">
3
- <div style="display: flex; flex-direction: column;">
4
- <h1 style="margin: 0;">mdinterface: Build Interface Systems for Molecular Dynamics Simulations</h1>
5
- </div>
6
- </div>
1
+ <h1>
2
+ <img src="./assets/mdinterface.png" alt="Logo" width="60" style="vertical-align: middle; margin-right: 10px;">
3
+ mdinterface: Build Interface Systems for Molecular Dynamics Simulations
4
+ </h1>
7
5
 
8
6
  [![PyPI version](https://badge.fury.io/py/mdinterface.svg?icon=si%3Apython)](https://pypi.org/project/mdinterface/) [![GitHub version](https://badge.fury.io/gh/roncofaber%2Fmdinterface.svg?icon=si%3Agithub)](https://github.com/roncofaber/mdinterface) [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://roncofaber.github.io/mdinterface)
9
7
 
@@ -6,8 +6,8 @@ Initially developed to construct electrolyte/electrode interfaces, it is also we
6
6
 
7
7
  """
8
8
 
9
- __version__ = '1.5.2'
10
- __date__ = '28 Apr. 2026'
9
+ __version__ = '1.5.3'
10
+ __date__ = '09 Jul. 2026'
11
11
  __author__ = 'Fabrice Roncoroni'
12
12
  __all__ = ['SimulationBox', 'SimCell', 'BoxBuilder', "Specie", "Polymer"]
13
13
 
@@ -669,7 +669,7 @@ class SimCell:
669
669
  padding: float,
670
670
  layered: bool,
671
671
  do_match: bool,
672
- ) -> Tuple[mda.Universe, float]:
672
+ ) -> Tuple[mda.Universe, float, float]:
673
673
  """
674
674
  Second pass: assemble all layers into a single Universe.
675
675
 
@@ -857,9 +857,10 @@ class Specie(object):
857
857
  charges, atoms = calculate_RESP_charges(self, **respargs)
858
858
 
859
859
  if assign:
860
- self.atoms.set_positions(atoms.get_positions())
861
860
  self.atoms.set_initial_charges(charges)
862
-
861
+ if method == "resp":
862
+ self.atoms.set_positions(atoms.get_positions())
863
+
863
864
  return charges
864
865
 
865
866
  def estimate_OPLSAA_parameters(self, charge=None):
@@ -96,9 +96,10 @@ class DATAWriter(base.WriterBase):
96
96
  moltags = atoms.resindices
97
97
  m_l = len(str(moltags.max()))+1
98
98
 
99
+ coordinates = atoms.positions.copy()
99
100
  if self.convert_units:
100
- coordinates = self.convert_pos_to_native(atoms.positions, inplace=False)
101
-
101
+ coordinates = self.convert_pos_to_native(coordinates, inplace=False)
102
+
102
103
  b_l = len(str(int(coordinates.max()))) + 1
103
104
  b_t = b_l + 6
104
105
 
@@ -173,9 +174,9 @@ class DATAWriter(base.WriterBase):
173
174
  """Convert dimensions to triclinic vectors, convert lengths to native
174
175
  units and then write the dimensions section
175
176
  """
177
+ triv = mdamath.triclinic_vectors(dimensions)
176
178
  if self.convert_units:
177
- triv = self.convert_pos_to_native(mdamath.triclinic_vectors(
178
- dimensions),inplace=False)
179
+ triv = self.convert_pos_to_native(triv, inplace=False)
179
180
  self.f.write('\n')
180
181
  self.f.write('{:f} {:f} xlo xhi\n'.format(0., triv[0][0]))
181
182
  self.f.write('{:f} {:f} ylo yhi\n'.format(0., triv[1][1]))
@@ -407,7 +408,7 @@ def write_lammps_coefficients(
407
408
  if improper.id not in np.array(system.impropers.types(), dtype=int):
408
409
  continue
409
410
 
410
- atype = "{}".format(*improper.symbols)
411
+ atype = "{}-{}-{}-{}".format(*improper.symbols)
411
412
  value = "{:>7.4f} {:>2d} {:>2d}".format(*improper.values)
412
413
 
413
414
  fout.write("{:>5} {} # {:<2} | {}\n".format(improper.id, value, atype, improper.resname))
@@ -140,7 +140,7 @@ def map_dihedrals(dihedrals):
140
140
  def map_impropers(impropers):
141
141
 
142
142
  if impropers is None:
143
- return None, None
143
+ return [], {}, np.array([])
144
144
 
145
145
  improper_type_ids = []
146
146
  type_id = 0
@@ -267,49 +267,39 @@ def generate_missing_interactions(nas, interaction_type):
267
267
  continue
268
268
 
269
269
  for mss_interaction in mss_interactions:
270
- found_interaction = False
271
270
  stypes = tuple(nas._smap[ii] for ii in mss_interaction)
272
271
  stypes_rev = stypes[::-1]
273
-
272
+
274
273
  # topology attribute already existing in map
275
274
  if stypes in interaction_type_map or stypes_rev in interaction_type_map:
276
- if found_interaction:
277
- raise ValueError(f"More than one possible {interaction_type[:-1]} found, abort!")
278
-
279
275
  if stypes in interaction_type_map:
280
276
  ninteraction = interaction_type_map[stypes].copy()
281
-
282
277
  else:
283
278
  ninteraction = interaction_type_map[stypes_rev].copy()
284
279
  mss_interaction = mss_interaction[::-1]
285
-
280
+
286
281
  a1, a2, *rest = mss_interaction
287
-
282
+
288
283
  ninteraction._a1 = a1
289
284
  ninteraction._a2 = a2
290
-
285
+
291
286
  if num_atoms > 2:
292
287
  ninteraction._a3 = rest[0]
293
288
  if num_atoms > 3:
294
289
  ninteraction._a4 = rest[1]
295
290
  new_interactions.append(ninteraction)
296
- found_interaction = True
297
-
298
- # new topology attribute
291
+
292
+ # new topology attribute — type not yet defined, create bare object
299
293
  else:
300
- if found_interaction:
301
- raise ValueError(f"More than one possible {interaction_type[:-1]} found, abort!")
302
-
303
294
  a1, a2, *rest = mss_interaction
304
-
295
+
305
296
  if num_atoms == 2:
306
297
  ninteraction = Bond(a1, a2)
307
298
  elif num_atoms == 3:
308
299
  ninteraction = Angle(a1, a2, rest[0])
309
300
  elif num_atoms == 4:
310
301
  ninteraction = Dihedral(a1, a2, rest[0], rest[1])
311
-
302
+
312
303
  new_interactions.append(ninteraction)
313
- found_interaction = True
314
304
 
315
305
  return new_interactions
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mdinterface
3
- Version: 1.5.2
3
+ Version: 1.5.3
4
4
  Summary: Build Interface Systems for Molecular Dynamics Simulations
5
5
  Author-email: Fabrice Roncoroni <fabrice.roncoroni@gmail.com>
6
6
  License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://gitlab.com/roncofaber/mdinterface
8
- Project-URL: Repository, https://gitlab.com/roncofaber/mdinterface.git
9
- Project-URL: Documentation, https://gitlab.com/roncofaber/mdinterface
10
- Project-URL: Bug Tracker, https://gitlab.com/roncofaber/mdinterface/-/issues
7
+ Project-URL: Homepage, https://github.com/roncofaber/mdinterface
8
+ Project-URL: Repository, https://github.com/roncofaber/mdinterface.git
9
+ Project-URL: Documentation, https://roncofaber.github.io/mdinterface
10
+ Project-URL: Bug Tracker, https://github.com/roncofaber/mdinterface/issues
11
11
  Keywords: molecular dynamics,simulation,interface,chemistry,materials science
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Science/Research
@@ -41,12 +41,10 @@ Requires-Dist: pymbxas; extra == "all"
41
41
  Requires-Dist: fairchem-core; extra == "all"
42
42
  Dynamic: license-file
43
43
 
44
- <div style="display: flex; align-items: center;">
45
- <img src="./assets/mdinterface.png" alt="Logo" width="80" style="margin-right: 10px;">
46
- <div style="display: flex; flex-direction: column;">
47
- <h1 style="margin: 0;">mdinterface: Build Interface Systems for Molecular Dynamics Simulations</h1>
48
- </div>
49
- </div>
44
+ <h1>
45
+ <img src="./assets/mdinterface.png" alt="Logo" width="60" style="vertical-align: middle; margin-right: 10px;">
46
+ mdinterface: Build Interface Systems for Molecular Dynamics Simulations
47
+ </h1>
50
48
 
51
49
  [![PyPI version](https://badge.fury.io/py/mdinterface.svg?icon=si%3Apython)](https://pypi.org/project/mdinterface/) [![GitHub version](https://badge.fury.io/gh/roncofaber%2Fmdinterface.svg?icon=si%3Agithub)](https://github.com/roncofaber/mdinterface) [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://roncofaber.github.io/mdinterface)
52
50
 
@@ -38,10 +38,10 @@ dependencies = [
38
38
  ]
39
39
 
40
40
  [project.urls]
41
- Homepage = "https://gitlab.com/roncofaber/mdinterface"
42
- Repository = "https://gitlab.com/roncofaber/mdinterface.git"
43
- Documentation = "https://gitlab.com/roncofaber/mdinterface"
44
- "Bug Tracker" = "https://gitlab.com/roncofaber/mdinterface/-/issues"
41
+ Homepage = "https://github.com/roncofaber/mdinterface"
42
+ Repository = "https://github.com/roncofaber/mdinterface.git"
43
+ Documentation = "https://roncofaber.github.io/mdinterface"
44
+ "Bug Tracker" = "https://github.com/roncofaber/mdinterface/issues"
45
45
 
46
46
  [project.optional-dependencies]
47
47
  resp = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes