Skip to content

Improve the selection strategy in convert() #132

@dprada

Description

@dprada

When the input argument of convert() is used... the initial molecular system is converted twice sometimes to first get the atom list corresponding to the selection, and second, make the conversion. This is notable when:

import molsysmt as msm
msm.convert('181L', selection='molecule_type not in ["water", "ion"]')

In this last case, the PDB ID 181L is downloaded twice:

  • One to make the selection and get the atom indices list
  • One to make the conversion, invoking the method form.string_pdb_id.to_molsysmt_MolSys

This makes no sense, and it should be improved. The selection could be done inside form.string_pdb_id.to_molsysmt_MolSys.

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