Skip to content

Commit 2227289

Browse files
committed
update readme
1 parent a93c69d commit 2227289

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

README.md

+4-12
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ class Smiles2Conformers(zntrack.Node):
9999
frames_path: Path = zntrack.outs_path(zntrack.nwd / "frames.xyz") # Output file path
100100

101101
def run(self) -> None:
102-
# Generate molecular conformers from a SMILES string
103102
frames = smiles2conformers(smiles=self.smiles, numConfs=self.numConfs)
104-
# Save the frames to the output file
105103
ase.io.write(frames, self.frames_path)
106104

107105
@property
@@ -119,9 +117,7 @@ class Pack(zntrack.Node):
119117
frames_path: Path = zntrack.outs_path(zntrack.nwd / "frames.xyz") # Output file path
120118

121119
def run(self) -> None:
122-
# Pack the molecular frames into a periodic box
123120
box = pack(data=self.data, counts=self.counts, density=self.density)
124-
# Save the packed structure to the output file
125121
ase.io.write(box, self.frames_path)
126122

127123
@property
@@ -140,7 +136,6 @@ class MACE_MP:
140136
model: str = "medium" # Default model type
141137

142138
def get_calculator(self, **kwargs):
143-
# Return a MACE-MP calculator instance
144139
return mace_mp(model=self.model)
145140

146141

@@ -153,11 +148,8 @@ class StructureOptimization(zntrack.Node):
153148
frames_path: Path = zntrack.outs_path(zntrack.nwd / "frames.traj") # Output file path
154149

155150
def run(self):
156-
# Select the structure to optimize
157151
atoms = self.data[self.data_id]
158-
# Attach the MACE-MP calculator
159152
atoms.calc = self.model.get_calculator()
160-
# Run the geometry optimization
161153
dyn = LBFGS(atoms, trajectory=self.frames_path)
162154
dyn.run(fmax=0.5)
163155

@@ -194,15 +186,15 @@ Now that we’ve defined all the necessary Nodes, we can build and execute the w
194186

195187
# Build the workflow graph
196188
with project:
197-
etoh = Smiles2Conformers(smiles="CCO", numConfs=32) # Generate conformers
198-
box = Pack(data=[etoh.frames], counts=[32], density=789) # Pack the structures
199-
optm = StructureOptimization(model=model, data=box.frames, data_id=-1, fmax=0.5) # Optimize the structure
189+
etoh = Smiles2Conformers(smiles="CCO", numConfs=32)
190+
box = Pack(data=[etoh.frames], counts=[32], density=789)
191+
optm = StructureOptimization(model=model, data=box.frames, data_id=-1, fmax=0.5)
200192

201193
# Execute the workflow
202194
project.repro()
203195
```
204196

205-
> **TIP**
197+
> [!TIP]
206198
> If you don’t want to execute the graph immediately, use `project.build()` instead. You can run the graph later using `dvc repro` or the [paraffin](https://github.com/zincware/paraffin) package.
207199
208200
#### Accessing Results

0 commit comments

Comments
 (0)