schrodinger.application.matsci.qexsd.qespresso.documents module

class schrodinger.application.matsci.qexsd.qespresso.documents.QeDocument(xsd_file, input_builder)

Bases: schrodinger.application.matsci.qexsd.qespresso.xsdtypes.xmldocument.XmlDocument

Abstract class for XML schema based configurations.

__init__(xsd_file, input_builder)
read_qe_input(filename)

Map from a Fortran input to XML old parameters to correspondent parameter in XML schema.

Parameters

filename

Returns

write_qe_input(filename)

Write the XML configuration to a Fortran input.

Parameters

filename

Returns

get_input_path()
get_qe_input(use_defaults=True)
load_fortran_input(filename)
extra_validations(xlm_tree)

Hook for ad-hoc validations of dependencies between parameters that are not explainable with the XSD schema.

find(path, namespaces=None)

Find first matching element by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

findall(path, namespaces=None)

Find all matching subelements by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

from_dict()

Build an ElementTree object from a dictionary

get(qualified_name)
iter(tag=None)
parse_json(filename)

Build an ElementTree object representing a YAML file

parse_xml(filename)

Return an ElementTree object representing an XML file

parse_yaml(filename)

Build an ElementTree object representing a YAML file

read(filename, data_format='XML')

Read configuration from a text file in a specific data format.

Parameters
  • filename – Name of the text file containing the configuration

  • data_format – Input file data format (XML, JSON or YAML)

read_string(text)
to_dict()
to_json()

Converts the configuration to to json.

validate(filename=None)
write(filename, output_format='XML')

Write configuration to a text file in a specific data format.

Parameters
  • filename

  • output_format

Returns

class schrodinger.application.matsci.qexsd.qespresso.documents.PwDocument

Bases: schrodinger.application.matsci.qexsd.qespresso.documents.QeDocument

Class to manage PW XML documents.

__init__()
get_input_path()
extra_validations(xlm_tree)

Hook for ad-hoc validations of dependencies between parameters that are not explainable with the XSD schema.

find(path, namespaces=None)

Find first matching element by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

findall(path, namespaces=None)

Find all matching subelements by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

from_dict()

Build an ElementTree object from a dictionary

get(qualified_name)
get_qe_input(use_defaults=True)
iter(tag=None)
load_fortran_input(filename)
parse_json(filename)

Build an ElementTree object representing a YAML file

parse_xml(filename)

Return an ElementTree object representing an XML file

parse_yaml(filename)

Build an ElementTree object representing a YAML file

read(filename, data_format='XML')

Read configuration from a text file in a specific data format.

Parameters
  • filename – Name of the text file containing the configuration

  • data_format – Input file data format (XML, JSON or YAML)

read_qe_input(filename)

Map from a Fortran input to XML old parameters to correspondent parameter in XML schema.

Parameters

filename

Returns

read_string(text)
to_dict()
to_json()

Converts the configuration to to json.

validate(filename=None)
write(filename, output_format='XML')

Write configuration to a text file in a specific data format.

Parameters
  • filename

  • output_format

Returns

write_qe_input(filename)

Write the XML configuration to a Fortran input.

Parameters

filename

Returns

class schrodinger.application.matsci.qexsd.qespresso.documents.PhononDocument

Bases: schrodinger.application.matsci.qexsd.qespresso.documents.QeDocument

Class to manage Phonon XML documents.

__init__()
get_input_path()
get_qe_input(use_defaults=False)

overrides get_qe_input calling super get_qe_input with use_defaults set to False. :param use_defaults: :return: the input as obtained from its input builder

extra_validations(xlm_tree)

Hook for ad-hoc validations of dependencies between parameters that are not explainable with the XSD schema.

find(path, namespaces=None)

Find first matching element by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

findall(path, namespaces=None)

Find all matching subelements by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

from_dict()

Build an ElementTree object from a dictionary

get(qualified_name)
iter(tag=None)
load_fortran_input(filename)
parse_json(filename)

Build an ElementTree object representing a YAML file

parse_xml(filename)

Return an ElementTree object representing an XML file

parse_yaml(filename)

Build an ElementTree object representing a YAML file

read(filename, data_format='XML')

Read configuration from a text file in a specific data format.

Parameters
  • filename – Name of the text file containing the configuration

  • data_format – Input file data format (XML, JSON or YAML)

read_qe_input(filename)

Map from a Fortran input to XML old parameters to correspondent parameter in XML schema.

Parameters

filename

Returns

read_string(text)
to_dict()
to_json()

Converts the configuration to to json.

validate(filename=None)
write(filename, output_format='XML')

Write configuration to a text file in a specific data format.

Parameters
  • filename

  • output_format

Returns

write_qe_input(filename)

Write the XML configuration to a Fortran input.

Parameters

filename

Returns

class schrodinger.application.matsci.qexsd.qespresso.documents.NebDocument

Bases: schrodinger.application.matsci.qexsd.qespresso.documents.QeDocument

Class to manage NEB XML documents.

__init__()
get_input_path()
extra_validations(xlm_tree)

Hook for ad-hoc validations of dependencies between parameters that are not explainable with the XSD schema.

find(path, namespaces=None)

Find first matching element by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

findall(path, namespaces=None)

Find all matching subelements by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

from_dict()

Build an ElementTree object from a dictionary

get(qualified_name)
get_qe_input(use_defaults=True)
iter(tag=None)
load_fortran_input(filename)
parse_json(filename)

Build an ElementTree object representing a YAML file

parse_xml(filename)

Return an ElementTree object representing an XML file

parse_yaml(filename)

Build an ElementTree object representing a YAML file

read(filename, data_format='XML')

Read configuration from a text file in a specific data format.

Parameters
  • filename – Name of the text file containing the configuration

  • data_format – Input file data format (XML, JSON or YAML)

read_qe_input(filename)

Map from a Fortran input to XML old parameters to correspondent parameter in XML schema.

Parameters

filename

Returns

read_string(text)
to_dict()
to_json()

Converts the configuration to to json.

validate(filename=None)
write(filename, output_format='XML')

Write configuration to a text file in a specific data format.

Parameters
  • filename

  • output_format

Returns

write_qe_input(filename)

Write the XML configuration to a Fortran input.

Parameters

filename

Returns

class schrodinger.application.matsci.qexsd.qespresso.documents.TdDocument

Bases: schrodinger.application.matsci.qexsd.qespresso.documents.QeDocument

Class to manage TDDFPT

__init__()
get_input_path()
extra_validations(xlm_tree)

Hook for ad-hoc validations of dependencies between parameters that are not explainable with the XSD schema.

find(path, namespaces=None)

Find first matching element by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

findall(path, namespaces=None)

Find all matching subelements by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

from_dict()

Build an ElementTree object from a dictionary

get(qualified_name)
get_qe_input(use_defaults=True)
iter(tag=None)
load_fortran_input(filename)
parse_json(filename)

Build an ElementTree object representing a YAML file

parse_xml(filename)

Return an ElementTree object representing an XML file

parse_yaml(filename)

Build an ElementTree object representing a YAML file

read(filename, data_format='XML')

Read configuration from a text file in a specific data format.

Parameters
  • filename – Name of the text file containing the configuration

  • data_format – Input file data format (XML, JSON or YAML)

read_qe_input(filename)

Map from a Fortran input to XML old parameters to correspondent parameter in XML schema.

Parameters

filename

Returns

read_string(text)
to_dict()
to_json()

Converts the configuration to to json.

validate(filename=None)
write(filename, output_format='XML')

Write configuration to a text file in a specific data format.

Parameters
  • filename

  • output_format

Returns

write_qe_input(filename)

Write the XML configuration to a Fortran input.

Parameters

filename

Returns

class schrodinger.application.matsci.qexsd.qespresso.documents.SpectrumDocument

Bases: schrodinger.application.matsci.qexsd.qespresso.documents.QeDocument

Class to manage turbo-spectrum inputs

__init__()
get_input_path()
extra_validations(xlm_tree)

Hook for ad-hoc validations of dependencies between parameters that are not explainable with the XSD schema.

find(path, namespaces=None)

Find first matching element by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

findall(path, namespaces=None)

Find all matching subelements by tag name or path.

Parameters
  • path – is a string having either an element tag or an XPath,

  • namespaces – is an optional mapping from namespace prefix to full name.

Returns

the first matching element, or None if no element was found

from_dict()

Build an ElementTree object from a dictionary

get(qualified_name)
get_qe_input(use_defaults=True)
iter(tag=None)
load_fortran_input(filename)
parse_json(filename)

Build an ElementTree object representing a YAML file

parse_xml(filename)

Return an ElementTree object representing an XML file

parse_yaml(filename)

Build an ElementTree object representing a YAML file

read(filename, data_format='XML')

Read configuration from a text file in a specific data format.

Parameters
  • filename – Name of the text file containing the configuration

  • data_format – Input file data format (XML, JSON or YAML)

read_qe_input(filename)

Map from a Fortran input to XML old parameters to correspondent parameter in XML schema.

Parameters

filename

Returns

read_string(text)
to_dict()
to_json()

Converts the configuration to to json.

validate(filename=None)
write(filename, output_format='XML')

Write configuration to a text file in a specific data format.

Parameters
  • filename

  • output_format

Returns

write_qe_input(filename)

Write the XML configuration to a Fortran input.

Parameters

filename

Returns