schrodinger.application.desmond.cns_io module

class schrodinger.application.desmond.cns_io.CNSData(fname, create_grid_st=True)

Bases: object

__init__(fname, create_grid_st=True)

Initialize self. See help(type(self)) for accurate signature.

__del__()
write(cns_fname, remark='')
get_grid_data(x, y, z)
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.cns_io', '__init__': <function CNSData.__init__>, '__del__': <function CNSData.__del__>, '_parse_cns': <function CNSData._parse_cns>, '_prepare_grid_st': <function CNSData._prepare_grid_st>, 'write': <function CNSData.write>, 'get_grid_data': <function CNSData.get_grid_data>, '__dict__': <attribute '__dict__' of 'CNSData' objects>, '__weakref__': <attribute '__weakref__' of 'CNSData' objects>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.cns_io'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.desmond.cns_io.write_cns(grid, length, spacing, filename)

This function writes out a volumetric file (.cns) in CNS/XPLOR format

Parameters:
  • grid (numpy.array) – a 3 dimensional numpy.array of float
  • length (list of float, or numpy.array) – the length of the box (x,y,z)
  • spacing (list of float, or numpy.array) – the spacing of the grid (x,y,z)
  • filename (str) – filename to write the grid to