evangelistalab / forte

http://www.evangelistalab.org
GNU Lesser General Public License v3.0
50 stars 28 forks source link

Introducing Modules #361

Closed fevangelista closed 9 months ago

fevangelista commented 9 months ago

Description

This is a second attempt at creating a modular Python side code. The old Node-based codes is still around but will be soon be replaced by the Module system. This PR takes the more pragmatic approach of adapting current code, and slowly porting functionality to the Module system.

The new Module system works this way. The class ForteData holds the forte objects (MOSpaceInfo, etc.) and modules implement a function run() that takes a ForteData object and returns a new one, like this:

import forte
from forte.modules import HF, FCI, Ints, GraphVisualizer
from forte import ForteData

data = ForteData()

ints = Ints()
hf = HF(ints)
fci = FCI(hf)
fci.run(data)

User Notes

Checklist