Psivant / femto

A comprehensive toolkit for predicting free energies
https://psivant.github.io/femto/
MIT License
49 stars 7 forks source link

Cant run example of SepTop #17

Closed ErikZhang-9762 closed 2 weeks ago

ErikZhang-9762 commented 4 months ago

I'm trying to run the example : https://psivant.github.io/femto/latest/guide-septop/

when:

complex_structure, complex_system = femto.fe.septop.setup_complex(
    config,
    receptor,
    ligand_1,
    ligand_2
)

error happen:

AttributeError: 'SepTopConfig' object has no attribute 'restraints'

the config is defined by:

import femto.fe.septop

config = femto.fe.septop.SepTopConfig()
ErikZhang-9762 commented 4 months ago

use of config.complex.setup instead of config

complex_structure, complex_system = femto.fe.septop.setup_complex(
    config.complex.setup,
    receptor,
    ligand_1,
    ligand_2
)

The above error no longer occurs.

but new error happen when: receptor_ref_idxs_2 = femto.fe.reference.select_receptor_idxs:

IndexError: index 53 is out of bounds for axis 1 with size 42
ErikZhang-9762 commented 4 months ago
ligand_1, ligand_2 = femto.md.system.load_ligands(
    ligand_1_coords=eralpha_dir / "forcefield/2d/vacuum.mol2",
    ligand_1_params=eralpha_dir / "forcefield/2d/vacuum.parm7",
    ligand_2_coords=eralpha_dir / "forcefield/2e/vacuum.mol2",
    ligand_2_params=eralpha_dir / "forcefield/2e/vacuum.parm7",
)

When I replaced 2d and 2e with 3a and 3b, the error disappeared. It's weird. I don't know why that is.

SimonBoothroyd commented 3 months ago

use of config.complex.setup instead of config

good catch!

but new error happen when: receptor_ref_idxs_2 = femto.fe.reference.select_receptor_idxs:

this should be fixed by #16!