Class: RCDK::Util::XY
- Inherits:
-
Object
- Object
- RCDK::Util::XY
- Includes:
- Org::Openscience::Cdk
- Defined in:
- lib/rcdk/util.rb
Overview
2-D coordinate generation.
Constant Summary collapse
- @@sdg =
Layout::StructureDiagramGenerator.new
Class Method Summary collapse
-
.coordinate_molecule(molecule) ⇒ Object
Assigns 2-D coordinates to the indicated CDK
molecule
. -
.coordinate_molfile(molfile) ⇒ Object
Assigns 2-D coordinates to the indicated
molfile
string.
Class Method Details
.coordinate_molecule(molecule) ⇒ Object
Assigns 2-D coordinates to the indicated CDK molecule
.
133 134 135 136 137 |
# File 'lib/rcdk/util.rb', line 133 def self.coordinate_molecule(molecule) @@sdg.setMolecule(molecule) @@sdg.generateCoordinates @@sdg.getMolecule end |
.coordinate_molfile(molfile) ⇒ Object
Assigns 2-D coordinates to the indicated molfile
string.
126 127 128 129 130 |
# File 'lib/rcdk/util.rb', line 126 def self.coordinate_molfile(molfile) mol = coordinate_molecule(Lang.read_molfile(molfile)) Lang.get_molfile(mol) end |