Has attribute#

Checking if a molecular system’s form has a certain attribute.

Not all forms of a molecular system have the same attributes. For instance, a “string:aminoacids3” system has no atom coordinates, or a “file:prminp” has no atom names. In order to check whether or not a molecular systems’ form has a specific attribute, MolSysMT provides a specific function in the form module: molsysmt.form.has_attribute().

How this function works#

API documentation

Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function:molsysmt.form.has_attribute().

Let’s illustrate the use of molsysmt.form.has_attribute() with the following examples:

import molsysmt as msm
msm.form.has_attribute('file:inpcrd', attribute='box')
True
msm.form.has_attribute('file:inpcrd', attribute='group_name')
False
msm.form.has_attribute(['molsysmt.Topology','file:inpcrd'], attribute='group_name')
True