Coder Social home page Coder Social logo

Comments (6)

xiki-tempula avatar xiki-tempula commented on September 2, 2024 1

Ok one need to add the line of parmed_structure.residues[0].name = "Lig"

from openff-bespokefit.

jthorton avatar jthorton commented on September 2, 2024

Hi @xiki-tempula glad you managed to make a bespoke force field! To export the parameters for a different simulation engine it is recommended that you make an OpenMM system using the OpenFF-Toolkit and then use OpenFF-Interchange or parmed as you have above. Here are some notebook examples using interchange or parmed, I hope this helps let m know if you have any issues.

from openff-bespokefit.

xiki-tempula avatar xiki-tempula commented on September 2, 2024

@jthorton Thanks. I think this is essentially what I'm doing in this code. I wonder if you mind help me on this?
I have attached the file that I'm using here. Thank you.
Archive.zip

from openff-bespokefit.

jthorton avatar jthorton commented on September 2, 2024

@xiki-tempula not quite you need to use the OpenFF-Toolkit to read offxml force field files rather than OpenMM directly, see the code attached which should work on your example. Let me know if there is anything else I can help with!

from openff.toolkit.typing.engines.smirnoff import ForceField
from openff.toolkit.topology import Molecule
import parmed

# load the molecule and the force field using the toolkit
molecule = Molecule.from_file("Archive/lig.sdf")
ff = ForceField("Archive/lig.offxml")

# create an openmm system
openmm_system = ff.create_openmm_system(molecule.to_topology())

# Convert OpenMM System to a ParmEd structure.
parmed_structure = parmed.openmm.load_topology(
    molecule.to_topology().to_openmm(), openmm_system, molecule.conformers[0]
)
parmed_structure.save("system.top", overwrite=True)
parmed_structure.save("system.gro", overwrite=True)

from openff-bespokefit.

xiki-tempula avatar xiki-tempula commented on September 2, 2024

Thanks.

from openff-bespokefit.

xiki-tempula avatar xiki-tempula commented on September 2, 2024

Thanks. I wonder if it is possible to add the molecule name?
If you check the gromacs output, it is

[ moleculetype ]
; Name            nrexcl
          3

Which lacks the name of moleculetype.
This should normally be something like

[ moleculetype ]
; Name            nrexcl
lig          3

from openff-bespokefit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.