-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swap_existing_ligand_parameters with OPC water #1769
Comments
Could you describe, or share code for, how you're using OPC? |
I created prmtop and rst7 using tleap:
then I used these two files as input into the notebook to make the parmed structure: in_prmtop = "gaff_opc_vdw.prmtop"
in_crd = "gaff_opc_vdw.rst7"
orig_structure = parmed.amber.AmberParm(in_prmtop, in_crd)
pieces = orig_structure.split()
ligand_off_molecule = Molecule("biliverdin.sdf")
ligand_pdbfile = PDBFile("biliverdin.pdb")
ligand_off_topology = Topology.from_openmm(
ligand_pdbfile.topology,
unique_molecules=[ligand_off_molecule],
)
force_field = ForceField("openff_unconstrained-2.0.0.offxml")
ligand_system = force_field.create_openmm_system(ligand_off_topology)
new_ligand_structure = parmed.openmm.load_topology(
ligand_off_topology.to_openmm(),
ligand_system,
xyz=pieces[0][0].positions,
)
just_water_structure = parmed.Structure()
just_water_structure += pieces[1][0]
just_water_structure *= len(pieces[1][1])
new_ligand_structure += parmed.amber.AmberParm.from_structure(just_water_structure)
new_ligand_structure.coordinates = orig_structure.coordinates
new_ligand_structure.box_vectors = orig_structure.box_vectors
new_ligand_structure.save("test.rst7", overwrite=True)
new_ligand_structure.save("test.prmtop", overwrite=True) |
All the files are here |
Thanks for the reproduction and files - I will try to dig into it more later, but a couple things stand out to me at surface-level, which is all I have time for immediately:
All that being said - is your goal to run a protein-ligand complex in Amber using Sage, OPC and ff19SB for the ligand, water, and protein, respectively? If you can substitute ff14SB instead 1 you can do this all within OpenFF tools, and I'd point you to this example instead. I think the "swap existing parameters" example is there to show it's possible, not that it's necessarily the best way to prepare a system. Footnotes
|
Thanks for the quick response Matt. The endgoal it to add the protein but for now I just have a ligand in water. Sage for the ligand and OPC for the water. Indeed it is a warning, but it cannot be neglected because in the output parameter file it duplicates EP (extra points that the opc water molecules have). It does it right after: new_ligand_structure.coordinates = orig_structure.coordinates but I do not understand why. Also I forgot to mention, the callback comes from _amberparm.py in case you have a look at it. I did exactly the same procedure with TIP3P water (has no EPs) and it works just fine so I assume it is an EP issue. I will look into Interchange, thank you for the suggestion. |
Sage with OPC ligands should work fine in OpenMM, and maybe in GROMACS but I forget right now. Interchange doesn't yet support writing OPC water to Amber, but I'm trying to figure out how to implement it (tracking: openforcefield/openff-interchange#783). |
Has this been tested with OPC water. I keep getting
AmberWarning: Molecule atoms are not contiguous! Attempting to reorder to fix.
warn('Molecule atoms are not contiguous! Attempting to reorder to fix.', AmberWarning)
after combing my ligand structure with the opc structure.
The text was updated successfully, but these errors were encountered: