Skip to content

Commit

Permalink
remove unused self.atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanChain committed Apr 25, 2024
1 parent 42f0805 commit 2ce49d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion netobs/adaptors/deepsolid_vmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def restore(
hartree_fock.init_scf()
klist = hartree_fock.klist

self.atoms = atoms = simulation_cell.original_cell.atom_coords()
atoms = simulation_cell.original_cell.atom_coords()
charges = simulation_cell.original_cell.atom_charges()
latvec = jnp.asarray(simulation_cell.original_cell.lattice_vectors())
self.orig_dist = MinimalImageDistance(latvec)
Expand Down
4 changes: 1 addition & 3 deletions netobs/adaptors/ferminet_vmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ def restore(
)
)

self.atoms = atoms = jnp.stack(
[jnp.array(atom.coords) for atom in cfg.system.molecule]
)
atoms = jnp.stack([jnp.array(atom.coords) for atom in cfg.system.molecule])
charges = jnp.array([atom.charge for atom in cfg.system.molecule])

self.kinetic_energy = make_kinetic_energy(
Expand Down
6 changes: 4 additions & 2 deletions netobs/adaptors/simple_hydrogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ def restore(
axis=-1,
)

self.atoms = jnp.array([[0.0, 0.0, 0.0]])
system = MolecularSystem(
atoms=self.atoms, charges=jnp.array([1]), spins=(1, 0), ndim=3
atoms=jnp.array([[0.0, 0.0, 0.0]]),
charges=jnp.array([1]),
spins=(1, 0),
ndim=3,
)
aux_data = HydrogenAuxData(mcmc_width=jnp.array([0.6]))
return (jnp.array([0]), data, system, aux_data)
Expand Down

0 comments on commit 2ce49d2

Please sign in to comment.