Module: Chem::Type::SybylType
- Defined in:
- lib/chem/db/types/type_sybyl.rb
Class Method Summary collapse
- .detect_file(file) ⇒ Object
- .detect_type(type) ⇒ Object
- .parse(file) ⇒ Object
- .save(mol, filename) ⇒ Object
Class Method Details
.detect_file(file) ⇒ Object
8 9 10 |
# File 'lib/chem/db/types/type_sybyl.rb', line 8 def self.detect_file file File.extname(file) == '.mol2' end |
.detect_type(type) ⇒ Object
17 18 19 |
# File 'lib/chem/db/types/type_sybyl.rb', line 17 def self.detect_type type type == :sybyl end |
.parse(file) ⇒ Object
12 13 14 15 |
# File 'lib/chem/db/types/type_sybyl.rb', line 12 def self.parse file require 'chem/db/sybyl' mol = Chem::Sybyl::SybylMolecule.new file end |
.save(mol, filename) ⇒ Object
21 22 23 |
# File 'lib/chem/db/types/type_sybyl.rb', line 21 def self.save mol, filename mol.save_as_mdl(filename) end |