molsysmt.form.is_file#

molsysmt.form.is_file(item_or_form)[source]#

Whether a molecular system, or a form name, is one of the file forms.

Parameters:

item_or_form (object) – Argument item_or_form.

Returns:

True when the input is, or names, a form whose items are files.

Return type:

bool

Notes

A path is recognised by its extension, read from the catalogue rather than by asking every form detector in turn. That keeps the question about a name from importing the libraries needed to work with the data behind it.