flashmd 0.2.2__tar.gz → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flashmd
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Accelerated molecular dynamics with large-time-step predictions
5
5
  Author: flashmd developers
6
6
  License: Apache-2.0
@@ -60,12 +60,14 @@ from flashmd.ase.langevin import Langevin
60
60
 
61
61
 
62
62
  # Choose your time step (go for 10-30x what you would use in normal MD for your system)
63
- time_step = 16 # 16 fs; also available: 1, 2, 4, 8, 32, 64, 128 fs
63
+ time_step = 64 # 64 fs; also available: 1, 2, 4, 8, 16, 32, 128 fs
64
64
 
65
65
  # Create a structure and initialize velocities
66
66
  atoms = ase.build.bulk("Al", "fcc", cubic=True)
67
67
  MaxwellBoltzmannDistribution(atoms, temperature_K=300)
68
- atoms.set_velocities(atoms.get_velocities() - atoms.get_velocities().mean(axis=0))
68
+
69
+ # It is generally a good idea to remove any net velocity from the system
70
+ atoms.set_velocities(atoms.get_velocities() - atoms.get_momenta().sum(axis=0) / atoms.get_masses().sum())
69
71
 
70
72
  # Load models
71
73
  device="cuda" if torch.cuda.is_available() else "cpu"
@@ -132,3 +134,6 @@ pip install flashmd==0.1.2 ase==3.24.0 pet-mad==1.4.3
132
134
 
133
135
  and using the "PET-MAD" models (PBEsol) from https://huggingface.co/lab-cosmo/flashmd.
134
136
  Note that the results were obtained through the i-PI interface.
137
+
138
+ Instructions and material to reproduce the results in the paper are available on
139
+ Materials Cloud at https://doi.org/10.24435/materialscloud:b7-xq.
@@ -31,12 +31,14 @@ from flashmd.ase.langevin import Langevin
31
31
 
32
32
 
33
33
  # Choose your time step (go for 10-30x what you would use in normal MD for your system)
34
- time_step = 16 # 16 fs; also available: 1, 2, 4, 8, 32, 64, 128 fs
34
+ time_step = 64 # 64 fs; also available: 1, 2, 4, 8, 16, 32, 128 fs
35
35
 
36
36
  # Create a structure and initialize velocities
37
37
  atoms = ase.build.bulk("Al", "fcc", cubic=True)
38
38
  MaxwellBoltzmannDistribution(atoms, temperature_K=300)
39
- atoms.set_velocities(atoms.get_velocities() - atoms.get_velocities().mean(axis=0))
39
+
40
+ # It is generally a good idea to remove any net velocity from the system
41
+ atoms.set_velocities(atoms.get_velocities() - atoms.get_momenta().sum(axis=0) / atoms.get_masses().sum())
40
42
 
41
43
  # Load models
42
44
  device="cuda" if torch.cuda.is_available() else "cpu"
@@ -103,3 +105,6 @@ pip install flashmd==0.1.2 ase==3.24.0 pet-mad==1.4.3
103
105
 
104
106
  and using the "PET-MAD" models (PBEsol) from https://huggingface.co/lab-cosmo/flashmd.
105
107
  Note that the results were obtained through the i-PI interface.
108
+
109
+ Instructions and material to reproduce the results in the paper are available on
110
+ Materials Cloud at https://doi.org/10.24435/materialscloud:b7-xq.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "flashmd"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  requires-python = ">=3.9"
5
5
 
6
6
  readme = "README.md"
@@ -27,7 +27,7 @@ class Langevin(VelocityVerlet):
27
27
  self.friction = 1.0 / time_constant
28
28
  self.fixcm = fixcm
29
29
  if self.fixcm:
30
- self.atoms.set_velocities(self.atoms.get_velocities() - self.atoms.get_velocities().mean(axis=0))
30
+ self.atoms.set_velocities(self.atoms.get_velocities() - self.atoms.get_momenta().sum(axis=0) / self.atoms.get_masses().sum())
31
31
 
32
32
  def step(self):
33
33
  self.apply_langevin_half_step()
@@ -43,4 +43,4 @@ class Langevin(VelocityVerlet):
43
43
  ) * np.random.randn(*old_momenta.shape)
44
44
  self.atoms.set_momenta(new_momenta)
45
45
  if self.fixcm:
46
- self.atoms.set_velocities(self.atoms.get_velocities() - self.atoms.get_velocities().mean(axis=0))
46
+ self.atoms.set_velocities(self.atoms.get_velocities() - self.atoms.get_momenta().sum(axis=0) / self.atoms.get_masses().sum())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flashmd
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Accelerated molecular dynamics with large-time-step predictions
5
5
  Author: flashmd developers
6
6
  License: Apache-2.0
@@ -60,12 +60,14 @@ from flashmd.ase.langevin import Langevin
60
60
 
61
61
 
62
62
  # Choose your time step (go for 10-30x what you would use in normal MD for your system)
63
- time_step = 16 # 16 fs; also available: 1, 2, 4, 8, 32, 64, 128 fs
63
+ time_step = 64 # 64 fs; also available: 1, 2, 4, 8, 16, 32, 128 fs
64
64
 
65
65
  # Create a structure and initialize velocities
66
66
  atoms = ase.build.bulk("Al", "fcc", cubic=True)
67
67
  MaxwellBoltzmannDistribution(atoms, temperature_K=300)
68
- atoms.set_velocities(atoms.get_velocities() - atoms.get_velocities().mean(axis=0))
68
+
69
+ # It is generally a good idea to remove any net velocity from the system
70
+ atoms.set_velocities(atoms.get_velocities() - atoms.get_momenta().sum(axis=0) / atoms.get_masses().sum())
69
71
 
70
72
  # Load models
71
73
  device="cuda" if torch.cuda.is_available() else "cpu"
@@ -132,3 +134,6 @@ pip install flashmd==0.1.2 ase==3.24.0 pet-mad==1.4.3
132
134
 
133
135
  and using the "PET-MAD" models (PBEsol) from https://huggingface.co/lab-cosmo/flashmd.
134
136
  Note that the results were obtained through the i-PI interface.
137
+
138
+ Instructions and material to reproduce the results in the paper are available on
139
+ Materials Cloud at https://doi.org/10.24435/materialscloud:b7-xq.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes