diff --git a/src/inputFile_impl.h b/src/inputFile_impl.h index 2836bb0..d3b37cd 100644 --- a/src/inputFile_impl.h +++ b/src/inputFile_impl.h @@ -273,7 +273,8 @@ void InputFile::check_lammps_command( std::string line, } if ( keyword.compare( "create_atoms" ) == 0 ) { - // supported version: + // supported versions: + // create_atoms TYPE-ID box // create_atoms TYPE-ID region REGION-ID known = true; if ( words.at( 2 ) == "region" ) @@ -287,6 +288,12 @@ void InputFile::check_lammps_command( std::string line, } regions_to_type[region_id] = type; } + else if ( words.at( 2 ) == "box" ) + { + auto type = std::stoi( words.at( 1 ) ); + auto region_id = regions.begin()->first; + regions_to_type[region_id] = type; + } else { log_err( err, @@ -391,17 +398,13 @@ void InputFile::check_lammps_command( std::string line, if ( keyword.compare( "velocity" ) == 0 ) { known = true; - // if ( words.at( 1 ).compare( "all" ) != 0 ) - // { - // log_err( err, "LAMMPS-Command: 'velocity' command can only be " - // "applied to 'all' in CabanaMD" ); - // } if ( words.at( 2 ).compare( "create" ) != 0 ) { log_err( err, "LAMMPS-Command: 'velocity' command can only be used " "with option 'create' in CabanaMD" ); } - auto atom_type = std::stoi( words.at( 1 ) ); + auto atom_type = + ( words.at( 1 ) == "all" ) ? 1 : std::stoi( words.at( 1 ) ); auto temperature_target = std::stod( words.at( 3 ) ); auto temperature_seed = std::stoi( words.at( 4 ) ); type_to_temperature[atom_type] = { temperature_target,