qcfractal/interface/client.py
def add_collection(
        self, collection: Dict[str, Any], overwrite: bool = False, full_return: bool = False
    ) -> Union["CollectionGETResponse", List["ObjectId"]]:
        """Adds a new Collection to the server.

        Parameters
        ----------
        collection : Dict[str, Any]
            The full collection data representation.
        overwrite : bool, optional
            Overwrites the collection if it already exists in the database, used for updating collection.
        full_return : bool, optional
            Returns the full server response if True that contains additional metadata.

        Returns
        -------
        List[ObjectId]
            The ObjectId's of the added collection.

        """
        # Can take in either molecule or lists

        if overwrite and ("id" not in collection or collection["id"] == "local"):
            raise KeyError("Attempting to overwrite collection, but no server ID found (cannot use 'local').")

        payload = {"meta": {"overwrite": overwrite}, "data": collection}
        return self._automodel_request("collection", "post", payload, full_return=full_return)
Adds a new Collection to the server.

        Parameters
        ----------
        collection : Dict[str, Any]
            The full collection data representation.
        overwrite : bool, optional
            Overwrites the collection if it already exists in the database, used for updating collection.
        full_return : bool, optional
            Returns the full server response if True that contains additional metadata.

        Returns
        -------
        List[ObjectId]
            The ObjectId's of the added collection.

        
Adds a new Collection to the server.
Parameters

collection : Dict[str, Any]
The full collection data representation.
overwrite : bool, optional
Overwrites the collection if it already exists in the database, used for updating collection.
full_return : bool, optional
Returns the full server response if True that contains additional metadata.

Returns

List[ObjectId]
The ObjectId's of the added collection.
Adds a new Collection to the server . Parameters collection : Dict [ str Any ] The full collection data representation . overwrite : bool optional Overwrites the collection if it already exists in the database used for updating collection . full_return : bool optional Returns the full server response if True that contains additional metadata . Returns List [ ObjectId ] The ObjectId ' s of the added collection .
def add_collection(
        self, collection: Dict[str, Any], overwrite: bool = False, full_return: bool = False
    ) -> Union["CollectionGETResponse", List["ObjectId"]]:
        if overwrite and ("id" not in collection or collection["id"] == "local"):
            raise KeyError("Attempting to overwrite collection, but no server ID found (cannot use 'local').")
        payload = {"meta": {"overwrite": overwrite}, "data": collection}
        return self._automodel_request("collection", "post", payload, full_return=full_return)
def add_collection ( self , collection : Dict [ str , Any ] , overwrite : bool = False , full_return : bool = False ) -> Union [ "CollectionGETResponse" , List [ "ObjectId" ] ] : if overwrite and ( "id" not in collection or collection [ "id" ] == "local" ) : raise KeyError ( "Attempting to overwrite collection, but no server ID found (cannot use 'local')." ) payload = { "meta" : { "overwrite" : overwrite } , "data" : collection } return self . _automodel_request ( "collection" , "post" , payload , full_return = full_return )
Adds a new Collection to the server.
Adds a new Collection to the server .
"""Adds a new Collection to the server.

        Parameters
        ----------
        collection : Dict[str, Any]
            The full collection data representation.
        overwrite : bool, optional
            Overwrites the collection if it already exists in the database, used for updating collection.
        full_return : bool, optional
            Returns the full server response if True that contains additional metadata.

        Returns
        -------
        List[ObjectId]
            The ObjectId's of the added collection.

        """ # Can take in either molecule or lists
self
collection
Dict[str, Any]
overwrite
bool
full_return
bool