Skip to content

some observation on orb-v3 in protein systems #137

@arogozhnikov

Description

@arogozhnikov

Hi Orb team, I've found your experiments on carbonic anhydrase II very interesting (you didn't observe non-physical behaviors).

I decided to try minimizing energy of protein from RCSB. Tried several proteins, and it didn't quite work for any of them. Here is an example:

from orb_models.forcefield import pretrained
from orb_models.forcefield.calculator import ORBCalculator
from ase.io import write, read

# https://files.rcsb.org/download/171L.pdb , note - no water molecules
atoms = read("./files/171L.pdb")

atoms.info['charge'] = 0
atoms.info['spin'] = 0

device="cuda"
orbff = pretrained.orb_v3_conservative_omol(device=device)
calc = ORBCalculator(orbff, device=device)
atoms.calc = calc

write('./files/sim_before.pdb', atoms)
for _step in range(1000):
    forces = atoms.get_forces()
    forces_normed = forces / (((forces ** 2).sum(axis=1, keepdims=True) + 0.0001) ** 0.5)
    # globally shift but 5x slower - to visually confirm we provided right amount of disturbance during optimization
    atoms.set_positions(atoms.get_positions() + forces_normed * 0.005 + 0.001)
    if _step % 10 == 0:
        print(f'{_step:>4} {atoms.get_total_energy():9.2f}')

write('./files/sim_after.pdb', atoms)

We make 1000 tiny steps to make sure we never jump too much to break bond. Loss slightly goes down:

   0 -1727940.75
 100 -1728644.88
 990 -1728797.12

Yet that's what I see in the end:

5-ring was broken ( green is after optimization, orange is before, we're looking at the same fragment )
Image

many sidechains became almost straight - that's very non-physical. In multiple sidechains some bond is broken and part of aminoacid starts travelling around.
Image

I've tried using optimizers at first like FIRE, but non-physical behaviors are seen even sooner.

Maybe you have some ideas what can be wrong with this approach or how this can be fixed? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions