Return element for OPLS forcefield atom key.
778289
def opls_notation(atom_key):
    """"""
    # warning for Ne, He, Na types overlap
    conflicts = ['ne', 'he', 'na']
    if atom_key in conflicts:
        raise _AtomKeyConflict((
            "One of the OPLS conflicting "
            "atom_keys has occured '{0}'. "
            "For how to solve this issue see the manual or "
            "MolecularSystem._atom_key_swap() doc string.").format(atom_key))
    for element in opls_atom_keys:
        if atom_key in opls_atom_keys[element]:
            return element
    # In case if atom_key was not found in the OPLS keys dictionary
    raise _AtomKeyError((
        "OPLS atom key {0} was not found in OPLS keys dictionary.").format(
            atom_key))
210385
public Key<?> getKey(FieldLiteral<?> field) {
    return getKey(field.getFieldType().getType(), field.getBindingAnnotation());
  }
950982
def text(self, force_get=False):
        
        def text_element():
            """
            Wrapper to get text of element
            """
            return self.element.text

        def force_text_element():
            """Get text by javascript"""
            return self.driver_wrapper.js_executor.execute_template_and_return_result(
                'getElementText.js', {}, self.element
            )

        if force_get:
            return self.execute_and_handle_webelement_exceptions(force_text_element, 'get text by javascript')
        else:
            return self.execute_and_handle_webelement_exceptions(text_element, 'get text')
894273
def get_resource_key(self):
        """"""
        model = self.get_model()
        if model:
            return get_model_table(model)
        else:
            return self.get_name()
1053850
def abstracts(self, key, value):
    """"""
    result = []

    source = force_single_element(value.get('9'))

    for a_value in force_list(value.get('a')):
        result.append({
            'source': source,
            'value': a_value,
        })

    return result
1059484
def dlf_notation(atom_key):
    """"""
    split = list(atom_key)
    element = ''
    number = False
    count = 0
    while number is False:
        element = "".join((element, split[count]))
        count += 1
        if is_number(split[count]) is True:
            number = True
    # In case of for example Material Studio output, integers can also be
    # in the beginning of the string. As the dlf_notation decipher function
    # is very general in use, we have to make sure these integers are deleted.
    # In standard DL_F notation the string will never start with integer so it
    # will not affect the functionality towards it.
    # EDIT2: also the '?' atoms, you can delete them manually or somewhere else
    element = "".join(i for i in element if not is_number(i))
    element = "".join(i for i in element if i != '?')
    return element
912371
def getfield(self, pkt, buf):
        """"""
        self.set_endianess(pkt)
        return self.fld.getfield(pkt, buf)
1334276
def get_atom(value):
    
    atom = Atom()
    if value and value[0] in CFWS_LEADER:
        token, value = get_cfws(value)
        atom.append(token)
    if value and value[0] in ATOM_ENDS:
        raise errors.HeaderParseError(
            "expected atom but found '{}'".format(value))
    token, value = get_atext(value)
    atom.append(token)
    if value and value[0] in CFWS_LEADER:
        token, value = get_cfws(value)
        atom.append(token)
    return atom, value
431784
function getKey(_, ctx) {
  var k = 'k:' + _.$key + '_' + (!!_.$flat);
  return ctx.fn[k] || (ctx.fn[k] = key(_.$key, _.$flat));
}
633411
def _get_key(key, scopes):
    """"""

    # If the key is a dot
    if key == '.':
        # Then just return the current scope
        return scopes[0]

    # Loop through the scopes
    for scope in scopes:
        try:
            # For every dot seperated key
            for child in key.split('.'):
                # Move into the scope
                try:
                    # Try subscripting (Normal dictionaries)
                    scope = scope[child]
                except (TypeError, AttributeError):
                    try:
                        # Try the dictionary (Complex types)
                        scope = scope.__dict__[child]
                    except (TypeError, AttributeError):
                        # Try as a list
                        scope = scope[int(child)]

            # Return an empty string if falsy, with two exceptions
            # 0 should return 0, and False should return False
            # While using is for this check is undefined it works and is fast
            if scope is 0:  # noqa: F632
                return 0
            if scope is False:
                return False

            try:
                # This allows for custom falsy data types
                # https://github.com/noahmorrison/chevron/issues/35
                if scope._CHEVRON_return_scope_when_falsy:
                    return scope
            except AttributeError:
                return scope or ''
        except (AttributeError, KeyError, IndexError, ValueError):
            # We couldn't find the key in the current scope
            # We'll try again on the next pass
            pass

    # We couldn't find the key in any of the scopes
    return ''
63689
def _force(self,obj,objtype=None):
        """"""
        gen=super(Dynamic,self).__get__(obj,objtype)

        if hasattr(gen,'_Dynamic_last'):
            return self._produce_value(gen,force=True)
        else:
            return gen
1129820
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return Operation(key)
        if key not in Operation._member_map_:
            extend_enum(Operation, key, default)
        return Operation[key]
135636
def xatom(self, atom):
        """"""
        handle = atom.handle
        
        if handle == self.atoms[0].handle:
            return self.atoms[1]
        elif handle == self.atoms[1].handle:
            return self.atoms[0]
        return None
747646
def _get(self, operation, field):
        """"""
        self._check_exists()
        query = {Mark.FLD_OP: operation.name,
                 Mark.FLD_MARK + "." + field: {"$exists": True}}
        return self._track.find_one(query)
641982
private AtomicValue atomize(final AbsAxis mOperand) {

        int type = getNode().getTypeKey();
        AtomicValue atom;

        if (XPATH_10_COMP) {

            atom = new AtomicValue(((ITreeValData)getNode()).getRawValue(), getNode().getTypeKey());
        } else {
            // unatomicType is cast to double
            if (type == NamePageHash.generateHashForString("xs:untypedAtomic")) {
                type = NamePageHash.generateHashForString("xs:double");
                // TODO: throw error, of cast fails
            }

            atom = new AtomicValue(((ITreeValData)getNode()).getRawValue(), getNode().getTypeKey());
        }

        // if (!XPATH_10_COMP && operand.hasNext()) {
        // throw new XPathError(ErrorType.XPTY0004);
        // }

        return atom;
    }
313885
def then_the_return_element_have_no_key(context, line, key):
    
    line = int(line)
    data = context.apiRequest.data
    assert 0 <= line < len(data)
    assert key not in data[line]
872199
def get_atom_name(self, atom):
        """"""
        r = request.GetAtomName(display = self.display,
                                atom = atom)
        return r.name