Skip to content

Commit 4194249

Browse files
committed
Add energy-function-factory to make-trainer
1 parent 558c2e5 commit 4194249

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lisp/topology/assembler.lisp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ ENERGY-FUNCTION-FACTORY - If defined, call this with the aggregate to make the e
732732
#| :tune-energy-function tune-energy-function
733733
:keep-interaction-factory-factory keep-interaction-factory-factory))|#
734734

735-
(defun make-training-assembler (oligomers &key focus-monomer incomplete-monomer-contexts)
735+
(defun make-training-assembler (oligomers &key focus-monomer incomplete-monomer-contexts energy-function-factory)
736736
"Build a assembler for the oligomers. This is used for building training molecules."
737737
#+(or)
738738
(unless focus-monomer
@@ -753,7 +753,9 @@ ENERGY-FUNCTION-FACTORY - If defined, call this with the aggregate to make the e
753753
(resize-atmolecules atagg (length oligomers))
754754
atagg))
755755
(joint-tree (make-joint-tree))
756-
(energy-function (chem:make-energy-function :matter aggregate))
756+
(energy-function (if energy-function-factory
757+
(funcall energy-function-factory aggregate)
758+
(chem:make-energy-function :matter aggregate)))
757759
(assembler (loop for oligomer-molecule in oligomer-molecules
758760
for oligomer = (car oligomer-molecule)
759761
for molecule = (cdr oligomer-molecule)

0 commit comments

Comments
 (0)