Giter Site home page Giter Site logo

Comments (4)

martimunicoy avatar martimunicoy commented on June 12, 2024

Support

A new branch called OBC_for_OPLS has been created. It contains a new method called _add_GBSA_solvent_parameters() to be filled with the parameterization pipeline from the solventOBCParamsGenerator.py script.

from peleffy.

martimunicoy avatar martimunicoy commented on June 12, 2024

The original script required atom degrees to perform the parameterization. Consequently, we need method to extract atom degrees from our molecule representation. This can be done with RDKit in a very straightforward way:

rdkit_molecule = molecule.rdkit_molecule

atom_degrees = list()

for atom in rdkit_molecule.GetAtoms():
    atom_degrees.append(atom.GetDegree())

from peleffy.

martimunicoy avatar martimunicoy commented on June 12, 2024

Besides, in case the parent atom of any atom is needed (for instance, thinking on identifying the atom a hydrogen atom is bonded to), the Atom's attribute parent stores the reference of the its parent atom. This attribute is set when initializing the Molecule representation in peleffy.
Atom objects are accessible after parameterizing the Molecule:

molecule = Molecule(smiles='CCC')
molecule.parameterize('openff_unconstrained-1.2.1.offxml')

for atom in molecule.atoms:
    if atom.parent is None:
        continue
    print(atom.parent.index)

Note that there is always an Atom without a parent Atom (its parent is set to None). This is the absolute parent atom according to the built molecular graph. However, a terminal atom such as hydrogen should never be the absolute parent atom and, therefore, it will never have a None parent atom.

from peleffy.

laumalo avatar laumalo commented on June 12, 2024

Implementation

The method _add_GBSA_solvent_parameters() has been filled with the parameterization pipeline from the solventOBCParamsGenerator.py script.

Different features from the solventOBCParamsGenerator.py script have been introduced:

  • When only one of the two parameters is found, the default parameters are returned. In the solventOBCParamsGenerator.py script, the parameter found was return and the non-found parameter was not defined.
  • The parameters lists are saved in a JSON file.

Tests

The function test_add_GBSA_solvent_parameters has been implemented and tests the new method for adding the GBSA solvent parameters for the following ligands: methane.pdb, melatone.pdb and ethylene.pdb.

from peleffy.

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.