Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
protocols::moves::PyMOLMover Class Reference

Special Mover designed to send Pose information into PyMOL instance running. More...

#include <PyMOLMover.hh>

Inheritance diagram for protocols::moves::PyMOLMover:
Inheritance graph
[legend]

Public Member Functions

 PyMOLMover (std::string const &address=default_address(), unsigned int port=default_port(), unsigned int max_packet_size=0)
 ctor More...
 
void apply (Pose &) override
 Main Method. More...
 
virtual void apply (Pose const &)
 Actually our mover does not change the Pose object, so we have additional const version... More...
 
void print (std::string const &message)
 Send message for PyMOL to print. More...
 
void send_energy (Pose const &, core::scoring::ScoreType stype=core::scoring::total_score)
 Send specified energy to PyMOL. More...
 
void send_energy (Pose const &, std::string const &stype)
 Send specified energy to PyMOL. More...
 
void send_RAW_Energies (Pose const &, std::string energyType, utility::vector1< int > const &energies)
 Send RAW energy array for coloring by PyMOL already implemented. More...
 
void send_membrane_planes (Pose const &)
 Send Membrane Planes to PyMOL. More...
 
void send_any (std::string ptype, core::pose::Pose const &pose, utility::vector1< std::string > data, core::Size size=6)
 Xiyao's Code. More...
 
void label_energy (Pose const &input_pose, std::string energy_type)
 Xiyao's Code. More...
 
void send_hbonds (Pose const &pose)
 
void send_ss (Pose &pose, std::string ss)
 
void send_polars (Pose const &pose)
 
void send_movemap (Pose const &pose, core::kinematics::MoveMap const &movemap)
 
void send_foldtree (Pose const &pose, core::kinematics::FoldTree const &foldtree)
 
virtual void send_colors (Pose const &, std::map< int, int > const &colors, X11Colors default_color=protocols::moves::XC_blue)
 End Xiyao's Code. More...
 
std::string pymol_name ()
 Specify PyMOL model name. More...
 
void pymol_name (std::string new_pymol_name)
 
bool update_energy ()
 Flag that specify if PyMOL mover should send current Pose energy on every apply. If name set to empty string (default) then name derived from pdb_info will be used. More...
 
void update_energy (bool f)
 
core::scoring::ScoreType energy_type (void)
 
void energy_type (core::scoring::ScoreType t)
 
void keep_history (bool kh)
 Set the keep history flag. If set to True - PyMOL will keep track of all frames that was sent. More...
 
bool keep_history (void)
 Return current keep_history flag. More...
 
void update_interval (core::Real t)
 Set current minimum update interval 't' in seconds. Mover will not send anyinformation to PyMOL before atleast 't' secons has passes since last packet was sent. default value is 0, - no packets are skipped. More...
 
core::Real update_interval ()
 Return current update interval. More...
 
void show (std::ostream &output=std::cout) const override
 Outputs details about the Mover, including current settings. More...
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &) override
 Parses tag for rosetta scripts. More...
 
protocols::moves::MoverOP fresh_instance () const override
 required in the context of the parser/scripting scheme More...
 
protocols::moves::MoverOP clone () const override
 required in the context of the parser/scripting scheme More...
 
void set_PyMOL_model_name (std::string name)
 Set the pymol model name. More...
 
void set_link (UDPSocketClient const &link)
 
UDPSocketClient const & get_link () const
 
std::string get_PyMOL_model_name (Pose const &pose) const
 
std::string get_name () const override
 Each derived class must specify its name. The class name. More...
 
- Public Member Functions inherited from protocols::moves::Mover
 Mover ()
 
virtual MoverOP create ()
 
MoverCOP get_self_ptr () const
 
MoverOP get_self_ptr ()
 
MoverCAP get_self_weak_ptr () const
 
MoverAP get_self_weak_ptr ()
 
 Mover (std::string const &type_name)
 sets the type for a mover; name_ has been removed (2010/05/14) More...
 
virtual void test_move (Pose &pose)
 : Unit test support function. Apply one move to a given pose. Allows extra test specific functions to be called before applying More...
 
virtual bool reinitialize_for_each_job () const
 Inform the Job Distributor (August '08 vintage) whether this object needs to be freshly regenerated on each use. More...
 
virtual bool reinitialize_for_new_input () const
 Inform the Job Distributor (August '08 vintage) whether this object needs to be regenerated when the input pose is about to change, (for example, if the Mover has special code on the first apply() that is only valid for that one input pose). More...
 
MoverStatus get_last_move_status () const
 end parser interface, start Job Distributor interface///////////// More...
 
void reset_status ()
 resets status to SUCCESS, meant to be used before an apply(). The job distributor (august 08 vintage) uses this to ensure non-accumulation of status across apply()s. More...
 
virtual core::pose::PoseOP get_additional_output ()
 Mechanism by which a mover may return multiple output poses from a single input pose. More...
 
void set_type (std::string const &setting)
 Set the 'type' string. More...
 
std::string get_type () const
 
void type (const std::string &type_in)
 Set the 'type' string. More...
 
std::string const & type () const
 Get the set 'type' string. More...
 
virtual void set_input_pose (PoseCOP pose)
 setter for poses contained for rms More...
 
virtual void set_native_pose (PoseCOP pose)
 setter for native poses contained for rms -— we should get rid of this method? it is widely used, but a bit unsafe More...
 
PoseCOP get_input_pose () const
 
PoseCOP get_native_pose () const
 
void set_current_job (protocols::jobdist::BasicJobCOP job)
 
jobdist::BasicJobCOP get_current_job () const
 
virtual void set_current_tag (std::string const &new_tag)
 
std::string get_current_tag () const
 A tag is a unique identifier used to identify structures produced by this Mover. get_current_tag() returns the tag, and set_current_tag( std::string tag ) sets the tag. This functionality is not intended for use with the 2008 job distributor. More...
 
virtual core::Real last_proposal_density_ratio ()
 
virtual void clear_info ()
 Strings container can be used to return miscellaneous info (as std::string) from a mover, such as notes about the results of apply(). The job distributor (Apr 09 vintage) will check this function to see if your protocol wants to add string info to the Job that ran this mover. One way this can be useful is that later, a JobOutputter may include/append this info to an output file. More...
 
virtual Stringsinfo ()
 non-const accessor More...
 
virtual Strings const & info () const
 const accessor More...
 
virtual bool mover_provides_citation_info () const
 Does this mover provide information about how to cite it? More...
 
virtual utility::vector1
< basic::citation_manager::CitationCollectionCOP > 
provide_citation_info () const
 Provide the citation. More...
 
virtual bool mover_is_unpublished () const
 Does this mover indicate that it is unpublished (and, by extension, that the author should be included in publications resulting from it)? More...
 
virtual utility::vector1
< basic::citation_manager::UnpublishedModuleInfoCOP > 
provide_authorship_info_for_unpublished () const
 Provide a list of authors and their e-mail addresses, as strings. More...
 

Static Public Member Functions

static std::string mover_name ()
 
static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 
- Static Public Member Functions inherited from protocols::moves::Mover
static std::string name ()
 
static void register_options ()
 Overload this static method if you access options within the mover. More...
 

Private Member Functions

utility::vector1< core::Realget_energies (Pose const &pose, core::scoring::ScoreType energy_type)
 return vector of energy_type energy for each residue More...
 
std::string get_pose_name (Pose const &pose)
 return name, stripped of path and ".pdb" More...
 
bool is_it_time ()
 End Xiyao's code. More...
 

Static Private Member Functions

static std::string default_address ()
 
static unsigned int default_port ()
 
static unsigned int default_max_packet_size (std::string const &address)
 

Private Attributes

UDPSocketClient link_
 Actual link object. More...
 
bool update_energy_
 
core::scoring::ScoreType energy_type_
 
bool update_membrane_
 If pose is a membrane pose, send planes. More...
 
bool keep_history_
 Should PyMOL keep history of all models that was sent? - Default is false. More...
 
core::Real update_interval_
 Update interval in seconds. More...
 
core::Real last_packet_sent_time_
 Time stamp from where last packet was sent. More...
 
std::string pymol_name_
 Name of model in pymol. More...
 

Additional Inherited Members

- Public Types inherited from protocols::moves::Mover
typedef utility::tag::TagCOP TagCOP
 
typedef core::pose::Pose Pose
 
typedef core::pose::PoseCOP PoseCOP
 
typedef std::list< std::string > Strings
 
- Protected Member Functions inherited from protocols::moves::Mover
void set_last_move_status (MoverStatus status)
 nonvirtual setter for MoverStatus last_status_. Protected means that only the mover itself will be able to change its own status. The job distributor (august 08 vintage) is aware of status set with this function and will do what the MoverStatus says. More...
 

Detailed Description

Special Mover designed to send Pose information into PyMOL instance running.

Constructor & Destructor Documentation

protocols::moves::PyMOLMover::PyMOLMover ( std::string const &  address = default_address(),
unsigned int  port = default_port(),
unsigned int  max_packet_size = 0 
)

ctor

Member Function Documentation

void protocols::moves::PyMOLMover::apply ( Pose )
overridevirtual
void protocols::moves::PyMOLMover::apply ( Pose const &  pose)
virtual
protocols::moves::MoverOP protocols::moves::PyMOLMover::clone ( ) const
overridevirtual

required in the context of the parser/scripting scheme

Reimplemented from protocols::moves::Mover.

std::string protocols::moves::PyMOLMover::default_address ( )
staticprivate

Referenced by parse_my_tag(), and provide_xml_schema().

unsigned int protocols::moves::PyMOLMover::default_max_packet_size ( std::string const &  address)
staticprivate

Referenced by parse_my_tag(), and provide_xml_schema().

unsigned int protocols::moves::PyMOLMover::default_port ( )
staticprivate

Referenced by parse_my_tag(), and provide_xml_schema().

core::scoring::ScoreType protocols::moves::PyMOLMover::energy_type ( void  )
inline

References energy_type_.

Referenced by protocols::moves::get_energies().

void protocols::moves::PyMOLMover::energy_type ( core::scoring::ScoreType  t)
inline
protocols::moves::MoverOP protocols::moves::PyMOLMover::fresh_instance ( ) const
overridevirtual

required in the context of the parser/scripting scheme

Reimplemented from protocols::moves::Mover.

utility::vector1< core::Real > protocols::moves::PyMOLMover::get_energies ( Pose const &  pose,
core::scoring::ScoreType  energy_type 
)
private

return vector of energy_type energy for each residue

Xiyao's code

UDPSocketClient const& protocols::moves::PyMOLMover::get_link ( ) const
inline

References link_.

std::string protocols::moves::PyMOLMover::get_name ( ) const
overridevirtual

Each derived class must specify its name. The class name.

Implements protocols::moves::Mover.

References mover_name().

std::string protocols::moves::PyMOLMover::get_pose_name ( Pose const &  pose)
private

return name, stripped of path and ".pdb"

std::string protocols::moves::PyMOLMover::get_PyMOL_model_name ( Pose const &  pose) const
bool protocols::moves::PyMOLMover::is_it_time ( )
private
void protocols::moves::PyMOLMover::keep_history ( bool  kh)
inline

Set the keep history flag. If set to True - PyMOL will keep track of all frames that was sent.

References keep_history_.

bool protocols::moves::PyMOLMover::keep_history ( void  )
inline

Return current keep_history flag.

References keep_history_.

Referenced by parse_my_tag().

void protocols::moves::PyMOLMover::label_energy ( Pose const &  input_pose,
std::string  energy_type = "total_score" 
)

Xiyao's Code.

References core::pose::Pose::energies(), and send_energy().

std::string protocols::moves::PyMOLMover::mover_name ( )
static
void protocols::moves::PyMOLMover::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap &   
)
overridevirtual

Parses tag for rosetta scripts.

PyMOLMoverCreator interface, name of the mover.

PyMOLMoverCreator interface, returns a unique key name to be used in xml file PyMOLMoverCreator interface, return a new instance allows for the setting of certain variabel from the rosetta scripts interface, only keep history

Reimplemented from protocols::moves::Mover.

References default_address(), default_max_packet_size(), default_port(), keep_history(), keep_history_, and link_.

void protocols::moves::PyMOLMover::print ( std::string const &  message)

Send message for PyMOL to print.

References is_it_time(), keep_history_, link_, and protocols::moves::UDPSocketClient::sendMessage().

void protocols::moves::PyMOLMover::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
std::string protocols::moves::PyMOLMover::pymol_name ( )
inline

Specify PyMOL model name.

References pymol_name_.

void protocols::moves::PyMOLMover::pymol_name ( std::string  new_pymol_name)
inline

References pymol_name_.

void protocols::moves::PyMOLMover::send_any ( std::string  ptype,
core::pose::Pose const &  pose,
utility::vector1< std::string >  data,
core::Size  size = 6 
)
void protocols::moves::PyMOLMover::send_colors ( Pose const &  pose,
std::map< int, int > const &  colors,
X11Colors  default_color = protocols::moves::XC_blue 
)
virtual

End Xiyao's Code.

Tell PyMOL to color protein with supplied custom colors

References send_RAW_Energies(), core::pose::Pose::size(), protocols::moves::XC_first_color, and protocols::moves::XC_last_color.

void protocols::moves::PyMOLMover::send_energy ( Pose const &  pose,
core::scoring::ScoreType  stype = core::scoring::total_score 
)
void protocols::moves::PyMOLMover::send_energy ( Pose const &  pose,
std::string const &  stype 
)

Send specified energy to PyMOL.

References core::scoring::ScoreTypeManager::score_type_from_name(), and send_energy().

void protocols::moves::PyMOLMover::send_foldtree ( Pose const &  pose,
core::kinematics::FoldTree const &  foldtree 
)
void protocols::moves::PyMOLMover::send_hbonds ( Pose const &  pose)
void protocols::moves::PyMOLMover::send_membrane_planes ( Pose const &  pose)
void protocols::moves::PyMOLMover::send_movemap ( Pose const &  pose,
core::kinematics::MoveMap const &  movemap 
)
void protocols::moves::PyMOLMover::send_polars ( Pose const &  pose)
void protocols::moves::PyMOLMover::send_RAW_Energies ( Pose const &  pose,
std::string  energyType,
utility::vector1< int > const &  energies 
)
void protocols::moves::PyMOLMover::send_ss ( Pose pose,
std::string  ss = "" 
)
void protocols::moves::PyMOLMover::set_link ( UDPSocketClient const &  link)
inline

References link_.

void protocols::moves::PyMOLMover::set_PyMOL_model_name ( std::string  name)

Set the pymol model name.

References protocols::moves::Mover::name(), and pymol_name_.

void protocols::moves::PyMOLMover::show ( std::ostream &  output = std::cout) const
overridevirtual

Outputs details about the Mover, including current settings.

Ideally, a child Mover should call Mover.show() and add additional information particular to that Mover.

Reimplemented from protocols::moves::Mover.

References keep_history_, last_packet_sent_time_, link_, protocols::moves::Mover::show(), update_energy_, and update_interval_.

Referenced by protocols::moves::operator<<().

bool protocols::moves::PyMOLMover::update_energy ( )
inline

Flag that specify if PyMOL mover should send current Pose energy on every apply. If name set to empty string (default) then name derived from pdb_info will be used.

References update_energy_.

void protocols::moves::PyMOLMover::update_energy ( bool  f)
inline

References update_energy_.

void protocols::moves::PyMOLMover::update_interval ( core::Real  t)
inline

Set current minimum update interval 't' in seconds. Mover will not send anyinformation to PyMOL before atleast 't' secons has passes since last packet was sent. default value is 0, - no packets are skipped.

References protocols::hybridization::t, and update_interval_.

core::Real protocols::moves::PyMOLMover::update_interval ( )
inline

Return current update interval.

References update_interval_.

Member Data Documentation

core::scoring::ScoreType protocols::moves::PyMOLMover::energy_type_
private

Referenced by apply(), and energy_type().

bool protocols::moves::PyMOLMover::keep_history_
private

Should PyMOL keep history of all models that was sent? - Default is false.

Referenced by apply(), keep_history(), parse_my_tag(), print(), send_any(), send_energy(), send_hbonds(), send_membrane_planes(), send_RAW_Energies(), and show().

core::Real protocols::moves::PyMOLMover::last_packet_sent_time_
private

Time stamp from where last packet was sent.

Referenced by is_it_time(), and show().

UDPSocketClient protocols::moves::PyMOLMover::link_
private
std::string protocols::moves::PyMOLMover::pymol_name_
private

Name of model in pymol.

Referenced by get_PyMOL_model_name(), pymol_name(), and set_PyMOL_model_name().

bool protocols::moves::PyMOLMover::update_energy_
private

Referenced by apply(), show(), and update_energy().

core::Real protocols::moves::PyMOLMover::update_interval_
private

Update interval in seconds.

Referenced by is_it_time(), show(), and update_interval().

bool protocols::moves::PyMOLMover::update_membrane_
private

If pose is a membrane pose, send planes.

Referenced by apply().


The documentation for this class was generated from the following files: