Class: PotcarCommand
- Inherits:
-
Thor
- Object
- Thor
- PotcarCommand
- Defined in:
- bin/potcar
Instance Method Summary collapse
Instance Method Details
#generate(*elements) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'bin/potcar', line 12 def generate(*elements) if [:poscar] && (! elements.empty?) puts "Error. Duplicated indication of elements with argument and --poscar option." exit end if [:poscar] elements = VaspUtils::Poscar.load_file([:poscar]).elements end setting = VaspUtils::Setting.new vpc = VaspUtils::Potcar::Concatenater.new( setting['potcar_dir'], setting['default_potcar'] ) vpc.dump(elements, STDOUT) end |